Whamcloud - gitweb
LU-15300 mdt: refresh LOVEA with LL granted 13/46413/70
authorAlex Zhuravlev <bzzz@whamcloud.com>
Tue, 1 Feb 2022 20:50:02 +0000 (23:50 +0300)
committerOleg Drokin <green@whamcloud.com>
Sat, 22 Apr 2023 17:27:37 +0000 (17:27 +0000)
commit13557aa86904376e48a5e43256d5c1ab32c1c2d6
tree725131bc20947867ee59aac0397a660b9bd63bd7
parente69eea5f60eec17ac32cea8d2a60768e0738a052
LU-15300 mdt: refresh LOVEA with LL granted

this change tries to fix two problems:
1) mdt_reint_open() fetches LOVEA before layout lock is taken.
   this may race with another process changing the layout and
   may result in a stale layout returned with a granted layout
   lock - re-fetch LOVEA once layout lock is granted

2) lov_layout_change() should not apply old layouts which
   can get through when MDS doesn't take layout lock

3) LFSCK shouldn't ignore layout version stored on MDS to avoid
   a situation when version degrades compared to client's copy.

This patch misses an optimization and can result in a number of
useless calls to OSD to fetch LOVEA. To be fixed in a followup
patch.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Idee1101d152ab09947faf6d75574a8761a7690a5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/46413
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Zhenyu Xu <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/obd_support.h
lustre/lfsck/lfsck_layout.c
lustre/llite/vvp_page.c
lustre/lov/lov_object.c
lustre/mdt/mdt_open.c
lustre/tests/sanity-flr.sh