[PATCH 35/41] staging: lustre: hsm: Use file lease to implement migration

Greg Kroah-Hartman gregkh at linuxfoundation.org
Sun Oct 9 14:18:20 UTC 2016


On Sun, Oct 02, 2016 at 10:28:31PM -0400, James Simmons wrote:
> From: Henri Doreau <henri.doreau at cea.fr>
> 
> Implement non-blocking migration based on exclusive open instead of
> group lock. Implemented exclusive close operation to atomically put
> a lease, swap two layouts and close a file. This allows race-free
> migrations.
> 
> Make the caller responsible for retrying on failure (EBUSY, EAGAIN)
> in non-blocking mode.
> 
> In blocking mode, allow applications to trigger layout swaps using a
> grouplock they already own, to prevent race conditions between the
> actual data copy and the layout swap. Updated lfs accordingly. File
> leases are also taken in blocking mode, so that lfs migrate can issue
> a warning if an application attempts to open a file that is being
> migrated and gets blocked.
> 
> Timestamps (atime/mtime) are set from userland, after the layout swap
> is performed, to prevent conflicts with the grouplock.
> 
> lli_trunc_sem is taken/released in the vvp_io layer, under the DLM
> lock. This re-ordering fixes the original issue between truncate and
> migrate.
> 
> Signed-off-by: Henri Doreau <henri.doreau at cea.fr>
> Signed-off-by: Jinshan Xiong <jinshan.xiong at intel.com>
> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4840
> Reviewed-on: http://review.whamcloud.com/10013
> Reviewed-by: John L. Hammond <john.hammond at intel.com>
> Reviewed-by: frank zago <fzago at cray.com>
> Reviewed-by: Oleg Drokin <oleg.drokin at intel.com>
> Signed-off-by: James Simmons <jsimmons at infradead.org>
> ---
>  .../lustre/lustre/include/lustre/lustre_idl.h      |    5 +-
>  .../lustre/lustre/include/lustre/lustre_user.h     |    1 +
>  .../lustre/lustre/include/lustre_req_layout.h      |    2 +-
>  drivers/staging/lustre/lustre/llite/file.c         |  231 ++++++++++++--------
>  drivers/staging/lustre/lustre/llite/llite_lib.c    |    4 -
>  drivers/staging/lustre/lustre/llite/vvp_io.c       |   82 +++++---
>  drivers/staging/lustre/lustre/mdc/mdc_lib.c        |   34 ++--
>  drivers/staging/lustre/lustre/mdc/mdc_request.c    |    7 +-
>  drivers/staging/lustre/lustre/ptlrpc/layout.c      |   10 +-
>  9 files changed, 235 insertions(+), 141 deletions(-)

This patch also failed to apply :(


More information about the devel mailing list