]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/LFNIndex: only consider alt xattr if nlink > 1
authorSage Weil <sage@redhat.com>
Sat, 19 Jul 2014 06:16:09 +0000 (23:16 -0700)
committerSage Weil <sage@redhat.com>
Wed, 23 Jul 2014 21:48:14 +0000 (14:48 -0700)
commit6fb3260d59faab1e20ebf1e44f850f85f6b8342a
tree0f11842cdb7ad662cbf441bacf06dd5a625f7160
parentec36f0a130d67df6cbeefcc9c2d83eb703b6b28c
os/LFNIndex: only consider alt xattr if nlink > 1

If we are doing a lookup, the main xattr fails, we'll check if there is an
alt xattr.  If it exists, but the nlink on the inode is only 1, we will
kill the xattr.  This cleans up the mess left over by an incomplete
lfn_unlink operation.

This resolves the problem with an lfn_link to a second long name that
hashes to the same short_name: we will ignore the old name the moment the
old link goes away.

Fixes: #8701
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/LFNIndex.cc