Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 348969
b: refs/heads/master
c: 7d82db8
h: refs/heads/master
i:
  348967: db9715f
v: v3
  • Loading branch information
Jaegeuk Kim committed Jan 11, 2013
1 parent a7bb5b9 commit eb43fde
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 408e9375610cca6d54e9c654cbe05a647687e12e
refs/heads/master: 7d82db83165dbac8c3f6d47b73c84f38e3996e30
3 changes: 3 additions & 0 deletions trunk/fs/f2fs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
if (ret)
return ret;

/* guarantee free sections for fsync */
f2fs_balance_fs(sbi);

mutex_lock(&inode->i_mutex);

if (datasync && !(inode->i_state & I_DIRTY_DATASYNC))
Expand Down
3 changes: 3 additions & 0 deletions trunk/fs/f2fs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@ int f2fs_write_inode(struct inode *inode, struct writeback_control *wbc)
inode->i_ino == F2FS_META_INO(sbi))
return 0;

if (wbc)
f2fs_balance_fs(sbi);

node_page = get_node_page(sbi, inode->i_ino);
if (IS_ERR(node_page))
return PTR_ERR(node_page);
Expand Down
2 changes: 2 additions & 0 deletions trunk/fs/f2fs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ int f2fs_sync_fs(struct super_block *sb, int sync)

if (sync)
write_checkpoint(sbi, false, false);
else
f2fs_balance_fs(sbi);

return 0;
}
Expand Down
2 changes: 2 additions & 0 deletions trunk/fs/f2fs/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,8 @@ int f2fs_setxattr(struct inode *inode, int name_index, const char *name,
if (name_len > 255 || value_len > MAX_VALUE_LEN)
return -ERANGE;

f2fs_balance_fs(sbi);

mutex_lock_op(sbi, NODE_NEW);
if (!fi->i_xattr_nid) {
/* Allocate new attribute block */
Expand Down

0 comments on commit eb43fde

Please sign in to comment.