[f2fs-dev] [PATCH] f2fs: fix to create selinux label during whiteout initialization

2024-02-06 Thread Chao Yu
generic/700 - output mismatch (see /media/fstests/results//generic/700.out.bad) --- tests/generic/700.out 2023-03-28 10:40:42.735529223 + +++ /media/fstests/results//generic/700.out.bad 2024-02-06 04:37:56.0 + @@ -1,2 +1,4 @@ QA output created by 700

[f2fs-dev] [RESEND PATCH v9 2/2] f2fs: Simplify the handling of cached insensitive names

2024-02-06 Thread Eugen Hristev via Linux-f2fs-devel
From: Gabriel Krisman Bertazi Keeping it as qstr avoids the unnecessary conversion in f2fs_match Reviewed-by: Eric Biggers Signed-off-by: Gabriel Krisman Bertazi [eugen.hris...@collabora.com: port to 6.8-rc3] Signed-off-by: Eugen Hristev --- fs/f2fs/dir.c | 53

[f2fs-dev] [RESEND PATCH v9 1/2] ext4: Simplify the handling of cached insensitive names

2024-02-06 Thread Eugen Hristev via Linux-f2fs-devel
From: Gabriel Krisman Bertazi Keeping it as qstr avoids the unnecessary conversion in ext4_match Reviewed-by: Eric Biggers Signed-off-by: Gabriel Krisman Bertazi [eugen.hris...@collabora.com: port to 6.8-rc3] Signed-off-by: Eugen Hristev --- fs/ext4/ext4.h | 2 +- fs/ext4/namei.c | 23

[f2fs-dev] [RESEND PATCH v9 0/2] Minor cleanup for case insensitive path

2024-02-06 Thread Eugen Hristev via Linux-f2fs-devel
Hello, I am trying to respin the series here : https://www.spinics.net/lists/linux-ext4/msg85081.html To make it easier to apply I split it into smaller chunks which address one single thing. This series will just convert to qstr the storage of the filename currently using fscrypt_str . Gabriel

[f2fs-dev] [PATCH] f2fs: support compress extension update via sysfs interface

2024-02-06 Thread Chao Yu
Introduce /sys/fs/f2fs//compress_extension to support adding/deleting compress extension via sysfs interface, in comparison to mount option, it's more easy to use and less authority issue for applications. Usage: - Query: cat /sys/fs/f2fs//compress_extension - Add: echo '[c|n]extension' >

Re: [f2fs-dev] [PATCH 3/3] f2fs: kill zone-capacity support

2024-02-06 Thread Jaegeuk Kim
On 02/06, Jaegeuk Kim wrote: > Since we don't see any user, let's kill. > > Signed-off-by: Jaegeuk Kim > --- > Documentation/ABI/testing/sysfs-fs-f2fs | 6 -- > fs/f2fs/debug.c | 7 +- > fs/f2fs/f2fs.h | 5 -- > fs/f2fs/file.c

[f2fs-dev] [PATCH v2 2/4] f2fs: fix panic issue in update_sit_entry

2024-02-06 Thread Zhiguo Niu
When CONFIG_F2FS_CHECK_FS is not enabled, f2fs_bug_on just printing warning, get_new_segment may get an out-of-bounds segment when there is no free segments. Then a block is allocated from this invalid segment, update_sit_entry will access the invalid bitmap address, cause system panic. Just as

[f2fs-dev] [PATCH v2 1/4] f2fs: correct counting methods of free_segments in __set_inuse

2024-02-06 Thread Zhiguo Niu
There is a corner scenario on a small-capacity partition with 64MB size: 1. The main area has a total of 24 segments, and there are no free segments left shown from the free_segmap bitmap and free_secmap in free_segmap_info. -

[f2fs-dev] [PATCH v2 3/4] f2fs: enhance judgment conditions of GET_SEGNO

2024-02-06 Thread Zhiguo Niu
NULL_SEGNO should also be returned when the blk_addr value is out-of-bound main area even __is_valid_data_blkaddr return true. For example, a 64MB partition with total 24 main segments has no any free segments left, then a new wrtie request use get_new_segment may get a out-of-bound segno 24 if

[f2fs-dev] [PATCH v2 4/4] f2fs: stop checkpoint when get a out-of-bounds segment

2024-02-06 Thread Zhiguo Niu
There is low probability that an out-of-bounds segment will be got on a small-capacity device. In order to prevent subsequent write requests allocating block address from this invalid segment, which may cause unexpected issue, stop checkpoint should be performed. Also introduce a new stop cp

[f2fs-dev] [PATCH v2 0/4] f2fs: fix panic issue in small capacity device

2024-02-06 Thread Zhiguo Niu
A panic issue happened in a reboot test in small capacity device as following: 1.The device size is 64MB, and main area has 24 segments, and CONFIG_F2FS_CHECK_FS is not enabled. 2.There is no any free segments left shown in free_segmap_info, then another write request cause get_new_segment get a

[f2fs-dev] [PATCH 1/3] f2fs: deprecate io_bits

2024-02-06 Thread Jaegeuk Kim
Let's deprecate an unused io_bits feature to save CPU cycles and memory. Signed-off-by: Jaegeuk Kim --- Documentation/filesystems/f2fs.rst | 2 - fs/f2fs/data.c | 73 + fs/f2fs/f2fs.h | 25 ++--- fs/f2fs/file.c

[f2fs-dev] [PATCH 3/3] f2fs: kill zone-capacity support

2024-02-06 Thread Jaegeuk Kim
Since we don't see any user, let's kill. Signed-off-by: Jaegeuk Kim --- Documentation/ABI/testing/sysfs-fs-f2fs | 6 -- fs/f2fs/debug.c | 7 +- fs/f2fs/f2fs.h | 5 -- fs/f2fs/file.c | 6 +- fs/f2fs/gc.c

[f2fs-dev] [PATCH 2/3] f2fs: use BLKS_PER_SEG, BLKS_PER_SEC, and SEGS_PER_SEC

2024-02-06 Thread Jaegeuk Kim
No functional change. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 10 ++-- fs/f2fs/debug.c | 6 +-- fs/f2fs/f2fs.h | 19 +--- fs/f2fs/file.c | 12 ++--- fs/f2fs/gc.c | 40 fs/f2fs/node.c | 4 +- fs/f2fs/node.h | 4 +-

Re: [f2fs-dev] [PATCH v7] f2fs: unify the error handling of f2fs_is_valid_blkaddr

2024-02-06 Thread Zhiguo Niu
On Tue, Feb 6, 2024 at 11:36 AM Chao Yu wrote: > > On 2024/2/6 11:32, Jaegeuk Kim wrote: > > On 02/05, Chao Yu wrote: > >> On 2024/2/5 11:30, Zhiguo Niu wrote: > >>> There are some cases of f2fs_is_valid_blkaddr not handled as > >>> ERROR_INVALID_BLKADDR,so unify the error handling about all of >

[f2fs-dev] [PATCH 3/3] f2fs: support swap file pinning for zoned devices

2024-02-06 Thread Daeho Jeong
From: Daeho Jeong Support swap file pinning for zoned devices Signed-off-by: Daeho Jeong Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 54 -- 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c

[f2fs-dev] [PATCH 2/3] f2fs: support file pinning for zoned devices

2024-02-06 Thread Daeho Jeong
From: Daeho Jeong Support file pinning with conventional storage area for zoned devices Signed-off-by: Daeho Jeong Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h| 14 +- fs/f2fs/file.c| 24 fs/f2fs/gc.c | 14 +++--- fs/f2fs/segment.c | 71

[f2fs-dev] [PATCH 1/3] f2fs: separate f2fs_gc_range() to use GC for a range

2024-02-06 Thread Daeho Jeong
From: Daeho Jeong Make f2fs_gc_range() an extenal function to use it for GC for a range. Signed-off-by: Daeho Jeong Signed-off-by: Jaegeuk Kim --- fs/f2fs/gc.c | 49 - 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/fs/f2fs/gc.c