Whamcloud - gitweb
LU-16380 osd-ldiskfs: race in OI mapping
authorLai Siyao <lai.siyao@whamcloud.com>
Sat, 17 Dec 2022 13:06:16 +0000 (08:06 -0500)
committerAndreas Dilger <adilger@whamcloud.com>
Sat, 21 Jan 2023 02:52:17 +0000 (02:52 +0000)
commit3e26db5487083dfc221425d52e0ec24970f27483
treeb2446e1db3fe8be07ec54d3a4be7b215748ad743
parent55fb2ba1187e7c566e218df4f3311d39de204fe8
LU-16380 osd-ldiskfs: race in OI mapping

There is race in OI scrub thread and OI mapping entry insertion, which
may add an inconsistent OI mapping entry, but not started OI scrub
thread. This may lead to osd_fid_lookup() always returns -EINPROGRESS.

To avoid such race, osd_fid_lookup() returns -EINPROGRESS only when
OI mapping is inconsistent, and OI scrub thread is not running.

Lustre-change: https://review.whamcloud.com/49514
Lustre-commit: 43fe6e51804f8fb4cca4445be576233595e27b42

Fixes: 558784caad ("LU-15643 osd-ldiskfs: don't trigger scrub on irreparable FIDs")
Test-Parameters: mdscount=2 mdtcount=4 testlist=conf-sanity env=ONLY=108b,ONLY_REPEAT=50
Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I05114b6a33940c210e9952f6e24f6c36fd7f76a2
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/49719
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/osd-ldiskfs/osd_handler.c