Whamcloud - gitweb
LU-11967 mdt: reint layout_change in standard way 76/36376/2
authorLai Siyao <lai.siyao@whamcloud.com>
Sun, 30 Jun 2019 15:26:11 +0000 (23:26 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 21 Nov 2019 07:31:51 +0000 (07:31 +0000)
commit6a806133a3a53987dbd9c207e0ed82dcd4035bbd
tree6b7baad6d7fc4fa7e550cbf3c6dc88bdf9e8cf3c
parenta53869aa31ceee700215520e5267b155a0f59d46
LU-11967 mdt: reint layout_change in standard way

Layout_change is a reint operation, and it should be handled the
same as other reint operations, so that resent and replay can
work correctly.

Also replace the lock passed in ldlm_handle_enqueue0() with the
lock taken in mdt_layout_change(). This avoids taking lock again
in ldlm_handle_enqueue0(), and also makes replay eaiser. Note,
before replacing, the mode is downgraded from EX to CR, because
client only needs this mode, as can avoid unnecessary lock cancel
later.

Add missing resent reconstructor for REINT_RESYNC.

Lustre-change: https://review.whamcloud.com/35465
Lustre-commit: e1bebbdf53c8490a3be35793070f45f1a68721b1

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I328044dacbf18d03232c9bbb51271f6202e9b939
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/36376
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ldlm/ldlm_lock.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_internal.h
lustre/mdt/mdt_open.c
lustre/mdt/mdt_recovery.c
lustre/mdt/mdt_reint.c