hardkernel / linux

Linux kernel source tree
Other
427 stars 408 forks source link

F2FS inline_data support #260

Open bondde opened 7 years ago

bondde commented 7 years ago

Odroid C1 3.10.y kernel lacks support for F2FS inline_data option.

# mount -t f2fs /dev/sda1 /mnt/usb/ -o inline_data mount: wrong fs type, bad option, bad superblock on /dev/sda1, missing codepage or helper program, or other error

I almost shat my pants when I thought my backup data was gone when lots of text files were empty. Before doing something that cannot be undone I fortunately checked that USB stick with my laptop and everything were fine.

This can be easily reproduced by mounting removable media to computer with modern kernel

# cd /mnt
# mount -t f2fs /dev/sda1 /mnt/usb/ -o noinline_data
# echo "noinline_data" > usb/noinline_data
# sync
# umount usb
# mount -t f2fs /dev/sda1 /mnt/usb/ -o inline_data
# echo "inline_data" > usb/inline_data
# sync
# umount usb

And then on Odroid C1 with 3.10.y kernel

# cd /mnt
# mount -t f2fs /dev/sda1 /mnt/usb
# cat usb/inline_data
# cat usb/noinline_data 
noinline_data
bkrepo commented 7 years ago

3.10.y kernel does not have f2fs inline data feature. It needs to merge below's patchset in order to use f2fs inline data: https://lwn.net/Articles/573408/