[f2fs-dev] [PATCH] f2fs-tools: skip check device mount state in sparse mode

2024-01-25 Thread zhangxirui via Linux-f2fs-devel
In sparse mode we just read or write to a sparse file not a block device so no need to check device mount state in sparse mode. Signed-off-by: zhangxirui --- lib/libf2fs.c | 4 1 file changed, 4 insertions(+) diff --git a/lib/libf2fs.c b/lib/libf2fs.c index 2451201..5315de2 100644 --- a/li

Re: [f2fs-dev] [PATCH] f2fs-tools: allocate logs after conventional area for HM zoned devices

2024-01-25 Thread Chao Yu
On 2024/1/26 0:25, Daeho Jeong wrote: On Wed, Jan 24, 2024 at 7:34 PM Chao Yu wrote: +Cc Yongpeng Yang Daeho, Yongpeng reports a potential issue: if c.devices[0].total_segments is larger than segments of mainarea, c.cur_seg[CURSEG_HOT_NODE] will exceed end boundary of mainarea. Could you ple

Re: [f2fs-dev] [PATCH] f2fs: Support enhanced hot/cold data separation for f2fs

2024-01-25 Thread Luis Chamberlain
On Thu, Jan 25, 2024 at 08:47:39PM +, Matthew Wilcox wrote: > On Wed, Dec 07, 2022 at 12:51:13PM -0800, Luis Chamberlain wrote: > > On Wed, Nov 30, 2022 at 03:18:41PM +, Matthew Wilcox wrote: > > > From a filesystem point of view, you need to ensure that you handle folios > > > larger than

Re: [f2fs-dev] [PATCH] f2fs: Support enhanced hot/cold data separation for f2fs

2024-01-25 Thread Matthew Wilcox
On Wed, Dec 07, 2022 at 12:51:13PM -0800, Luis Chamberlain wrote: > On Wed, Nov 30, 2022 at 03:18:41PM +, Matthew Wilcox wrote: > > From a filesystem point of view, you need to ensure that you handle folios > > larger than PAGE_SIZE correctly. The easiest way is to spread the use > > of folios

Re: [f2fs-dev] [PATCH v3 04/10] fscrypt: Drop d_revalidate once the key is added

2024-01-25 Thread Gabriel Krisman Bertazi
Eric Biggers writes: > On Fri, Jan 19, 2024 at 03:47:36PM -0300, Gabriel Krisman Bertazi wrote: >> /* >> * When d_splice_alias() moves a directory's no-key alias to its plaintext >> alias >> * as a result of the encryption key being added, DCACHE_NOKEY_NAME must be >> * cleared. Note that we

Re: [f2fs-dev] [PATCH v3 02/10] fscrypt: Share code between functions that prepare lookup

2024-01-25 Thread Gabriel Krisman Bertazi
Eric Biggers writes: > On Fri, Jan 19, 2024 at 03:47:34PM -0300, Gabriel Krisman Bertazi wrote: >> To make the patch simpler, we now call fscrypt_get_encryption_info twice >> for fscrypt_prepare_lookup, once inside fscrypt_setup_filename and once >> inside fscrypt_prepare_lookup_dentry. It seems

[f2fs-dev] [PATCH v2 5/5] block: remove gfp_flags from blkdev_zone_mgmt

2024-01-25 Thread Johannes Thumshirn via Linux-f2fs-devel
Now that all callers pass in GFP_KERNEL to blkdev_zone_mgmt() and use memalloc_no{io,fs}_{save,restore}() to define the allocation scope, we can drop the gfp_mask parameter from blkdev_zone_mgmt() as well as blkdev_zone_reset_all() and blkdev_zone_reset_all_emulated(). Signed-off-by: Johannes Thum

[f2fs-dev] [PATCH v2 3/5] btrfs: zoned: call blkdev_zone_mgmt in nofs scope

2024-01-25 Thread Johannes Thumshirn via Linux-f2fs-devel
Add a memalloc_nofs scope around all calls to blkdev_zone_mgmt(). This allows us to further get rid of the GFP_NOFS argument for blkdev_zone_mgmt(). Signed-off-by: Johannes Thumshirn --- fs/btrfs/zoned.c | 33 ++--- 1 file changed, 26 insertions(+), 7 deletions(-) di

[f2fs-dev] [PATCH v2 1/5] zonefs: pass GFP_KERNEL to blkdev_zone_mgmt() call

2024-01-25 Thread Johannes Thumshirn via Linux-f2fs-devel
Pass GFP_KERNEL instead of GFP_NOFS to the blkdev_zone_mgmt() call in zonefs_zone_mgmt(). As as zonefs_zone_mgmt() and zonefs_inode_zone_mgmt() are never called from a place that can recurse back into the filesystem on memory reclaim, it is save to call blkdev_zone_mgmt() with GFP_KERNEL. Link: h

[f2fs-dev] [PATCH v2 2/5] dm: dm-zoned: guard blkdev_zone_mgmt with noio scope

2024-01-25 Thread Johannes Thumshirn via Linux-f2fs-devel
Guard the calls to blkdev_zone_mgmt() with a memalloc_noio scope. This helps us getting rid of the GFP_NOIO argument to blkdev_zone_mgmt(); Signed-off-by: Johannes Thumshirn --- drivers/md/dm-zoned-metadata.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/md/dm-z

[f2fs-dev] [PATCH v2 4/5] f2fs: guard blkdev_zone_mgmt with nofs scope

2024-01-25 Thread Johannes Thumshirn via Linux-f2fs-devel
Guard the calls to blkdev_zone_mgmt() with a memalloc_nofs scope. This helps us getting rid of the GFP_NOFS argument to blkdev_zone_mgmt(); Signed-off-by: Johannes Thumshirn --- fs/f2fs/segment.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/segment

[f2fs-dev] [PATCH v2 0/5] block: remove gfp_mask for blkdev_zone_mgmt()

2024-01-25 Thread Johannes Thumshirn via Linux-f2fs-devel
Fueled by the LSFMM discussion on removing GFP_NOFS initiated by Willy, I've looked into the sole GFP_NOFS allocation in zonefs. As it turned out, it is only done for zone management commands and can be removed. After digging into more callers of blkdev_zone_mgmt() I came to the conclusion that th

Re: [f2fs-dev] [PATCH v3 01/10] ovl: Reject mounting case-insensitive filesystems

2024-01-25 Thread Gabriel Krisman Bertazi
Eric Biggers writes: > On Fri, Jan 19, 2024 at 03:47:33PM -0300, Gabriel Krisman Bertazi wrote: >> ovl: Reject mounting case-insensitive filesystems > > Overlayfs doesn't mount filesystems. I think you might mean something like > reject case-insensitive lowerdirs? uppers and workdir too. I'd ma

Re: [f2fs-dev] [PATCH] f2fs-tools: allocate logs after conventional area for HM zoned devices

2024-01-25 Thread Daeho Jeong
On Wed, Jan 24, 2024 at 7:34 PM Chao Yu wrote: > > +Cc Yongpeng Yang > > Daeho, > > Yongpeng reports a potential issue: if c.devices[0].total_segments is > larger than segments of mainarea, c.cur_seg[CURSEG_HOT_NODE] will exceed > end boundary of mainarea. Could you please check that? though it's