linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [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

* Re: [PATCH v2] f2fs: Add f2fs_balance_fs for direct IO
       [not found] ` <CAC=cRTOz6ec7fd4gdWy5iRHkvSJj6BXvOJdXq02NVhpyRudzMQ@mail.gmail.com>
@ 2014-07-26 22:51   ` Jaegeuk Kim
  0 siblings, 0 replies; 2+ messages in thread
From: Jaegeuk Kim @ 2014-07-26 22:51 UTC (permalink / raw)
  To: huang ying; +Cc: Huang Ying, Changman Lee, linux-f2fs-devel, LKML

Hi Huang,

On Sat, Jul 26, 2014 at 04:03:34PM +0800, huang ying wrote:
> Hi, Jaegeuk,
> 
> Do you have time to take a look at this patch?

I merged this in my local tree. :)
Thanks,

> 
> Best Regards,
> Huang, Ying

^ 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).