diff options
author | Tetsuhiro Kohada <kohada.t2@gmail.com> | 2020-07-31 14:58:26 +0900 |
---|---|---|
committer | Namjae Jeon <namjae.jeon@samsung.com> | 2020-08-12 08:31:13 +0900 |
commit | 7018ec68f08249de17cb131b324d5a48e89ed898 (patch) | |
tree | 357bdc1c10e5e03d3c6bd992f6087ccd0f2eaeb8 /fs/exfat/exfat_raw.h | |
parent | 4dc7d35e09ba78aa0a3bcaa9fad1c19952e018a7 (diff) |
exfat: retain 'VolumeFlags' properly
MediaFailure and VolumeDirty should be retained if these are set before
mounting.
In '3.1.13.3 Media Failure Field' of exfat specification describe:
If, upon mounting a volume, the value of this field is 1,
implementations which scan the entire volume for media failures and
record all failures as "bad" clusters in the FAT (or otherwise resolve
media failures) may clear the value of this field to 0.
Therefore, We should not clear MediaFailure without scanning volume.
In '8.1 Recommended Write Ordering' of exfat specification describe:
Clear the value of the VolumeDirty field to 0, if its value prior to
the first step was 0.
Therefore, We should not clear VolumeDirty after mounting.
Also rename ERR_MEDIUM to MEDIA_FAILURE.
Signed-off-by: Tetsuhiro Kohada <kohada.t2@gmail.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Diffstat (limited to 'fs/exfat/exfat_raw.h')
-rw-r--r-- | fs/exfat/exfat_raw.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/exfat/exfat_raw.h b/fs/exfat/exfat_raw.h index 350ce59cc324..6aec6288e1f2 100644 --- a/fs/exfat/exfat_raw.h +++ b/fs/exfat/exfat_raw.h @@ -14,9 +14,8 @@ #define EXFAT_MAX_FILE_LEN 255 -#define VOL_CLEAN 0x0000 -#define VOL_DIRTY 0x0002 -#define ERR_MEDIUM 0x0004 +#define VOLUME_DIRTY 0x0002 +#define MEDIA_FAILURE 0x0004 #define EXFAT_EOF_CLUSTER 0xFFFFFFFFu #define EXFAT_BAD_CLUSTER 0xFFFFFFF7u |