Whamcloud - gitweb
LU-16380 osd-ldiskfs: race in OI mapping 14/49514/2
authorLai Siyao <lai.siyao@whamcloud.com>
Sat, 17 Dec 2022 13:06:16 +0000 (08:06 -0500)
committerOleg Drokin <green@whamcloud.com>
Thu, 19 Jan 2023 15:31:59 +0000 (15:31 +0000)
commit43fe6e51804f8fb4cca4445be576233595e27b42
treeabdfb2b7f0bed4275dbf8d2cf5f1d0422d3d9da6
parentae98c5fdaaf37daeb328b7110cbcf42754752c9d
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.

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-on: https://review.whamcloud.com/c/fs/lustre-release/+/49514
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/osd-ldiskfs/osd_handler.c