Commit Graph

780 Commits

Author SHA1 Message Date
Wang Xiaojun
1228009520 f2fs-tools: rebuild the quota inode if it is corrupted
If the following process returns an error,
the quota inode, not the quota file, is damaged.
(fsck_chk_quota_node-->fsck_chk_node_blk-->sanity_check_nid)
The fsck does not have a process to rebuild the quota inode.

Because sanity_check_nid is not passed, fsck->nat_area_bitmap
can not be cleared, and then the NAT of quota will be nullify
during fix_nat_entries.

During the next fsck check, the quota inode check fails
because the address of the quota inode changes to 0.
In addition, in fsck_chk_quota_files-->f2fs_filesize_update,
data is written to address 0.

Therefore, when the quota inode is corrupted, we need to rebuild it.

Signed-off-by: Wang Xiaojun <wangxiaojun11@huawei.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-07-22 10:54:37 -07:00
Daeho Jeong
9ee091e819 f2fs-tools: add periodic check in kernel version check
In previous, we did a full scan right after kernel version is changed
and it triggered many unnecessary full scan whenever a newly built
kernel is downloaded. Plus, we are lack of a periodic health check of
on-disk filesystem images. So, I added a monthly periodic check after
a new vesion is updated.

Signed-off-by: Daeho Jeong <daehojeong@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-07-19 11:29:12 -07:00
Jaegeuk Kim
1bc76585d5 dump.f2fs: minor clean ups
This patch cleans up, pointed by Chao.

Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-07-13 16:15:35 -07:00
Wang Xiaojun
69952e3e23 f2fs-tools: fix wrong value of reserve_new_block parameter in page_symlink
In page_symlink, reserve_new_block applies address for data block,
not for inodes. Therefore, is_inode is set to 0.

Signed-off-by: Wang Xiaojun <wangxiaojun11@huawei.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-07-07 10:46:30 -07:00
Daeho Jeong
76d2a9199f f2fs-tools: add extent cache for each file
This patch adds an extent cache for ro partition.

Signed-off-by: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-06-23 09:02:46 -07:00
Jaegeuk Kim
8d464ee16f f2fs-tools: fix wrong file offset
This fixes wrong file offset updates, since we should not do (*ofs)++; for
indirect node blocks.

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-06-23 09:02:00 -07:00
Jaegeuk Kim
acd2518e26 fsck|dump.f2fs: add -M to get file map
This option shows all the file names in the disk.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-06-23 09:01:37 -07:00
Jaegeuk Kim
027488ef5d mkfs.f2fs: remove android features for RO
We don't need to enable all android features for RO.

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-06-23 08:51:30 -07:00
Aravind Ramesh
e01ad31081 f2fs-tools: fix metadata region overlap with zoned block device zones
For a volume using a zoned block device without conventional zones
(e.g. a NVMe ZNS drive), a regular block device must be used to store
metadata so that in-place metadata writes can be executed. The zoned
block device cannot contain any metadata blocks requiring in-place
update (e.g. bitmap blocks). When formatting a volume that contains
host managed zoned block devices, make sure that the conventional device
used to store metadata is large enough to avoid write errors.

Signed-off-by: Aravind Ramesh <aravind.ramesh@wdc.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-06-22 08:09:58 -07:00
Robin Hsu
f3b93bf5b8 sload.f2fs: Reword "IMMUTABLE" in strings/comments
Since the IMMUTABLE flag for compression is now changed
to F2FS_COMPRESS_RELEASED, some 'IMMUTABLE' words should be changed too:
	1. sload help page
	2. inline comments

Signed-off-by: Robin Hsu <robinhsu@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-06-22 08:09:57 -07:00
Jaegeuk Kim
820b5e3723 sload.f2fs: use F2FS_COMPRESS_RELEASED instead of IMMUTABLE bit
Let's use F2FS_COMPRESS_RELEASED to disallow writes only.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-05-26 10:07:46 -07:00
Jaegeuk Kim
1d2683f551 f2fs-tools: support small RO partition
This patch adds a readonly feature on small partitions by eliminating
on-disk layout for data writes such as provisioning/reserved space and
SSA.

