[f2fs-dev] [RFC PATCH 4/4] ext4, f2fs: support metadata encryption via dm-default-key

2024-10-18 Thread Eric Biggers via Linux-f2fs-devel
From: Eric Biggers Set the bi_skip_dm_default_key flag on bios that are targeting the contents of an encrypted file and therefore should not be en/decrypted by dm-default-key. Signed-off-by: Eric Biggers --- fs/crypto/inline_crypt.c | 14 +- fs/f2fs/data.c | 6 +- in

[f2fs-dev] [RFC PATCH 2/4] block: add the bi_skip_dm_default_key flag

2024-10-18 Thread Eric Biggers via Linux-f2fs-devel
From: Eric Biggers Add a flag bi_skip_dm_default_key to struct bio. This flag indicates that dm-default-key should not en/decrypt the bio, due to it targeting the contents of an encrypted file. When a bio is cloned, copy the bi_skip_dm_default_key flag. Signed-off-by: Eric Biggers --- block/

[f2fs-dev] [RFC PATCH 3/4] dm-default-key: add target for filesystem metadata encryption

2024-10-18 Thread Eric Biggers via Linux-f2fs-devel
From: Eric Biggers Add a new device-mapper target "dm-default-key" that is similar to dm-crypt but has two main differences: - It uses the blk-crypto API instead of the regular crypto API. This allows it to take advantage of inline encryption hardware such as that commonly built into UFS ho

[f2fs-dev] [RFC PATCH 0/4] dm-default-key: target for filesystem metadata encryption

2024-10-18 Thread Eric Biggers via Linux-f2fs-devel
This series adds "metadata encryption" support to ext4 and f2fs via a new device-mapper target dm-default-key. dm-default-key encrypts all data on a block device that isn't already encrypted by the filesystem. Except for the passthrough support, dm-default-key is basically the same as the propose

[f2fs-dev] [RFC PATCH 1/4] block: export blk-crypto symbols required by dm-default-key

2024-10-18 Thread Eric Biggers via Linux-f2fs-devel
From: Eric Biggers bio_crypt_set_ctx(), blk_crypto_init_key(), and blk_crypto_start_using_key() are needed to use inline encryption; see Documentation/block/inline-encryption.rst. Export them so that dm-default-key can use them. The only reason these weren't exported before was that inline encr

[f2fs-dev] [PATCH 1/2] f2fs_io: {set, clear}flags: support immutable flag correctly

2024-10-18 Thread Chao Yu via Linux-f2fs-devel
Hand over immutable flag clearing functionality from setflags to clearflags, since the flag name is immutable rather than noimmutable. And support setting functionality in subcommand setflags. Signed-off-by: Chao Yu --- man/f2fs_io.8 | 6 +++--- tools/f2fs_io/f2fs_io.c | 9 ++---

[f2fs-dev] [PATCH 2/2] f2fs_io: {set, clear}flags: support nocow flag

2024-10-18 Thread Chao Yu via Linux-f2fs-devel
This patch supports to set or clear nocow flag in f2fs_io Signed-off-by: Chao Yu --- man/f2fs_io.8 | 4 ++-- tools/f2fs_io/f2fs_io.c | 10 -- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/man/f2fs_io.8 b/man/f2fs_io.8 index e58244c..5041c1b 100644 --- a/man/f

[f2fs-dev] [syzbot] Monthly f2fs report (Oct 2024)

2024-10-18 Thread syzbot
Hello f2fs maintainers/developers, This is a 31-day syzbot report for the f2fs subsystem. All related reports/information can be found at: https://syzkaller.appspot.com/upstream/s/f2fs During the period, 3 new issues were detected and 0 were fixed. In total, 7 issues are still open and 47 have be

[f2fs-dev] [PATCH] f2fs: fix to convert log type to segment data type correctly

2024-10-18 Thread Chao Yu via Linux-f2fs-devel
This patch introduces a new helper log_type_to_seg_type() to convert log type to segment data type, and uses it to clean up opened codes in build_curseg(), and also it fixes to convert log type before use in do_write_page(). Signed-off-by: Chao Yu --- fs/f2fs/segment.c | 36 +

[f2fs-dev] [PATCH RFC] f2fs: revalidate empty segment when checkpoint is disabled

2024-10-18 Thread Chao Yu via Linux-f2fs-devel
If checkpoint is off, let's set segment as free once all newly written datas were removed, it fixes below case: dd if=/dev/zero of=f2fs.img bs=1M count=64 mkfs.f2fs -f f2fs.img mount -o checkpoint=disable:10% f2fs.img mnt dd if=/dev/zero of=mnt/file bs=1M count=19 sync rm mnt/file dd if=/dev/zero