RE: [PATCH] exfat: do not clear VolumeDirty in writeback

From: Yuezhang.Mo@xxxxxxxx
Date: Tue Mar 08 2022 - 05:56:23 EST


Hi Namjae Jeon,

> > +int exfat_clear_volume_dirty(struct super_block *sb) {
> > + if (sb->s_flags & (SB_SYNCHRONOUS | SB_DIRSYNC))
> How about moving exfat_clear_volume_dirty() to IS_DIRSYNC() check in each
> operations instead of this check?

I found that VolumeDirty keeps VOL_DIRTY until sync or umount regardless of sync or dirsync enabled,
because there is no paired call to exfat_set_volume_dirty()/exfat_clear_volume_dirty() in __exfat_write_inode().

If exfat_set_volume_dirty()/exfat_clear_volume_dirty() is called in pairs in __exfat_write_inode(),
it will cause frequent writing of bootsector.

So, how about removing exfat_clear_volume_dirty() from each operations, except in exfat_sync_fs()?


Best Regards,
Yuezhang Mo