This requires f2fs updates to understand RO feature in superblock.

Tested 4 cases:
 sload.f2fs -c -a lz0 -f kernel/fs $DEV
 sload.f2fs -c -a lz4 -f kernel/fs $DEV
 sload.f2fs -c -r -a lz4 -f kernel/fs $DEV
 sload.f2fs -c -L 3 -r -a lz4 -f kernel/fs $DEV

after:
 mkfs.f2fs -O ro,compression,extra_attr -f $DEV
 fsck.f2fs $DEV

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-05-26 10:07:43 -07:00
Jaegeuk Kim
a9594c6f56 fsck.f2fs: add "-l" to show the layout information
This patch add an option to print out superblock and checkpoint only.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-05-26 07:43:28 -07:00
Jaegeuk Kim
38e3115c7f f2fs_io: add to show immutable bit
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-05-26 06:24:06 -07:00
Dongwoo Lee
6afd3e9df0 tools: Introduce f2fslabel
Although many other filesystems provide a tool for changing volume
label, e.g. e2label for ext filesystem, but f2fs has no way to change
volume label except set it while formatting with mkfs.f2fs.

This introduces f2fslabel, simple tool for changing label of f2fs
volume.

Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-05-24 10:10:52 -07:00
lijiazi
3218ff95d9 f2fs-tools: correct get kernel version logic
Current implementation, If define WITH_KERNEL_VERSION
get_kernel_uname_version just return release info, not define
WITH_KERNEL_VERSION, return release and version info.
So remove "!" in get_kernel_uname_version, make logic more clear.

Signed-off-by: lijiazi <lijiazi@xiaomi.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-05-19 19:15:25 -07:00
Seung-Woo Kim
19d49b51bd dump.f2fs: fix memory leak caused by dump_node_blk()
Fix to free node_blk when nid is 0 from dump_node_blk().

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-05-10 22:10:40 -07:00
Seung-Woo Kim
15d4d7be94 fsck.f2fs: fix memory leak caused by fsck_chk_orphan_node()
With invalid node info from fsck_chk_orphan_node(), orphan_blk
and new_blk are not freed. Fix memory leak in the path.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-05-10 22:10:37 -07:00
Seung-Woo Kim
1900c22ed2 mkfs.f2fs: fix memory leak in not enough segments error path
In not enough segements error path of f2fs_write_check_point_pack(),
cp_payload is not freed. Fix the error path.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-05-10 08:46:33 -07:00
Seung-Woo Kim
5cc365c1e7 resize.f2fs: fix memory leak caused by migrate_nat()
Alloced nat_block doesn't freed from migrate_nat(). Fix to free
nat_block.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-05-10 08:46:23 -07:00
Jaegeuk Kim
870915f282 f2fs_io: split definition check for crypto ioctl
This patch fixes undefined FSCRYPT_POLICY_V1 in old distribution.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-05-10 08:46:08 -07:00
Michael Lass
91f9db23f6 fsck.f2fs: update kernel version in superblock on forced check
In 1126e38 (fsck.f2fs: add --{no-}kernel-check to bypass kernel version diff or
not) the automatic check on a kernel version change was made optional and
disabled by default on non-Android systems. This also disabled the update of
the kernel version stored in the superblock if --kernel-check is not given.
Restore the update in case a full check is forced via -y or -f to properly
reflect the version in the superblock.

Signed-off-by: Michael Lass <bevan@bi-co.net>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-05-10 08:45:32 -07:00
Robin Hsu
1531853eb7 f2fs_io: Add get file name encryption mode
This patch add an ioctl to get filename encryption mode.

