Skip to contentSkip to conversation

f2fs: add f2fs_balance_fs for expand_inode_data

PATCH New Chao Yu 1 participant 1 message Aug 4, 2014

Subsystems (2)
lore
Share & tools
lore

Chao Yu

author
#0 lore raw

PATCH 2/2 f2fs: add f2fs_balance_fs for expand_inode_data

This patch adds f2fs_balance_fs in expand_inode_data to avoid allocation failure with segment.

---
 fs/f2fs/file.c | 2 ++
 1 file changed, 2 insertions(+)
fs/f2fs/file.c +2 -0
index 9550135..5d3b779 100644
@@ -671,6 +671,8 @@ static int expand_inode_data(struct inode *inode, loff_t offset,
 	loff_t off_start, off_end;
 	int ret = 0;
 
+	f2fs_balance_fs(sbi);
+
 	ret = inode_newsize_ok(inode, (len + offset));
 	if (ret)
 		return ret;
Signature · 10 lines
2.0.0.421.g786a89d



------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk