• Tao Ma's avatar
    ocfs2/xattr: Proper hash collision handle in bucket division · 80bcaf34
    Tao Ma authored
    In ocfs2/xattr, we must make sure the xattrs which have the same hash value
    exist in the same bucket so that the search schema can work. But in the old
    implementation, when we want to extend a bucket, we just move half number of
    xattrs to the new bucket. This works in most cases, but if we are lucky
    enough we will move 2 xattrs into 2 different buckets. This means that an
    xattr from the previous bucket cannot be found anymore. This patch fix this
    problem by finding the right position during extending the bucket and extend
    an empty bucket if needed.
    Signed-off-by: default avatarTao Ma <tao.ma@oracle.com>
    Cc: Joel Becker <joel.becker@oracle.com>
    Signed-off-by: default avatarMark Fasheh <mfasheh@suse.com>
    80bcaf34
xattr.c 122 KB