Signed-off-by: Robin Hsu <robinhsu@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2021-04-22 08:48:30 -07:00
Jaehoon Chung
3bfcca8c81 f2fs-tool: increase debug level from 0 to 1 in migrate_block
Increase debug level from 0 to 1 in migrate_block.
It seems that doesn't need to display debug message by default.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-04-19 09:26:30 -07:00
Chao Yu
5263ae25fb resize.f2fs: fix to check free space before shrink
Otherwise, after shrink, kernel will report below error message
when we mount the image:

F2FS-fs (loop0): invalid crc_offset: 0
F2FS-fs (loop0): Wrong valid_user_blocks: 16404, user_block_count: 13312
F2FS-fs (loop0): Failed to get valid F2FS checkpoint
mount(2) system call failed: Structure needs cleaning.

Reported-and-tested-by: beroal <me@beroal.in.ua>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-04-12 11:21:15 -07:00
Chao Yu
159752dd3c resize.f2fs: fix wrong sit/nat bitmap during rebuild_checkpoint()
As beroal <me@beroal.in.ua> reported: f2fs image can be corrupted
after below testcase:

1. truncate -s $((256*1024*1024)) img
2. mkfs.f2fs -f img
3. mount -t f2fs -o loop img /mnt
4. xfs_io -f /mnt/file -c "pwrite 0 2M" -c "fsync"
5. umount /mnt
6. resize.f2fs -s -t 262144 img
7. fsck.f2fs img

The root cause is we forgot to copy original sit/nat bitmap to
new checkpoint during rebuild_checkpoint(), fix it.

Reported-and-testd-by: beroal <me@beroal.in.ua>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-04-12 11:20:56 -07:00
Jaegeuk Kim
98e64635bd resize.f2fs: add force option to rewrite broken calculation
This patch adds "-f" for resize.f2fs to fix broken resized f2fs.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-04-01 20:25:32 -07:00
Jaegeuk Kim
f056fbeff0 resize.f2fs: fix wrong ovp calculation
beroal reported a mount failure due to broken valid_user_blocks.
[ 6890.647749] F2FS-fs (loop0): Wrong valid_user_blocks: 16040048,
user_block_count: 10016768

From fsck,

segment_count_main                      [0x    9a95 : 39573]
-> 39573 * 2MB = 78GB as user space

overprov_segment_count                  [0x    4e29 : 20009]
-> 20009 * 2MB = 40GB as overprovisioned space which user can't see.

But,
[FSCK] valid_block_count matching with CP             [Ok..] [0xf4c070]
-> 0xf4c070 = 16040048

valid_block_count                       [0x  f4c070 : 16040048]
-> So, this is correct.

It turns out resize.f2fs gave very large and wrong overprovisioning space
result in shortage of user blocks. The root cause was f2fs_get_usable_segments()
didn't consider resize case which needs segment_count_main from new superblock.

Fixes: f8410857b7 ("f2fs-tools: zns zone-capacity support")
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-04-01 20:19:10 -07:00
Daniel Abrecht
80dba0f975 Add -P option to preserve file owner
I use user namespaces & debootstrap to bootstrap a system, and then
copy that into an image using sload.f2fs. However, without an option to
preserve the owner user & group of files, some files end up being owned
by the wrong user / group (0:0), which causes all kinds of other issues

This patch adds an option -P to preserve the user and group of files.

Signed-off-by: Daniel Abrecht <public@danielabrecht.ch>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-03-18 09:55:14 -07:00
Junyong Sun
f0fda11925 libf2fs: fix memory leak caused by get_rootdev()
memory which malloc for uevent don't free at get_rootdev(),
it would cause memory leak, so free it before return.

