From: Chao Yu <chao@kernel.org>
To: Yohan Joung <jyh429@gmail.com>, jaegeuk@kernel.org, daeho43@gmail.com
Cc: chao@kernel.org, linux-f2fs-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org, Yohan Joung <yohan.joung@sk.com>
Subject: Re: [PATCH v1] f2fs: optimize f2fs DIO overwrites
Date: Mon, 17 Mar 2025 11:20:25 +0800 [thread overview]
Message-ID: <d1d43936-1de7-4550-8bf2-f4c604b367d1@kernel.org> (raw)
In-Reply-To: <20250312134805.362-1-yohan.joung@sk.com>
On 3/12/25 21:48, Yohan Joung wrote:
> this is unnecessary when we know we are overwriting already allocated
> blocks and the overhead of starting a transaction can be significant
> especially for multithreaded workloads doing small writes.
>
> Signed-off-by: Yohan Joung <yohan.joung@sk.com>
> ---
> fs/f2fs/data.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> index d872f785a996..b55d253f7be9 100644
> --- a/fs/f2fs/data.c
> +++ b/fs/f2fs/data.c
> @@ -4181,7 +4181,8 @@ static int f2fs_iomap_begin(struct inode *inode, loff_t offset, loff_t length,
> map.m_next_pgofs = &next_pgofs;
> map.m_seg_type = f2fs_rw_hint_to_seg_type(F2FS_I_SB(inode),
> inode->i_write_hint);
> - if (flags & IOMAP_WRITE)
> + if ((flags & IOMAP_WRITE) &&
> + !f2fs_overwrite_io(inode, offset, length))
Can you please add a comment for this change? Otherwise it looks
fine to me.
Thanks,
> map.m_may_create = true;
>
> err = f2fs_map_blocks(inode, &map, F2FS_GET_BLOCK_DIO);
prev parent reply other threads:[~2025-03-17 3:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-12 13:48 Yohan Joung
2025-03-17 3:20 ` Chao Yu [this message]
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=d1d43936-1de7-4550-8bf2-f4c604b367d1@kernel.org \
--to=chao@kernel.org \
--cc=daeho43@gmail.com \
--cc=jaegeuk@kernel.org \
--cc=jyh429@gmail.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=yohan.joung@sk.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
all inboxes | Powered by JetHome®