[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <TYAPR04MB2272239E6B2EBE91E719C9A080129@TYAPR04MB2272.apcprd04.prod.outlook.com>
Date: Thu, 17 Mar 2022 03:21:28 +0000
From: "Andy.Wu@...y.com" <Andy.Wu@...y.com>
To: "Yuezhang.Mo@...y.com" <Yuezhang.Mo@...y.com>,
Namjae Jeon <linkinjeon@...nel.org>,
"Kohada.Tetsuhiro@...MitsubishiElectric.co.jp"
<Kohada.Tetsuhiro@...mitsubishielectric.co.jp>
CC: "sj1557.seo@...sung.com" <sj1557.seo@...sung.com>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Wataru.Aoyama@...y.com" <Wataru.Aoyama@...y.com>
Subject: RE: [PATCH v2] exfat: do not clear VolumeDirty in writeback
Hi Yuezhang
> When call exfat_clear_volume_dirty(sb), all dirty buffers had synced by
> sync_blockdev(), so I think REQ_FUA/REQ_PREFLUSH is not needed.
I think Kohada-san's meaning is like below:
- sync_dirty_buffer(sbi->boot_bh);
+ __sync_dirty_buffer(sbi->boot_bh, REQ_SYNC | REQ_FUA | REQ_PREFLUSH);
I guess sync_blockdev() won't guarantee sync to non-volatile storage if disk contains cache.
Best Regards
Andy Wu
> -----Original Message-----
> From: Mo, Yuezhang <Yuezhang.Mo@...y.com>
> Sent: Wednesday, March 16, 2022 5:18 PM
> To: Namjae Jeon <linkinjeon@...nel.org>;
> Kohada.Tetsuhiro@...MitsubishiElectric.co.jp
> Cc: sj1557.seo@...sung.com; linux-fsdevel@...r.kernel.org;
> linux-kernel@...r.kernel.org; Wu, Andy <Andy.Wu@...y.com>; Aoyama,
> Wataru (SGC) <Wataru.Aoyama@...y.com>
> Subject: RE: [PATCH v2] exfat: do not clear VolumeDirty in writeback
>
> Hi Namjae, Kohada.Tetsuhiro,
>
> > >> - if (sync)
> > >> - sync_dirty_buffer(sbi->boot_bh);
> > >> + sync_dirty_buffer(sbi->boot_bh);
> > >> +
> > >
> > > Use __sync_dirty_buffer() with REQ_FUA/REQ_PREFLUSH instead to
> > > guarantee a strict write order (including devices).
> > Yuezhang, It seems to make sense. Can you check this ?
> >
>
> When call exfat_clear_volume_dirty(sb), all dirty buffers had synced by
> sync_blockdev(), so I think REQ_FUA/REQ_PREFLUSH is not needed.
>
> ```
> sync_blockdev(sb->s_bdev);
> if (exfat_clear_volume_dirty(sb)) ```
>
> exfat_clear_volume_dirty() is only called in sync or umount context.
> In sync or umount context, all requests will be issued with REQ_SYNC
> regardless of whether REQ_SYNC is set when submitting buffer.
>
> And since the request of set VolumeDirty is issued with REQ_SYNC. So for
> simplicity, call sync_dirty_buffer() unconditionally.
>
> Best Regards,
> Yuezhang Mo
>
Powered by blists - more mailing lists