]> git.baikalelectronics.ru Git - kernel.git/commit
exfat: do not clear VolumeDirty in writeback
authorYuezhang Mo <Yuezhang.Mo@sony.com>
Sat, 19 Mar 2022 02:08:03 +0000 (11:08 +0900)
committerNamjae Jeon <linkinjeon@kernel.org>
Fri, 1 Apr 2022 01:51:03 +0000 (10:51 +0900)
commitacdf96a669c99084ae25a8be2e8b4f14e118760d
tree7c60133f7d4c1e570978bc4ad5bd0df8b44d484f
parent49a0a0f0ab38d8f006f9c9fb64e4a7da888a37f4
exfat: do not clear VolumeDirty in writeback

Before this commit, VolumeDirty will be cleared first in
writeback if 'dirsync' or 'sync' is not enabled. If the power
is suddenly cut off after cleaning VolumeDirty but other
updates are not written, the exFAT filesystem will not be able
to detect the power failure in the next mount.

And VolumeDirty will be set again but not cleared when updating
the parent directory. It means that BootSector will be written at
least once in each write-back, which will shorten the life of the
device.

Reviewed-by: Andy Wu <Andy.Wu@sony.com>
Reviewed-by: Aoyama Wataru <wataru.aoyama@sony.com>
Signed-off-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
fs/exfat/file.c
fs/exfat/namei.c
fs/exfat/super.c