lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