mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: 정성재 <jsjlee1020@gmail.com>
Cc: chao@kernel.org, jaegeuk@kernel.org, hans.holmberg@wdc.com,
	yonggil.song@samsung.com, linux-f2fs-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] f2fs: fix O_DIRECT cleanup range for append writes
Date: Wed, 19 Aug 2026 09:47:06 +0800	[thread overview]
Message-ID: <f40d5ab3-0073-4af4-902a-f17548961638@kernel.org> (raw)
In-Reply-To: <CAPHXVrzgPpxgAJrCmJ_Ro19AertMnqKfC1oW_y_FpbLoqO7nug@mail.gmail.com>

On 8/18/26 20:23, 정성재 wrote:
>> If generic_write_checks() can adjust writing position or amount of bytes
>> to write, shouldn't we access iocb->ki_pos and iov_iter_count(from) after
>> generic_write_checks()?
> 
> Yes, agreed. generic_write_checks() can adjust both iocb->ki_pos and
> the iterator count.
> 
> I noticed that the pinned file overwrite check uses pos and count
> saved before f2fs_write_checks(). I plan to keep the check in
> f2fs_file_write_iter(), but move it after f2fs_write_checks() and use
> the adjusted iocb->ki_pos and iov_iter_count(from).

Yeah, I think it's the correct way.

> 
> This also keeps the change local to f2fs_file_write_iter(), where other
> checks are already performed after f2fs_write_checks().
> 
> For the buffered cleanup, as in my original patch, I plan to save the
> adjusted write position after f2fs_write_checks() and use it for
> f2fs_flush_buffered_write().
> 
> Does this approach look reasonable to you?

It make sense, please go ahead. :)

Thanks,

> 
> Thanks,
> Seongjae


      reply	other threads:[~2026-08-19  1:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-14 10:52 Seongjae Jeong
2026-08-17  3:38 ` Chao Yu
2026-08-18 12:23   ` 정성재
2026-08-19  1:47     ` 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=f40d5ab3-0073-4af4-902a-f17548961638@kernel.org \
    --to=chao@kernel.org \
    --cc=hans.holmberg@wdc.com \
    --cc=jaegeuk@kernel.org \
    --cc=jsjlee1020@gmail.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yonggil.song@samsung.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®