mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "张政旭 (Zhengxu Zhang)" <Zhengxu.Zhang@unisoc.com>
To: "Yuezhang.Mo@sony.com" <Yuezhang.Mo@sony.com>,
	Cixi Geng <cixi.geng@linux.dev>,
	"linkinjeon@kernel.org" <linkinjeon@kernel.org>,
	"sj1557.seo@samsung.com" <sj1557.seo@samsung.com>
Cc: "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"王皓 (Hao_hao Wang)" <Hao_hao.Wang@unisoc.com>,
	"张政旭 (Zhengxu Zhang)" <Zhengxu.Zhang@unisoc.com>
Subject: 答复: [PATCH] exfat: fdatasync flag should be same like generic_write_sync()
Date: Mon, 16 Jun 2025 09:21:22 +0000	[thread overview]
Message-ID: <ebba6e12af06486cafa5e16a284b7d7e@BJMBX01.spreadtrum.com> (raw)
In-Reply-To: <PUZPR04MB6316E8048064CB15DACDDE1B8177A@PUZPR04MB6316.apcprd04.prod.outlook.com>



> -----邮件原件-----
> 发件人: Yuezhang.Mo@sony.com <Yuezhang.Mo@sony.com>
> 发送时间: 2025年6月13日 18:14
> 收件人: Cixi Geng <cixi.geng@linux.dev>; linkinjeon@kernel.org;
> sj1557.seo@samsung.com
> 抄送: linux-fsdevel@vger.kernel.org; linux-kernel@vger.kernel.org; 张政旭
> (Zhengxu Zhang) <Zhengxu.Zhang@unisoc.com>
> 主题: Re: [PATCH] exfat: fdatasync flag should be same like generic_write_sync()
> 
> 
> 
> > generic_file_write_iter(), when calling generic_rite_sync() and
> 
> s/_rite/_write
>
I will fix this by next patch.
> > --- a/fs/exfat/file.c
> > +++ b/fs/exfat/file.c
> > @@ -625,7 +625,7 @@ static ssize_t exfat_file_write_iter(struct kiocb *iocb,
> struct iov_iter *iter)
> >
> >        if (iocb_is_dsync(iocb) && iocb->ki_pos > pos) {
> >                 ssize_t err = vfs_fsync_range(file, pos, iocb->ki_pos - 1,
> > -                               iocb->ki_flags & IOCB_SYNC);
> > +                               (iocb->ki_flags & IOCB_SYNC) ? 0 : 1);
> 
> How about calling generic_write_sync() instead of vfs_fsync_range(), like in
> generic_file_write_iter()?
The second arg of vfs_fsync_range "pos" maybe changed by valid_size (if pos > valid_size). 
It can not replace by iocb->ki_pos - ret (ret by __generic_file_write_iter).
So current way maybe better.

  reply	other threads:[~2025-06-16  9:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-13  6:23 Cixi Geng
2025-06-13 10:13 ` Yuezhang.Mo
2025-06-16  9:21   ` 张政旭 (Zhengxu Zhang) [this message]
2025-06-17  3:31     ` Yuezhang.Mo
2025-06-17  9:53       ` 答复: " 张政旭 (Zhengxu Zhang)
2025-06-18 11:11         ` Yuezhang.Mo

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=ebba6e12af06486cafa5e16a284b7d7e@BJMBX01.spreadtrum.com \
    --to=zhengxu.zhang@unisoc.com \
    --cc=Hao_hao.Wang@unisoc.com \
    --cc=Yuezhang.Mo@sony.com \
    --cc=cixi.geng@linux.dev \
    --cc=linkinjeon@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sj1557.seo@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®