]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
f2fs: fix to reserve space for IO align feature
authorChao Yu <chao@kernel.org>
Sat, 11 Dec 2021 13:27:36 +0000 (21:27 +0800)
committerPaolo Pisati <paolo.pisati@canonical.com>
Fri, 28 Jan 2022 10:03:27 +0000 (11:03 +0100)
commit2bc06e10d2947e8dc5bfac32f16168265a8f0888
treea73112c8b06e4c2b53d081e7c25bcb169f345736
parent25f598b2fcb4362b2492068bbc1bfd10c3734c11
f2fs: fix to reserve space for IO align feature

BugLink: https://bugs.launchpad.net/bugs/1959376
commit 300a842937fbcfb5a189cea9ba15374fdb0b5c6b upstream.

https://bugzilla.kernel.org/show_bug.cgi?id=204137

With below script, we will hit panic during new segment allocation:

DISK=bingo.img
MOUNT_DIR=/mnt/f2fs

dd if=/dev/zero of=$DISK bs=1M count=105
mkfs.f2fe -a 1 -o 19 -t 1 -z 1 -f -q $DISK

mount -t f2fs $DISK $MOUNT_DIR -o "noinline_dentry,flush_merge,noextent_cache,mode=lfs,io_bits=7,fsync_mode=strict"

for (( i = 0; i < 4096; i++ )); do
name=`head /dev/urandom | tr -dc A-Za-z0-9 | head -c 10`
mkdir $MOUNT_DIR/$name
done

umount $MOUNT_DIR
rm $DISK

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
fs/f2fs/f2fs.h
fs/f2fs/segment.h
fs/f2fs/super.c
fs/f2fs/sysfs.c