Signed-off-by: Junyong Sun <sunjy516@gmail.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-03-01 20:22:56 -08:00
Park Ju Hyung
5144f2f71b mkfs.f2fs: add VM disk files to hot data types
Similar to .db files, these are randomly updated extremely frequently.

Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-02-23 00:08:30 -08:00
Jaegeuk Kim
73c0871641 libzoned: use blk_zone_v2 and blk_zone_report_v2 by default
Old blk_zone and blk_zone_report should be compatible with v2.
And, old blk_zone_report uses reserved[4] which breaks the build.

struct blk_zone_report {
	__u64		sector;
	__u32		nr_zones;
	__u8		reserved[4];
	struct blk_zone zones[0];
};

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2020-12-28 10:57:41 -08:00
Jaegeuk Kim
9cb5150afa f2fs-tools: fix wrong blk_zone_rep_v2 definition
If HAVE_BLK_ZONE_REP_V2 id defined, we should set v2.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2020-12-23 11:33:24 -08:00
Jaegeuk Kim
15474db2b3 mkfs.f2fs: allocate zones together to avoid random access
This patch allocates zones to initial logs together, if it's on zoned device.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2020-12-23 11:32:33 -08:00
Jaegeuk Kim
316e128fe3 mkfs.f2fs: adjust zone alignment when using multi-partitions
When formatting conventional partition with zoned one, we should align
the starting block address of next device to the zone size.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2020-12-23 11:32:32 -08:00
Jaegeuk Kim
cc57f2c7da fsck.f2fs: fix alignment on multi-partition support
- mkfs.f2fs -s 4 -c second_dev first_dev
- fsck.f2fs first

Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 512
Info: total sectors = 69668488 (34017 MB)
Segment count (19128) mismatch with total segments from devices (19130)	Can't find a valid F2FS superblock at 0x0
Segment count (19128) mismatch with total segments from devices (19130)	Can't find a valid F2FS superblock at 0x1

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2020-12-23 11:32:32 -08:00
John A. Leuenhagen
ff7172e69f f2fs-tools: Miscellaneous cleanup to README.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2020-12-23 11:32:32 -08:00
John A. Leuenhagen via Linux-f2fs-devel
2b2641794f mkfs.f2fs.8: Better document the -g argument.
To use Android defaults, you must use `-g android`. However, the man
page previously implied that you need only use `-g`.

Since you must specify `android`, I figured it would be appropriate
to name that field `default-options` in the man page. If there was ever
a reason to have a different set of default options, the `-g` option
could be used with a new `default-options` value, i.e. `-g example`.

Signed-off-by: John A. Leuenhagen <john@zlima12.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2020-12-23 11:32:32 -08:00
John A. Leuenhagen via Linux-f2fs-devel
e05afe5dfa mkfs.f2fs.8: fix formatting for -l parameter in man page
Signed-off-by: John A. Leuenhagen <john@zlima12.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2020-12-23 11:32:32 -08:00
Jordan Webb
747b74cb9c f2fs-tools: Make sload.f2fs reproduce hard links
If sload.f2fs encounters a file with nr_links > 1, it will mark it
as a possible hard link by remembering the original device and
inode. When sload.f2fs creates the file, it will check if it has
already created a file for the same original device and inode. If
so, it will add the original inode to the directory and increment
the number of links to it, instead of writing a new inode.

This allows sload.f2fs to accurately reproduce a directory tree that
contains hard links, such as those created by ostree. Without this
patch, directory trees containing hard links result in the content of
the files being duplicated.

This is version 2 of the patch; it has been rebased against the dev
branch and includes a fix from Jaegeuk Kim to avoid building data
contents twice on hard linked files.

Co-authored-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Jordan Webb <jordan@getseam.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2020-12-23 11:32:32 -08:00
Robin Hsu
b585244e72 f2fs-tools:sload.f2fs compression support
Add F2FS compression support for sload
* Support file extension filter, either default-accept or default-deny
  policy
* Support choice of compression algorithm, LZO (version 2) or LZ4
  (default)
* Support custom log of cluster size
* Support minimum number of compressed blocks per cluster (default 1).
  A cluster will not be compressed if the number can not be met.
