Re: [f2fs-dev] [PATCH] f2fs: prevent mounting devices with unsupported features

2021-04-05 Thread Chao Yu
Hi Ju Hyung, On 2021/4/5 16:40, Park Ju Hyung wrote: Mounting f2fs devices with future options leads to unwanted behaviors incurring errors and data destruction. Implement a long overdue safeguard to prevent mounting devices with unsupported features. This can be further extended to allow read

Re: [f2fs-dev] f2fs.resize makes errors in FS

2021-04-05 Thread Chao Yu
Hi beroal, Could you please apply below patch based on last fix patch and do the test again? [PATCH] resize.f2fs: fix to check free space before shrink On 2021/4/2 17:28, beroal wrote: I can't mount the resulting file system. ``` + set -e + F=/tmp/img + D=/dev/loop0 + M=/root/mnt/temp + dd bs

[f2fs-dev] [PATCH -next] f2fs: modify open brace '{' following function definitions

2021-04-05 Thread Yi Zhuang
Made suggested modifications from checkpatch in reference to ERROR: open brace '{' following function definitions go on the next line Signed-off-by: Yi Zhuang --- fs/f2fs/segment.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c in

[f2fs-dev] [PATCH] resize.f2fs: fix to check free space before shrink

2021-04-05 Thread Chao Yu
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

[f2fs-dev] [PATCH] f2fs: prevent mounting devices with unsupported features

2021-04-05 Thread Park Ju Hyung
Mounting f2fs devices with future options leads to unwanted behaviors incurring errors and data destruction. Implement a long overdue safeguard to prevent mounting devices with unsupported features. This can be further extended to allow read-only mounts on certain incompatible features, but that

[f2fs-dev] [PATCH] fsck: prevent working on devices with unsupported features

2021-04-05 Thread Park Ju Hyung
fsck should never work on devices with unsupported features. This is a real practical issue as fsck'ing a compressed image with an older version of fsck destroys the entire image. Non-rolling nature of popular distros such as Ubuntu is making the situation worse. Implement a long overdue safegua

[f2fs-dev] [PATCH] f2fs: prevent mounting devices with unsupported features

2021-04-05 Thread Park Ju Hyung
Mounting f2fs devices with future options leads to unwanted behaviors incurring errors and data destruction. Implement a long overdue safeguard to prevent mounting devices with unsupported features. This can be further extended to allow read-only mounts on certain incompatible features, but that