[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <TYAPR01MB5353E089F4843C6CE6A0BA1E90019@TYAPR01MB5353.jpnprd01.prod.outlook.com>
Date: Mon, 28 Feb 2022 07:11:34 +0000
From: "Kohada.Tetsuhiro@...MitsubishiElectric.co.jp"
<Kohada.Tetsuhiro@...MitsubishiElectric.co.jp>
To: "'Yuezhang.Mo@...y.com'" <Yuezhang.Mo@...y.com>,
"linkinjeon@...nel.org" <linkinjeon@...nel.org>,
"sj1557.seo@...sung.com" <sj1557.seo@...sung.com>
CC: "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] exfat: do not clear VolumeDirty in writeback
Hi, Yuezhang.
> And VolumeDirty will be set again when updating the parent directory. It means that BootSector will be written twice in
> each writeback, that will shorten the life of the device.
I have the same concern.
>From a lifespan point of view, we should probably clear dirty with just sync_fs().
> sync_blockdev(sb->s_bdev);
> - if (exfat_clear_volume_dirty(sb))
> + if (__exfat_clear_volume_dirty(sb))
If SB_SYNCHRONOUS or SB_DIRSYNC is not present, isn't dirty cleared?
> +int exfat_clear_volume_dirty(struct super_block *sb) {
> + if (sb->s_flags & (SB_SYNCHRONOUS | SB_DIRSYNC))
> + return __exfat_clear_volume_dirty(sb);
Even when only one of SB or DIR is synced, dirty will be cleared.
Isn't it necessary to have both SB_SYNCHRONOUS and SB_DIRSYNC?
And, I think it would be better to use IS_SYNC or IS_DIRSYNC macro here.
BR
Powered by blists - more mailing lists