From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Huang Ying <ying.huang@intel.com>
Cc: Changman Lee <cm224.lee@samsung.com>,
linux-f2fs-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: f2fs: Add f2fs_balance_fs for direct IO
Date: Tue, 8 Jul 2014 00:58:43 -0700 [thread overview]
Message-ID: <20140708075843.GA59558@jmac> (raw)
In-Reply-To: <1404711988-18264-1-git-send-email-ying.huang@intel.com>
Hi Huang,
It occurs a merge conflict.
Please check the patch.
Anyway, IMO, it needs to place f2fs_balance_fs somewhere in get_data_block.
Thanks,
On Mon, Jul 07, 2014 at 01:46:28PM +0800, Huang Ying wrote:
> Otherwise, if a large amount of direct IO writes were done, the
> segment allocation may be failed because no enough segments are gced.
>
> Signed-off-by: Huang, Ying <ying.huang@intel.com>
> ---
> fs/f2fs/data.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> --- a/fs/f2fs/data.c
> +++ b/fs/f2fs/data.c
> @@ -1038,6 +1038,7 @@ static ssize_t f2fs_direct_IO(int rw, st
> {
> struct file *file = iocb->ki_filp;
> struct inode *inode = file->f_mapping->host;
> + struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb);
>
> /* Let buffer I/O handle the inline data case. */
> if (f2fs_has_inline_data(inode))
> @@ -1046,8 +1047,11 @@ static ssize_t f2fs_direct_IO(int rw, st
> if (check_direct_IO(inode, rw, iter, offset))
> return 0;
>
> + if (rw == WRITE)
> + f2fs_balance_fs(sbi);
> +
> /* clear fsync mark to recover these blocks */
> - fsync_mark_clear(F2FS_SB(inode->i_sb), inode->i_ino);
> + fsync_mark_clear(sbi, inode->i_ino);
>
> return blockdev_direct_IO(rw, iocb, inode, iter, offset,
> get_data_block);
--
Jaegeuk Kim
next prev parent reply other threads:[~2014-07-08 7:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-07 5:46 f2fs: Add f2fs_balance_fs for direct IO Huang Ying
2014-07-08 7:58 ` Jaegeuk Kim [this message]
2014-07-08 8:16 ` Huang Ying
2014-07-09 3:06 ` [f2fs-dev] " Chao Yu
2014-07-09 13:26 ` Jaegeuk Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140708075843.GA59558@jmac \
--to=jaegeuk@kernel.org \
--cc=cm224.lee@samsung.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=ying.huang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox