Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114396
b: refs/heads/master
c: 28b8ca0
h: refs/heads/master
v: v3
  • Loading branch information
Tao Ma authored and Mark Fasheh committed Oct 13, 2008
1 parent eb87759 commit 7b56c8d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8d6220d6a74a33552cf877bcea25503d7f6a59e6
refs/heads/master: 28b8ca0b7f70b1b048d03dc0b9d87f58619e9791
15 changes: 14 additions & 1 deletion trunk/fs/ocfs2/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1336,8 +1336,9 @@ static int ocfs2_xattr_set_entry(struct inode *inode,
}

if (!(flag & OCFS2_INLINE_XATTR_FL)) {
/*set extended attribue in external blcok*/
/* set extended attribute in external block. */
ret = ocfs2_extend_trans(handle,
OCFS2_INODE_UPDATE_CREDITS +
OCFS2_XATTR_BLOCK_UPDATE_CREDITS);
if (ret) {
mlog_errno(ret);
Expand Down Expand Up @@ -3701,6 +3702,18 @@ static int ocfs2_add_new_xattr_cluster(struct inode *inode,
}
}

if (handle->h_buffer_credits < credits) {
/*
* The journal has been restarted before, and don't
* have enough space for the insertion, so extend it
* here.
*/
ret = ocfs2_extend_trans(handle, credits);
if (ret) {
mlog_errno(ret);
goto leave;
}
}
mlog(0, "Insert %u clusters at block %llu for xattr at %u\n",
num_bits, block, v_start);
ret = ocfs2_insert_extent(osb, handle, inode, &et, v_start, block,
Expand Down

0 comments on commit 7b56c8d

Please sign in to comment.