mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chi Zhiling <chizhiling@163.com>
To: Jiale Yao <yaojiale02@163.com>,
	Namjae Jeon <linkinjeon@kernel.org>,
	Sungjong Seo <sj1557.seo@samsung.com>,
	Yuezhang Mo <yuezhang.mo@sony.com>,
	"Darrick J. Wong" <djwong@kernel.org>,
	exfat@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] exfat: drain in-flight DIO before buffered write fallback
Date: Sun, 27 Sep 2026 21:04:58 +0800	[thread overview]
Message-ID: <9e6e7f65-33b3-4bf2-9254-011b5e1faaa9@163.com> (raw)
In-Reply-To: <20260926072612.3022680-4-yaojiale02@163.com>

On 9/26/26 3:26 PM, Jiale Yao wrote:
> diff --git a/fs/exfat/file.c b/fs/exfat/file.c
> index a2a9ee1a2004..cf5ccbd54823 100644
> --- a/fs/exfat/file.c
> +++ b/fs/exfat/file.c
> @@ -807,6 +807,12 @@ static ssize_t exfat_fallback_buffered_write(struct kiocb *iocb,
>   
>   	iocb->ki_flags &= ~IOCB_DIRECT;
>   
> +	/*
> +	 * Prevent concurrent direct I/O and buffered I/O to the same file
> +	 * range. Wait for in-flight DIO to finish before dirtying pages.
> +	 */
> +	inode_dio_wait(file_inode(iocb->ki_filp));

This change is correct, but the comment is not accurate because the 
function you modified is not part of the buffered I/O path in exFAT.

You can add inode_dio_wait() to both exfat_file_write_iter() and 
exfat_fallback_buffered_write(), and move the comment to 
exfat_file_write_iter().

> +
>   	written = iomap_file_buffered_write(iocb, from, &exfat_write_iomap_ops,
>   			NULL, NULL);
>   	if (written < 0)


  reply	other threads:[~2026-09-27 13:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-26  7:26 [PATCH v2 0/3] fs: " Jiale Yao
2026-09-26  7:26 ` [PATCH v2 1/3] ext2: " Jiale Yao
2026-09-29 12:41   ` Jan Kara
2026-09-26  7:26 ` [PATCH v2 2/3] ntfs: " Jiale Yao
2026-09-26 14:31   ` liubaolin
2026-09-26  7:26 ` [PATCH v2 3/3] exfat: " Jiale Yao
2026-09-27 13:04   ` Chi Zhiling [this message]
2026-09-28  8:56     ` jiale yao

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=9e6e7f65-33b3-4bf2-9254-011b5e1faaa9@163.com \
    --to=chizhiling@163.com \
    --cc=djwong@kernel.org \
    --cc=exfat@lists.linux.dev \
    --cc=linkinjeon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sj1557.seo@samsung.com \
    --cc=yaojiale02@163.com \
    --cc=yuezhang.mo@sony.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®