Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1502507 > unrolled thread
| Started by | Jaegeuk Kim <jaegeuk@kernel.org> |
|---|---|
| First post | 2016-10-18 00:10 +0200 |
| Last post | 2016-10-26 14:10 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 2/3] f2fs: call f2fs_balance_fs for setattr Jaegeuk Kim <jaegeuk@kernel.org> - 2016-10-18 00:10 +0200
Re: [PATCH 2/3] f2fs: call f2fs_balance_fs for setattr Chao Yu <yuchao0@huawei.com> - 2016-10-26 14:10 +0200
| From | Jaegeuk Kim <jaegeuk@kernel.org> |
|---|---|
| Date | 2016-10-18 00:10 +0200 |
| Subject | [PATCH 2/3] f2fs: call f2fs_balance_fs for setattr |
| Message-ID | <stogy-1lR-5@gated-at.bofh.it> |
If inode becomes dirty, we need to check the # of dirty inodes whether or not
further checkpoint would be required.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
fs/f2fs/file.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 0907efa..e63d0fd 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -694,7 +694,6 @@ int f2fs_setattr(struct dentry *dentry, struct iattr *attr)
err = f2fs_truncate(inode);
if (err)
return err;
- f2fs_balance_fs(F2FS_I_SB(inode), true);
} else {
/*
* do not trim all blocks after i_size if target size is
@@ -723,6 +722,10 @@ int f2fs_setattr(struct dentry *dentry, struct iattr *attr)
}
f2fs_mark_inode_dirty_sync(inode);
+
+ /* inode change will produce dirty node pages flushed by checkpoint */
+ f2fs_balance_fs(F2FS_I_SB(inode), true);
+
return err;
}
--
2.8.3
[toc] | [next] | [standalone]
| From | Chao Yu <yuchao0@huawei.com> |
|---|---|
| Date | 2016-10-26 14:10 +0200 |
| Message-ID | <swvbQ-3py-11@gated-at.bofh.it> |
| In reply to | #1502507 |
On 2016/10/18 5:56, Jaegeuk Kim wrote: > If inode becomes dirty, we need to check the # of dirty inodes whether or not > further checkpoint would be required. > > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Reviewed-by: Chao Yu <yuchao0@huawei.com>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web