* suuport -r (read-only) option
  This releases compressed blocks to secure free space in advance. Note that,
  all compressed files will have the immutable bit.
* Added manpage update
* Remove unecessary qbuf allocation (Jaegeuk, suggested by Satya)

Signed-off-by: Robin Hsu <robinhsu@google.com>
[Jaegeuk Kim: fix some bugs and refactor names]
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2020-12-23 11:32:31 -08:00
Daeho Jeong
7b63f7b399 f2fs_io: add compress/decompress commands
Added new commands, compress and decompress, to support
F2FS_IOC_COMPRESS_FILE and F2FS_IOC_DECOMPRESS_FILE.

Signed-off-by: Daeho Jeong <daehojeong@google.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2020-12-10 05:51:08 -08:00
Robin Hsu
457392a032 f2fs-tools: Added #ifdef WITH_func
Add proprocessor defines (options) 'WITH_func',
where func = DUMP, DEFRAG, RESIZE, or SLOAD

Signed-off-by: Robin Hsu <robinhsu@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2020-12-07 09:25:14 -08:00
Victor Westerhuis
d322d47fa4 f2fs-tools: fix a few spelling errors in f2fs-tools
typo fix.

Signed-off-by: Victor Westerhuis <victor@westerhu.is>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2020-12-07 09:25:14 -08:00
Robin Hsu
fcd5cd0b52 f2fs-tools: skipped to end on error syntax error
When error were found, we won't need to do any initialization but
just quit.

Signed-off-by: Robin Hsu <robinhsu@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2020-12-07 09:25:14 -08:00
Jaegeuk Kim
31d30f0c49 mkfs.f2fs: show a message when compression is enabled
This patch adds a message when formatting the disk with compression.

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2020-12-07 09:25:14 -08:00
Daeho Jeong
1d4c7e7ce5 f2fs_io: add get/set compression option
Added new commands, get_coption and set_coption, to support
F2FS_IOC_GET_COMPRESS_OPTION and F2FS_IOC_SET_COMPRESS_OPTION.

Signed-off-by: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2020-12-07 09:25:14 -08:00
Robin Hsu
4bd7008291 Fix ASSERT() macro with '%' in the expression
Fix a compiling error triggered by ASSERT(exp), when exp contains '%'

(e.g. integer modular operator)

Signed-off-by: Robin Hsu <robinhsu@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2020-12-07 09:25:14 -08:00
Robin Hsu
ca0ed8a66f f2fs-toos: fsck.f2fs Fix bad return value
'ret' should not have been used here: otherwise, it would be wrongly used
as the error code and then be returned from main().

Signed-off-by: Robin Hsu <robinhsu@google.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2020-12-07 09:25:14 -08:00
Chao Yu
c954e7cc4b fsck.f2fs: do xnid sanity check only during fsck
As Eric reported:

Commit 7a22451bc2 ("fsck.f2fs: fix to check validation of i_xattr_nid")

This commit caused a regression where 'dump.f2fs -i <inode> <device>'
now segfaults if the inode has any extended attributes.

It's because read_all_xattrs() now calls fsck_sanity_check_nid(), which
eventually dereferences f2fs_fsck::main_area_bitmap, which is NULL.

I'm not sure what was intended here.

Here's the output from gdb:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7f750fa in f2fs_test_bit (nr=1024, p=0x0) at libf2fs.c:304
304		return (mask & *addr) != 0;
(gdb) bt
    ntype=TYPE_XATTR, ni=0x7fffffffdd20) at fsck.c:449
    ntype=TYPE_XATTR, ni=0x7fffffffdd20) at fsck.c:495

fsck_sanity_check_nid() should only called from fsck.f2fs context, rather
than dump.f2fs, otherwise it may cause dereferencing structure fields of
fsck incorrectly.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
2020-12-07 09:25:14 -08:00