• Tao Ma's avatar
    ocfs2/xattr: Merge xattr set transaction. · 85db90e7
    Tao Ma authored
    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: default avatarTao Ma <tao.ma@oracle.com>
    Signed-off-by: default avatarMark Fasheh <mfasheh@suse.com>
    85db90e7
xattr.c 127 KB