ocfs2/xattr: Merge xattr set transaction.
authorTao Ma <tao.ma@oracle.com>
Wed, 12 Nov 2008 00:27:01 +0000 (08:27 +0800)
committerMark Fasheh <mfasheh@suse.com>
Mon, 5 Jan 2009 16:34:19 +0000 (08:34 -0800)
commit85db90e77806d48a19fda77dabe8897d369a1710
treedaaceb3943214b83b7784e8f4170c5321d69ea5f
parent78f30c314a74b9dc5d7368d96fe4be883d9a3a04
ocfs2/xattr: Merge xattr set transaction.

In current ocfs2/xattr, the whole xattr set is divided into
many steps are many transaction are used, this make the
xattr set process isn't like a real transaction, so this
patch try to merge all the transaction into one. Another
benefit is that acl can use it easily now.

I don't merge the transaction of deleting xattr when we
remove an inode. The reason is that if we have a large number
of xattrs and every xattrs has large values(large enough
for outside storage), the whole transaction will be very
huge and it looks like jbd can't handle it(I meet with a
jbd complain once). And the old inode removal is also divided
into many steps, so I'd like to leave as it is.

Note:
In xattr set, I try to avoid ocfs2_extend_trans since if
the credits aren't enough for the extension, it will commit
all the dirty blocks and create a new transaction which may
lead to inconsistency in metadata. All ocfs2_extend_trans
remained are safe now.

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