ocfs2: Improve ocfs2_read_xattr_bucket().
authorJoel Becker <joel.becker@oracle.com>
Sat, 25 Oct 2008 00:33:40 +0000 (17:33 -0700)
committerMark Fasheh <mfasheh@suse.com>
Mon, 5 Jan 2009 16:34:17 +0000 (08:34 -0800)
commit784b816a9198dc3782c97cde8ddcf52fecdf1797
tree8b6629535ab822a069449118d8925d479d58fdd3
parent6dde41d9e7ba62f84cd7e91c0e993500af32ceb6
ocfs2: Improve ocfs2_read_xattr_bucket().

The ocfs2_read_xattr_bucket() function would read an xattr bucket into a
list of buffer heads.  However, we have a nice ocfs2_xattr_bucket
structure.  Let's have it fill that out instead.

In addition, ocfs2_read_xattr_bucket() would initialize buffer heads for
a bucket that's never been on disk before.  That's confusing.  Let's
call that functionality ocfs2_init_xattr_bucket().

The functions ocfs2_cp_xattr_bucket() and ocfs2_half_xattr_bucket() are
updated to use the ocfs2_xattr_bucket structure rather than raw bh
lists.  That way they can use the new read/init calls.  In addition,
they drop the wasted read of an existing target bucket.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
fs/ocfs2/xattr.c