Kernel Tree For Xiaomi 11 Lite NE 5G
Go to file
Tetsuhiro Kohada bfea1fb6bb 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>
2020-09-10 09:02:45 +09:00
.travis_cmd_wrapper.pl exfat: add travis-CI build and test support 2020-02-03 22:43:47 +09:00
.travis_get_mainline_kernel exfat: add travis-CI build and test support 2020-02-03 22:43:47 +09:00
.travis.yml exfat: enable generic/452 test 2020-06-17 22:08:38 +09:00
balloc.c exfat: remove EXFAT_SB_DIRTY flag 2020-06-17 22:08:32 +09:00
cache.c exfat: initial commit 2020-02-03 21:47:19 +09:00
dir.c exfat: fix wrong hint_stat initialization in exfat_find_dir_entry() 2020-07-03 12:40:30 +09:00
exfat_fs.h exfat: retain 'VolumeFlags' properly 2020-09-10 09:02:45 +09:00
exfat_raw.h exfat: retain 'VolumeFlags' properly 2020-09-10 09:02:45 +09:00
fatent.c exfat: optimize exfat_zeroed_cluster() 2020-07-03 12:40:21 +09:00
file.c exfat: retain 'VolumeFlags' properly 2020-09-10 09:02:45 +09:00
inode.c exfat: retain 'VolumeFlags' properly 2020-09-10 09:02:45 +09:00
Kconfig exfat: initial commit 2020-02-03 21:47:19 +09:00
Makefile exfat: linux 4.16 kernel build support 2020-02-04 09:18:10 +09:00
misc.c exfat: fix build error on 32bit & 4.19 lower kernel version 2020-07-03 12:40:25 +09:00
namei.c exfat: retain 'VolumeFlags' properly 2020-09-10 09:02:45 +09:00
nls.c exfat: fix name_hash computation on big endian systems 2020-07-17 10:23:26 +09:00
README.md exfat: fix typo 2020-02-10 21:35:58 +09:00
super.c exfat: retain 'VolumeFlags' properly 2020-09-10 09:02:45 +09:00

exFAT filesystem

This is the exfat filesystem for support from the linux 4.1 kernel to the latest kernel.

Installing as a stand-alone module

Install prerequisite package for Fedora, RHEL:

	yum install kernel-devel-$(uname -r)

Build step:

	make
	sudo make install

To load the driver manually, run this as root:

	modprobe exfat

Installing as a part of the kernel

  1. Let's take [linux] as the path to your kernel source dir.
	cd [linux]
	cp -ar exfat [linux]/fs/
  1. edit [linux]/fs/Kconfig
	source "fs/fat/Kconfig"
	+source "fs/exfat/Kconfig"
	source "fs/ntfs/Kconfig"
  1. edit [linux]/fs/Makefile
	obj-$(CONFIG_FAT_FS)          += fat/
	+obj-$(CONFIG_EXFAT_FS)       += exfat/
	obj-$(CONFIG_BFS_FS)          += bfs/
  1. make menuconfig and set exfat
	File systems  --->
		DOS/FAT/NT Filesystems  --->
			<M> exFAT filesystem support
			(utf8) Default iocharset for exFAT

build your kernel