]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_scrub: handle concurrent directory updates during name scan
authorDarrick J. Wong <djwong@kernel.org>
Fri, 12 Feb 2021 22:23:06 +0000 (17:23 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Fri, 12 Feb 2021 22:23:06 +0000 (17:23 -0500)
commit942d5946d744d4abde0cf56678997f79207f81fa
treef5942800c76a892014b7aec297a02279fdfb63f1
parentff8717e52b7364625acb942238cb29d93cbbe25b
xfs_scrub: handle concurrent directory updates during name scan

The name scanner in xfs_scrub cannot lock a namespace (dirent or xattr)
and the kernel does not provide a stable cursor interface, which means
that we can see the same byte sequence multiple times during a scan.
This isn't a confusing name error since the kernel enforces uniqueness
on the byte sequence, so all we need to do here is update the old entry.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
scrub/unicrash.c