Whamcloud - gitweb
LU-15300 mdt: refresh LOVEA with LL granted 13/46413/69
authorAlex Zhuravlev <bzzz@whamcloud.com>
Tue, 1 Feb 2022 20:50:02 +0000 (23:50 +0300)
committerAlex Zhuravlev <bzzz@whamcloud.com>
Wed, 22 Mar 2023 05:09:46 +0000 (08:09 +0300)
commitefbe0f63eff8a9a7b192607382f6859e3b0088b8
tree40278b03184b5f3468d5513a1eb05049b08fdcdd
parent654d5f3fa4df2a0f7275a6da0f050a18881f4f75
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
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