ocfs2: Add empty bucket support in xattr.
authorTao Ma <tao.ma@oracle.com>
Fri, 19 Sep 2008 14:17:41 +0000 (22:17 +0800)
committerMark Fasheh <mfasheh@suse.com>
Tue, 14 Oct 2008 00:02:43 +0000 (17:02 -0700)
commit5a09561199e7f8d3feaaa01c39372050e140b775
tree5affae979a564bae543e81d70abc58015ce44f80
parent06b240d8af21ddee4cfec3b0f02b81d9f168a98a
ocfs2: Add empty bucket support in xattr.

As Mark mentioned, it may be time-consuming when we remove the
empty xattr bucket, so this patch try to let empty bucket exist
in xattr operation. The modification includes:
1. Remove the functin of bucket and extent record deletion during
   xattr delete.
2. In xattr set:
   1) Don't clean the last entry so that if the bucket is empty,
      the hash value of the bucket is the hash value of the entry
      which is deleted last.
   2) During insert, if we meet with an empty bucket, just use the
      1st entry.
3. In binary search of xattr bucket, use the bucket hash value(which
   stored in the 1st xattr entry) to find the right place.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
fs/ocfs2/xattr.c