Whamcloud - gitweb
LU-15300 mdt: refresh LOVEA with LL granted
authorAlex Zhuravlev <bzzz@whamcloud.com>
Fri, 21 Apr 2023 05:42:37 +0000 (08:42 +0300)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 11 May 2023 00:40:22 +0000 (00:40 +0000)
commitf1bd96779933ed69c22eb8b7c45b00d2ef3599ec
treea59cef83c41c5957ea5a919bef6970efcb65d8d2
parent267d3703cea9ebde6dff3f9461b1eadd970ee877
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.

Lustre-change: https://review.whamcloud.com/46413
Lustre-commit: efbe0f63eff8a9a7b192607382f6859e3b0088b8

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Idee1101d152ab09947faf6d75574a8761a7690a5
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/50705
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@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