* [PATCH v2] f2fs: Add f2fs_balance_fs for direct IO
@ 2014-07-12 12:10 Huang Ying
[not found] ` <CAC=cRTOz6ec7fd4gdWy5iRHkvSJj6BXvOJdXq02NVhpyRudzMQ@mail.gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: Huang Ying @ 2014-07-12 12:10 UTC (permalink / raw)
To: Jaegeuk Kim, Changman Lee; +Cc: linux-f2fs-devel, linux-kernel, Huang Ying
Otherwise, if a large amount of direct IO writes were done, the
segment allocation may be failed because no enough segments are gced.
Changes:
v2: add f2fs_balance_fs into __get_data_block instead of f2fs_direct_IO.
Signed-off-by: Huang, Ying <ying.huang@intel.com>
---
fs/f2fs/data.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -626,8 +626,10 @@ static int __get_data_block(struct inode
if (check_extent_cache(inode, pgofs, bh_result))
goto out;
- if (create)
+ if (create) {
+ f2fs_balance_fs(sbi);
f2fs_lock_op(sbi);
+ }
/* When reading holes, we need its node page */
set_new_dnode(&dn, inode, NULL, NULL, 0);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-07-26 22:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-12 12:10 [PATCH v2] f2fs: Add f2fs_balance_fs for direct IO Huang Ying
[not found] ` <CAC=cRTOz6ec7fd4gdWy5iRHkvSJj6BXvOJdXq02NVhpyRudzMQ@mail.gmail.com>
2014-07-26 22:51 ` Jaegeuk Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).