WSL2-Linux-Kernel/fs/f2fs
Changman Lee 7d79e75f64 f2fs: save device node number into f2fs_inode
This patch stores inode->i_rdev into on-disk inode structure.

Alun reported that:
 aspire tmp # mount -t f2fs /dev/sdb mnt
 aspire tmp # mknod mnt/sda1 b 8 1
 aspire tmp # mknod mnt/null c 1 3
 aspire tmp # mknod mnt/console c 5 1
 aspire tmp # ls -l mnt
 total 2
 crw-r--r-- 1 root root 5, 1 Jan 22 18:44 console
 crw-r--r-- 1 root root 1, 3 Jan 22 18:44 null
 brw-r--r-- 1 root root 8, 1 Jan 22 18:44 sda1
 aspire tmp # umount mnt
 aspire tmp # mount -t f2fs /dev/sdb mnt
 aspire tmp # ls -l mnt
 total 2
 crw-r--r-- 1 root root 0, 0 Jan 22 18:44 console
 crw-r--r-- 1 root root 0, 0 Jan 22 18:44 null
 brw-r--r-- 1 root root 0, 0 Jan 22 18:44 sda1

In this report, f2fs lost the major/minor numbers of device files after umount.
The reason was revealed that f2fs does not store the inode->i_rdev to the
on-disk inode data structure.

So, as the other file systems do, f2fs also stores i_rdev into the i_addr fields
in on-disk inode structure without any on-disk layout changes.
Note that, this bug is limited to device files made by mknod().

Reported-and-Tested-by: Alun Jones <alun.linux@ty-penguin.org.uk>
Signed-off-by: Changman Lee <cm224.lee@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2013-02-12 07:15:00 +09:00
..
Kconfig f2fs: resolve build failures 2012-12-11 13:43:43 +09:00
Makefile f2fs: update Kconfig and Makefile 2012-12-11 13:43:42 +09:00
acl.c f2fs: avoid null dereference in f2fs_acl_from_disk 2013-01-04 09:46:27 +09:00
acl.h f2fs: adjust kernel coding style 2012-12-11 13:43:42 +09:00
checkpoint.c f2fs: add __init to functions in init_f2fs_fs 2013-01-22 10:48:38 +09:00
data.c f2fs: support swapfile 2013-01-22 10:48:58 +09:00
debug.c f2fs: fix the debugfs entry creation path 2013-01-15 20:19:15 +09:00
dir.c f2fs: avoid redundant time update for parent directory in f2fs_delete_entry 2013-01-14 09:43:27 +09:00
f2fs.h f2fs: add __init to functions in init_f2fs_fs 2013-01-22 10:48:38 +09:00
file.c f2fs: add remap_pages as generic_file_remap_pages 2013-01-22 10:48:58 +09:00
gc.c f2fs: add comments of start_bidx_of_node 2013-01-22 10:48:59 +09:00
gc.h f2fs: adjust kernel coding style 2012-12-11 13:43:42 +09:00
hash.c f2fs: unify string length declarations and usage 2012-12-28 11:27:53 +09:00
inode.c f2fs: save device node number into f2fs_inode 2013-02-12 07:15:00 +09:00
namei.c f2fs: unify string length declarations and usage 2012-12-28 11:27:53 +09:00
node.c f2fs: avoid issuing small bios due to several dirty node pages 2013-01-22 10:48:59 +09:00
node.h f2fs: adjust kernel coding style 2012-12-11 13:43:42 +09:00
recovery.c f2fs: use _safe() version of list_for_each 2013-01-22 10:49:00 +09:00
segment.c f2fs: revisit the f2fs_gc flow 2013-01-10 07:42:59 +09:00
segment.h f2fs: fix equation of has_not_enough_free_secs() 2012-12-28 11:24:10 +09:00
super.c f2fs: add __init to functions in init_f2fs_fs 2013-01-22 10:48:38 +09:00
xattr.c f2fs: add f2fs_balance_fs in several interfaces 2013-01-11 15:09:17 +09:00
xattr.h f2fs: adjust kernel coding style 2012-12-11 13:43:42 +09:00