Re: [f2fs-dev] [PATCH v3] f2fs: zone: don't block IO if there is remained open zone
On 2024/4/14 23:19, Jaegeuk Kim wrote: It seems this caused kernel hang. Chao, have you tested this patch enough? Jaegeuk, Oh, I've checked this patch w/ fsstress before submitting it, but missed the SPO testcase... do you encounter kernel hang w/ SPO testcase? Anyway, let me test it more. Thanks, On 04/13, Chao Yu wrote: On 2024/4/13 5:11, Jaegeuk Kim wrote: On 04/07, Chao Yu wrote: max open zone may be larger than log header number of f2fs, for such case, it doesn't need to wait last IO in previous zone, let's introduce available_open_zone semaphore, and reduce it once we submit first write IO in a zone, and increase it after completion of last IO in the zone. Cc: Daeho Jeong Signed-off-by: Chao Yu --- v3: - avoid race condition in between __submit_merged_bio() and __allocate_new_segment(). fs/f2fs/data.c| 105 ++ fs/f2fs/f2fs.h| 34 --- fs/f2fs/iostat.c | 7 fs/f2fs/iostat.h | 2 + fs/f2fs/segment.c | 43 --- fs/f2fs/segment.h | 12 +- fs/f2fs/super.c | 2 + 7 files changed, 156 insertions(+), 49 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 0d88649c60a5..18a4ac0a06bc 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -373,11 +373,10 @@ static void f2fs_write_end_io(struct bio *bio) #ifdef CONFIG_BLK_DEV_ZONED static void f2fs_zone_write_end_io(struct bio *bio) { - struct f2fs_bio_info *io = (struct f2fs_bio_info *)bio->bi_private; + struct f2fs_sb_info *sbi = iostat_get_bio_private(bio); - bio->bi_private = io->bi_private; - complete(>zone_wait); f2fs_write_end_io(bio); + up(>available_open_zones); } #endif @@ -531,6 +530,24 @@ static void __submit_merged_bio(struct f2fs_bio_info *io) if (!io->bio) return; +#ifdef CONFIG_BLK_DEV_ZONED + if (io->open_zone) { + /* +* if there is no open zone, it will wait for last IO in +* previous zone before submitting new IO. +*/ + down(>sbi->available_open_zones); + io->open_zone = false; + io->zone_openned = true; + } + + if (io->close_zone) { + io->bio->bi_end_io = f2fs_zone_write_end_io; + io->zone_openned = false; + io->close_zone = false; + } +#endif + if (is_read_io(fio->op)) { trace_f2fs_prepare_read_bio(io->sbi->sb, fio->type, io->bio); f2fs_submit_read_bio(io->sbi, io->bio, fio->type); @@ -601,9 +618,9 @@ int f2fs_init_write_merge_io(struct f2fs_sb_info *sbi) INIT_LIST_HEAD(>write_io[i][j].bio_list); init_f2fs_rwsem(>write_io[i][j].bio_list_lock); #ifdef CONFIG_BLK_DEV_ZONED - init_completion(>write_io[i][j].zone_wait); - sbi->write_io[i][j].zone_pending_bio = NULL; - sbi->write_io[i][j].bi_private = NULL; + sbi->write_io[i][j].open_zone = false; + sbi->write_io[i][j].zone_openned = false; + sbi->write_io[i][j].close_zone = false; #endif } } @@ -634,6 +651,31 @@ static void __f2fs_submit_merged_write(struct f2fs_sb_info *sbi, f2fs_up_write(>io_rwsem); } +void f2fs_blkzoned_submit_merged_write(struct f2fs_sb_info *sbi, int type) +{ +#ifdef CONFIG_BLK_DEV_ZONED + struct f2fs_bio_info *io; + + if (!f2fs_sb_has_blkzoned(sbi)) + return; + + io = sbi->write_io[PAGE_TYPE(type)] + type_to_temp(type); + + f2fs_down_write(>io_rwsem); + if (io->zone_openned) { + if (io->bio) { + io->close_zone = true; + __submit_merged_bio(io); + } else if (io->zone_openned) { + up(>available_open_zones); + io->zone_openned = false; + } + } + f2fs_up_write(>io_rwsem); +#endif + +} + static void __submit_merged_write_cond(struct f2fs_sb_info *sbi, struct inode *inode, struct page *page, nid_t ino, enum page_type type, bool force) @@ -918,22 +960,16 @@ int f2fs_merge_page_bio(struct f2fs_io_info *fio) } #ifdef CONFIG_BLK_DEV_ZONED -static bool is_end_zone_blkaddr(struct f2fs_sb_info *sbi, block_t blkaddr) +static bool is_blkaddr_zone_boundary(struct f2fs_sb_info *sbi, + block_t blkaddr, bool start) { - int devi = 0; + if (!f2fs_blkaddr_in_seqzone(sbi, blkaddr)) + return false; + + if (start) + return (blkaddr % sbi->blocks_per_blkz) == 0; + return (blkaddr % sbi->blocks_per_blkz == sbi->blocks_per_blkz - 1); - if (f2fs_is_multi_device(sbi)) { - devi =
Re: [f2fs-dev] [PATCH V3] f2fs: add REQ_TIME time update for some user behaviors
Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Wed, 20 Mar 2024 14:22:16 +0800 you wrote: > some user behaviors requested filesystem operations, which > will cause filesystem not idle. > Meanwhile adjust some f2fs_update_time(REQ_TIME) positions. > > Signed-off-by: Zhiguo Niu > --- > v3: modify some update conditions according to Chao's suggeestions > v2: update patch according to Chao's suggestions > > [...] Here is the summary with links: - [f2fs-dev,V3] f2fs: add REQ_TIME time update for some user behaviors https://git.kernel.org/jaegeuk/f2fs/c/fa18d87cb20f You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Re: [f2fs-dev] [PATCH] f2fs: fix to detect inconsistent nat entry during truncation
Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Fri, 22 Mar 2024 22:59:55 +0800 you wrote: > As Roman Smirnov reported as below: > > " > There is a possible bug in f2fs_truncate_inode_blocks(): > > if (err < 0 && err != -ENOENT) > goto fail; > ... > offset[1] = 0; > offset[0]++; > nofs += err; > > [...] Here is the summary with links: - [f2fs-dev] f2fs: fix to detect inconsistent nat entry during truncation https://git.kernel.org/jaegeuk/f2fs/c/92c556ed6318 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Re: [f2fs-dev] [PATCH 1/2] f2fs: introduce map_is_mergeable() for cleanup
Hello: This series was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Mon, 25 Mar 2024 23:27:25 +0800 you wrote: > No logic changes. > > Signed-off-by: Chao Yu > --- > fs/f2fs/data.c | 24 ++-- > 1 file changed, 18 insertions(+), 6 deletions(-) Here is the summary with links: - [f2fs-dev,1/2] f2fs: introduce map_is_mergeable() for cleanup (no matching commit) - [f2fs-dev,2/2] f2fs: support to map continuous holes or preallocated address https://git.kernel.org/jaegeuk/f2fs/c/9f0f6bf42714 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Re: [f2fs-dev] [PATCH] f2fs: Prevent s_writer rw_sem count mismatch in f2fs_evict_inode
Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Fri, 22 Mar 2024 13:16:39 +0900 you wrote: > If f2fs_evict_inode is called between freeze_super and thaw_super, the > s_writer rwsem count may become negative, resulting in hang. > > CPU1 CPU2 > > f2fs_resize_fs() f2fs_evict_inode() > f2fs_freeze > set SBI_IS_FREEZING > skip sb_start_intwrite > f2fs_unfreeze > clear SBI_IS_FREEZING > sb_end_intwrite > > [...] Here is the summary with links: - [f2fs-dev] f2fs: Prevent s_writer rw_sem count mismatch in f2fs_evict_inode https://git.kernel.org/jaegeuk/f2fs/c/3127f1010c9b You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Re: [f2fs-dev] [PATCH 1/3] f2fs: use folio_test_writeback
Hello: This series was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Tue, 9 Apr 2024 20:34:09 + you wrote: > Let's convert PageWriteback to folio_test_writeback. > > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/compress.c | 2 +- > fs/f2fs/data.c | 3 +-- > fs/f2fs/f2fs.h | 2 +- > fs/f2fs/gc.c | 2 +- > fs/f2fs/inline.c | 2 +- > fs/f2fs/inode.c| 3 ++- > fs/f2fs/node.c | 2 +- > fs/f2fs/segment.c | 10 +- > 8 files changed, 13 insertions(+), 13 deletions(-) Here is the summary with links: - [f2fs-dev,1/3] f2fs: use folio_test_writeback https://git.kernel.org/jaegeuk/f2fs/c/16778aea9186 - [f2fs-dev,2/3] f2fs: clear writeback when compression failed (no matching commit) - [f2fs-dev,3/3] f2fs: fix false alarm on invalid block address (no matching commit) You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Re: [f2fs-dev] [PATCH] f2fs: support .shutdown in f2fs_sops
Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Thu, 29 Feb 2024 22:38:38 +0800 you wrote: > Support .shutdown callback in f2fs_sops, then, it can be called to > shut down the file system when underlying block device is marked dead. > > Signed-off-by: Chao Yu > --- > fs/f2fs/f2fs.h | 2 ++ > fs/f2fs/file.c | 70 ++--- > fs/f2fs/super.c | 6 + > 3 files changed, 51 insertions(+), 27 deletions(-) Here is the summary with links: - [f2fs-dev] f2fs: support .shutdown in f2fs_sops https://git.kernel.org/jaegeuk/f2fs/c/ee745e4736fb You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Re: [f2fs-dev] [PATCH 1/2] f2fs: fix to relocate check condition in f2fs_fallocate()
Hello: This series was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Wed, 3 Apr 2024 22:24:19 +0800 you wrote: > compress and pinfile flag should be checked after inode lock held to > avoid race condition, fix it. > > Fixes: 4c8ff7095bef ("f2fs: support data compression") > Fixes: 5fed0be8583f ("f2fs: do not allow partial truncation on pinned file") > Signed-off-by: Chao Yu > > [...] Here is the summary with links: - [f2fs-dev,1/2] f2fs: fix to relocate check condition in f2fs_fallocate() https://git.kernel.org/jaegeuk/f2fs/c/278a6253a673 - [f2fs-dev,2/2] f2fs: fix to check pinfile flag in f2fs_move_file_range() https://git.kernel.org/jaegeuk/f2fs/c/e07230da0500 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Re: [f2fs-dev] [PATCH 1/2] f2fs: compress: fix to relocate check condition in f2fs_{release, reserve}_compress_blocks()
Hello: This series was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Sun, 7 Apr 2024 15:26:03 +0800 you wrote: > Compress flag should be checked after inode lock held to avoid > racing w/ f2fs_setflags_common(), fix it. > > Fixes: 4c8ff7095bef ("f2fs: support data compression") > Reported-by: Zhiguo Niu > Closes: > https://lore.kernel.org/linux-f2fs-devel/cahj8p3ldzxlc2rqeyjvymgyhr2+yluj0slg9ddsjzmwo7de...@mail.gmail.com > Signed-off-by: Chao Yu > > [...] Here is the summary with links: - [f2fs-dev,1/2] f2fs: compress: fix to relocate check condition in f2fs_{release, reserve}_compress_blocks() https://git.kernel.org/jaegeuk/f2fs/c/7c5dffb3d90c - [f2fs-dev,2/2] f2fs: compress: fix to relocate check condition in f2fs_ioc_{, de}compress_file() https://git.kernel.org/jaegeuk/f2fs/c/bd9ae4ae9e58 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Re: [f2fs-dev] [PATCH] f2fs: fix to wait on page writeback in __clone_blkaddrs()
Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Tue, 26 Mar 2024 19:28:45 +0800 you wrote: > In below race condition, dst page may become writeback status > in __clone_blkaddrs(), it needs to wait writeback before update, > fix it. > > Thread A GC Thread > - f2fs_move_file_range > - filemap_write_and_wait_range(dst) > - gc_data_segment >- f2fs_down_write(dst) >- move_data_page > - set_page_writeback(dst_page) > - f2fs_submit_page_write >- f2fs_up_write(dst) > - f2fs_down_write(dst) > - __exchange_data_block >- __clone_blkaddrs > - f2fs_get_new_data_page > - memcpy_page > > [...] Here is the summary with links: - [f2fs-dev] f2fs: fix to wait on page writeback in __clone_blkaddrs() https://git.kernel.org/jaegeuk/f2fs/c/d3876e34e7e7 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Re: [f2fs-dev] [PATCH 1/2] f2fs: prevent writing without fallocate() for pinned files
Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Thu, 11 Apr 2024 10:54:10 -0700 you wrote: > From: Daeho Jeong > > In a case writing without fallocate(), we can't guarantee it's allocated > in the conventional area for zoned stroage. To make it consistent across > storage devices, we disallow it regardless of storage device types. > > Signed-off-by: Daeho Jeong > > [...] Here is the summary with links: - [f2fs-dev,1/2] f2fs: prevent writing without fallocate() for pinned files https://git.kernel.org/jaegeuk/f2fs/c/3fdd89b452c2 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Re: [f2fs-dev] [PATCH] f2fs: remove clear SB_INLINECRYPT flag in default_options
Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Tue, 26 Mar 2024 14:10:43 +0800 you wrote: > In f2fs_remount, SB_INLINECRYPT flag will be clear and re-set. > If create new file or open file during this gap, these files > will not use inlinecrypt. Worse case, it may lead to data > corruption if wrappedkey_v0 is enable. > > Thread A: Thread B: > > [...] Here is the summary with links: - [f2fs-dev] f2fs: remove clear SB_INLINECRYPT flag in default_options https://git.kernel.org/jaegeuk/f2fs/c/ac5eecf481c2 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Re: [f2fs-dev] [PATCH 2/2] f2fs: allow direct io of pinned files for zoned storage
Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Thu, 11 Apr 2024 11:37:53 -0700 you wrote: > From: Daeho Jeong > > Since the allocation happens in conventional LU for zoned storage, we > can allow direct io for that. > > Signed-off-by: Daeho Jeong > > [...] Here is the summary with links: - [f2fs-dev,2/2] f2fs: allow direct io of pinned files for zoned storage https://git.kernel.org/jaegeuk/f2fs/c/b2cf5a1ff236 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Re: [f2fs-dev] [PATCH v2] f2fs: multidev: fix to recognize valid zero block address
Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Wed, 27 Mar 2024 15:42:23 +0800 you wrote: > As reported by Yi Zhang in mailing list [1], kernel warning was catched > during zbd/010 test as below: > > ./check zbd/010 > zbd/010 (test gap zone support with F2FS)[failed] > runtime... 3.752s > something found in dmesg: > [ 4378.146781] run blktests zbd/010 at 2024-02-18 11:31:13 > [ 4378.192349] null_blk: module loaded > [ 4378.209860] null_blk: disk nullb0 created > [ 4378.413285] scsi_debug:sdebug_driver_probe: scsi_debug: trim > poll_queues to 0. poll_q/nr_hw = (0/1) > [ 4378.422334] scsi host15: scsi_debug: version 0191 [20210520] > dev_size_mb=1024, opts=0x0, submit_queues=1, statistics=0 > [ 4378.434922] scsi 15:0:0:0: Direct-Access-ZBC Linux > scsi_debug 0191 PQ: 0 ANSI: 7 > [ 4378.443343] scsi 15:0:0:0: Power-on or device reset occurred > [ 4378.449371] sd 15:0:0:0: Attached scsi generic sg5 type 20 > [ 4378.449418] sd 15:0:0:0: [sdf] Host-managed zoned block device > ... > (See > '/mnt/tests/gitlab.com/api/v4/projects/19168116/repository/archive.zip/storage/blktests/blk/blktests/results/nodev/zbd/010.dmesg' > > [...] Here is the summary with links: - [f2fs-dev,v2] f2fs: multidev: fix to recognize valid zero block address https://git.kernel.org/jaegeuk/f2fs/c/33e62cd7b4c2 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Re: [f2fs-dev] [PATCH] f2fs: write missing last sum blk of file pinning section
Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Tue, 9 Apr 2024 16:34:11 -0700 you wrote: > From: Daeho Jeong > > While do not allocating a new section in advance for file pinning area, I > missed that we should write the sum block for the last segment of a file > pinning section. > > Fixes: 9703d69d9d15 ("f2fs: support file pinning for zoned devices") > Signed-off-by: Daeho Jeong > > [...] Here is the summary with links: - [f2fs-dev] f2fs: write missing last sum blk of file pinning section https://git.kernel.org/jaegeuk/f2fs/c/b084403cfc32 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
[f2fs-dev] Patchwork summary for: f2fs
Hello: The following patches were marked "accepted", because they were applied to jaegeuk/f2fs.git (dev): Patch: [f2fs-dev] f2fs: fix to wait on page writeback in __clone_blkaddrs() Submitter: Chao Yu Committer: Jaegeuk Kim Patchwork: https://patchwork.kernel.org/project/f2fs/list/?series=838341 Lore link: https://lore.kernel.org/r/20240326112845.1576111-1-c...@kernel.org Patch: [f2fs-dev,v7] f2fs: fix zoned block device information initialization Submitter: Chao Yu Committer: Jaegeuk Kim Patchwork: https://patchwork.kernel.org/project/f2fs/list/?series=842105 Lore link: https://lore.kernel.org/r/20240407072123.3484300-1-c...@kernel.org Series: [f2fs-dev,1/2] f2fs: introduce map_is_mergeable() for cleanup Submitter: Chao Yu Patchwork: https://patchwork.kernel.org/project/f2fs/list/?series=837947 Lore link: https://lore.kernel.org/r/20240325152726.797423-1-c...@kernel.org Patches: [f2fs-dev,1/2] f2fs: introduce map_is_mergeable() for cleanup [f2fs-dev,2/2] f2fs: support to map continuous holes or preallocated address Series: [f2fs-dev,1/2] f2fs: fix to relocate check condition in f2fs_fallocate() Submitter: Chao Yu Committer: Jaegeuk Kim Patchwork: https://patchwork.kernel.org/project/f2fs/list/?series=841112 Lore link: https://lore.kernel.org/r/20240403142420.2042498-1-c...@kernel.org Patches: [f2fs-dev,1/2] f2fs: fix to relocate check condition in f2fs_fallocate() [f2fs-dev,2/2] f2fs: fix to check pinfile flag in f2fs_move_file_range() Series: [f2fs-dev,1/2] f2fs: compress: fix to relocate check condition in f2fs_{release, reserve}_compress_blocks() Submitter: Chao Yu Committer: Jaegeuk Kim Patchwork: https://patchwork.kernel.org/project/f2fs/list/?series=842106 Lore link: https://lore.kernel.org/r/20240407072604.3488169-1-c...@kernel.org Patches: [f2fs-dev,1/2] f2fs: compress: fix to relocate check condition in f2fs_{release, reserve}_compress_blocks() [f2fs-dev,2/2] f2fs: compress: fix to relocate check condition in f2fs_ioc_{, de}compress_file() Patch: [f2fs-dev,1/2] f2fs: prevent writing without fallocate() for pinned files Submitter: Daeho Jeong Committer: Jaegeuk Kim Patchwork: https://patchwork.kernel.org/project/f2fs/list/?series=843742 Lore link: https://lore.kernel.org/r/20240411175410.2406710-1-daeh...@gmail.com Patch: [f2fs-dev] f2fs: support .shutdown in f2fs_sops Submitter: Chao Yu Committer: Jaegeuk Kim Patchwork: https://patchwork.kernel.org/project/f2fs/list/?series=831135 Lore link: https://lore.kernel.org/r/20240229143838.45149-1-c...@kernel.org Patch: [f2fs-dev] f2fs: remove clear SB_INLINECRYPT flag in default_options Submitter: Yunlei He Committer: Jaegeuk Kim Patchwork: https://patchwork.kernel.org/project/f2fs/list/?series=838257 Lore link: https://lore.kernel.org/r/20240326061043.1348968-1-heyun...@oppo.com Patch: [f2fs-dev] f2fs: write missing last sum blk of file pinning section Submitter: Daeho Jeong Committer: Jaegeuk Kim Patchwork: https://patchwork.kernel.org/project/f2fs/list/?series=843019 Lore link: https://lore.kernel.org/r/20240409233411.1197830-1-daeh...@gmail.com Patch: [f2fs-dev] f2fs: Prevent s_writer rw_sem count mismatch in f2fs_evict_inode Submitter: Yeongjin Gil Committer: Jaegeuk Kim Patchwork: https://patchwork.kernel.org/project/f2fs/list/?series=837217 Lore link: https://lore.kernel.org/r/20240322041639.23144-1-youngjin@samsung.com Series: [f2fs-dev,1/3] f2fs: use folio_test_writeback Submitter: Jaegeuk Kim Committer: Jaegeuk Kim Patchwork: https://patchwork.kernel.org/project/f2fs/list/?series=842987 Lore link: https://lore.kernel.org/r/20240409203411.1885121-1-jaeg...@kernel.org Patches: [f2fs-dev,1/3] f2fs: use folio_test_writeback Patch: [f2fs-dev] f2fs: fix to detect inconsistent nat entry during truncation Submitter: Chao Yu Committer: Jaegeuk Kim Patchwork: https://patchwork.kernel.org/project/f2fs/list/?series=837405 Lore link: https://lore.kernel.org/r/20240322145955.2959257-1-c...@kernel.org Patch: [f2fs-dev,v2] f2fs: multidev: fix to recognize valid zero block address Submitter: Chao Yu Committer: Jaegeuk Kim Patchwork: https://patchwork.kernel.org/project/f2fs/list/?series=838736 Lore link: https://lore.kernel.org/r/20240327074223.2216487-1-c...@kernel.org Patch: None Submitter: Daeho Jeong Committer: Jaegeuk Kim Patchwork: https://patchwork.kernel.org/project/f2fs/list/?series=843751 Lore link: https://lore.kernel.org/r/20240411183753.2417792-1-daeh...@gmail.com Patch: [f2fs-dev,V3] f2fs: add REQ_TIME time update for some user behaviors Submitter: Zhiguo Niu Committer: Jaegeuk Kim Patchwork: https://patchwork.kernel.org/project/f2fs/list/?series=836627 Lore link: https://lore.kernel.org/r/1710915736-31823-1-git-send-email-zhiguo@unisoc.com Total patches: 18 -- Deet-doot-dot, I am a bot.
Re: [f2fs-dev] [PATCH v7] f2fs: fix zoned block device information initialization
Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Sun, 7 Apr 2024 15:21:23 +0800 you wrote: > From: Wenjie Qi > > If the max open zones of zoned devices are less than > the active logs of F2FS, the device may error due to > insufficient zone resources when multiple active logs > are being written at the same time. > > [...] Here is the summary with links: - [f2fs-dev,v7] f2fs: fix zoned block device information initialization https://git.kernel.org/jaegeuk/f2fs/c/0f9b12142be1 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Re: [f2fs-dev] [PATCH v3] f2fs: zone: don't block IO if there is remained open zone
It seems this caused kernel hang. Chao, have you tested this patch enough? On 04/13, Chao Yu wrote: > On 2024/4/13 5:11, Jaegeuk Kim wrote: > > On 04/07, Chao Yu wrote: > > > max open zone may be larger than log header number of f2fs, for > > > such case, it doesn't need to wait last IO in previous zone, let's > > > introduce available_open_zone semaphore, and reduce it once we > > > submit first write IO in a zone, and increase it after completion > > > of last IO in the zone. > > > > > > Cc: Daeho Jeong > > > Signed-off-by: Chao Yu > > > --- > > > v3: > > > - avoid race condition in between __submit_merged_bio() > > > and __allocate_new_segment(). > > > fs/f2fs/data.c| 105 ++ > > > fs/f2fs/f2fs.h| 34 --- > > > fs/f2fs/iostat.c | 7 > > > fs/f2fs/iostat.h | 2 + > > > fs/f2fs/segment.c | 43 --- > > > fs/f2fs/segment.h | 12 +- > > > fs/f2fs/super.c | 2 + > > > 7 files changed, 156 insertions(+), 49 deletions(-) > > > > > > diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c > > > index 0d88649c60a5..18a4ac0a06bc 100644 > > > --- a/fs/f2fs/data.c > > > +++ b/fs/f2fs/data.c > > > @@ -373,11 +373,10 @@ static void f2fs_write_end_io(struct bio *bio) > > > #ifdef CONFIG_BLK_DEV_ZONED > > > static void f2fs_zone_write_end_io(struct bio *bio) > > > { > > > - struct f2fs_bio_info *io = (struct f2fs_bio_info *)bio->bi_private; > > > + struct f2fs_sb_info *sbi = iostat_get_bio_private(bio); > > > - bio->bi_private = io->bi_private; > > > - complete(>zone_wait); > > > f2fs_write_end_io(bio); > > > + up(>available_open_zones); > > > } > > > #endif > > > @@ -531,6 +530,24 @@ static void __submit_merged_bio(struct f2fs_bio_info > > > *io) > > > if (!io->bio) > > > return; > > > +#ifdef CONFIG_BLK_DEV_ZONED > > > + if (io->open_zone) { > > > + /* > > > + * if there is no open zone, it will wait for last IO in > > > + * previous zone before submitting new IO. > > > + */ > > > + down(>sbi->available_open_zones); > > > + io->open_zone = false; > > > + io->zone_openned = true; > > > + } > > > + > > > + if (io->close_zone) { > > > + io->bio->bi_end_io = f2fs_zone_write_end_io; > > > + io->zone_openned = false; > > > + io->close_zone = false; > > > + } > > > +#endif > > > + > > > if (is_read_io(fio->op)) { > > > trace_f2fs_prepare_read_bio(io->sbi->sb, fio->type, > > > io->bio); > > > f2fs_submit_read_bio(io->sbi, io->bio, fio->type); > > > @@ -601,9 +618,9 @@ int f2fs_init_write_merge_io(struct f2fs_sb_info *sbi) > > > INIT_LIST_HEAD(>write_io[i][j].bio_list); > > > > > > init_f2fs_rwsem(>write_io[i][j].bio_list_lock); > > > #ifdef CONFIG_BLK_DEV_ZONED > > > - init_completion(>write_io[i][j].zone_wait); > > > - sbi->write_io[i][j].zone_pending_bio = NULL; > > > - sbi->write_io[i][j].bi_private = NULL; > > > + sbi->write_io[i][j].open_zone = false; > > > + sbi->write_io[i][j].zone_openned = false; > > > + sbi->write_io[i][j].close_zone = false; > > > #endif > > > } > > > } > > > @@ -634,6 +651,31 @@ static void __f2fs_submit_merged_write(struct > > > f2fs_sb_info *sbi, > > > f2fs_up_write(>io_rwsem); > > > } > > > +void f2fs_blkzoned_submit_merged_write(struct f2fs_sb_info *sbi, int > > > type) > > > +{ > > > +#ifdef CONFIG_BLK_DEV_ZONED > > > + struct f2fs_bio_info *io; > > > + > > > + if (!f2fs_sb_has_blkzoned(sbi)) > > > + return; > > > + > > > + io = sbi->write_io[PAGE_TYPE(type)] + type_to_temp(type); > > > + > > > + f2fs_down_write(>io_rwsem); > > > + if (io->zone_openned) { > > > + if (io->bio) { > > > + io->close_zone = true; > > > + __submit_merged_bio(io); > > > + } else if (io->zone_openned) { > > > + up(>available_open_zones); > > > + io->zone_openned = false; > > > + } > > > + } > > > + f2fs_up_write(>io_rwsem); > > > +#endif > > > + > > > +} > > > + > > > static void __submit_merged_write_cond(struct f2fs_sb_info *sbi, > > > struct inode *inode, struct page *page, > > > nid_t ino, enum page_type type, bool > > > force) > > > @@ -918,22 +960,16 @@ int f2fs_merge_page_bio(struct f2fs_io_info *fio) > > > } > > > #ifdef CONFIG_BLK_DEV_ZONED > > > -static bool is_end_zone_blkaddr(struct f2fs_sb_info *sbi, block_t > > > blkaddr) > > > +static bool is_blkaddr_zone_boundary(struct f2fs_sb_info *sbi, > > > + block_t blkaddr, bool start) > > > { > > > - int devi = 0; > > > + if (!f2fs_blkaddr_in_seqzone(sbi, blkaddr)) > > > + return