]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix a bug with dirty file system handling.
authordelphij <delphij@FreeBSD.org>
Mon, 27 Apr 2020 02:01:48 +0000 (02:01 +0000)
committerdelphij <delphij@FreeBSD.org>
Mon, 27 Apr 2020 02:01:48 +0000 (02:01 +0000)
commitffa396196c4c0fcf8a6bf4d1dd88ffb9ce531ccc
tree6079001bcede31fcfda091b761c275f3bc3214b5
parente6473040e0683a4ef4faa39ea6bb7d90991a77e4
Fix a bug with dirty file system handling.

r356313 broke handling of dirty file system because we have restricted
the correction of "odd" byte sequences to checkfat(), and as a result
the dirty bit is never cleared.  The old fsck_msdosfs code would write
FAT twice to fix the dirty bit, which is also not ideal.

Fix this by introducing a new rountine, cleardirty() which will perform
the set of clean bit only, and use it in checkfilesys() if we thought
the file system was dirty.

Reviewed by: cem, emaste
MFC after: 3 day
Differential Revision: https://reviews.freebsd.org/D24581
sbin/fsck_msdosfs/check.c
sbin/fsck_msdosfs/ext.h
sbin/fsck_msdosfs/fat.c