Re: [f2fs-dev] [PATCH] f2fs: don't break allocation when crossing contiguous sections

2025-07-29 Thread Daejun Park
loff_t length, >                  iomap->flags = IOMAP_F_MERGED; >                  iomap->bdev = map.m_bdev; >                  iomap->addr = F2FS_BLK_TO_BYTES(map.m_pblk); > + > +                if (flags & IOMAP_WRITE && map.m_last_pblk) > +              

Re: [f2fs-dev] [PATCH v2] f2fs: fix to avoid potential deadlock in f2fs_record_stop_reason()

2024-10-23 Thread Daejun Park
-rocontinuepanic > mountoption") > Reported-by: syzbot+be4a9983e95a5e25c...@syzkaller.appspotmail.com > Closes: > https://lore.kernel.org/all/6704d667.050a0220.1e4d62.0081@google.com > Signed-off-by: Chao Yu Reviewed-by: Daejun Park ___

Re: [f2fs-dev] [PATCH] f2fs: fix to avoid potential deadlock in f2fs_record_stop_reason()

2024-10-22 Thread Daejun Park
Hi Chao Yu, >  >- Original Message - >Sender : Chao Yu via Linux-f2fs-devel >Date : 2024-10-22 15:21 (GMT+9) >Title : [f2fs-dev] [PATCH] f2fs: fix to avoid potential deadlock in >f2fs_record_stop_reason() >  >syzbot reports deadlock issue of f2fs as below: > >===

Re: [f2fs-dev] (2) [PATCH] f2fs: support dio write for zoned storage

2024-10-14 Thread Daejun Park
>- Original Message - >Sender : Daeho Jeong >Date : 2024-10-11 05:42 (GMT+9) >Title : Re: [f2fs-dev] [PATCH] f2fs: support dio write for zoned storage >  >On Fri, Sep 27, 2024 at 12:25 AM Daejun Park wrote: >> >> With zoned storage, F2FS avoids dire

[f2fs-dev] [PATCH] f2fs: support dio write for zoned storage

2024-09-27 Thread Daejun Park
semephores to serialize block allocation and writes per zone. Signed-off-by: Daejun Park --- fs/f2fs/data.c| 28 ++- fs/f2fs/f2fs.h| 7 +-- fs/f2fs/file.c| 48 --- fs/f2fs/gc.c | 4 ++-- fs/f2fs/segment.c | 6

[f2fs-dev] [PATCH v2] f2fs: avoid unused block when dio write in LFS mode

2024-09-04 Thread Daejun Park
is not contiguous. However, the block already allocated in this process will remain unused due to the LFS mode. This patch avoids the possibility of unused blocks by escaping f2fs_map_blocks() when allocating the last block in a section. Signed-off-by: Daejun Park --- v2: Applied segment check

[f2fs-dev] [PATCH v2] f2fs-tools: add write hint support

2024-09-03 Thread Daejun Park
This patch enables support for write hints by segment type. Signed-off-by: Daejun Park --- v2: - Add -H option for write hint enabling. - Keep last write hint to reduce fnctl call. configure.ac| 2 + fsck/defrag.c | 5 +- fsck/dir.c | 27

Re: [f2fs-dev] (2) (2) [PATCH] f2fs: avoid unused block when dio write in LFS mode

2024-08-15 Thread Daejun Park
Hi Chao Yu, >  >- Original Message - >Sender : Chao Yu >Date : 2024-08-16 10:56 (GMT+9) >Title : Re: (2) [PATCH] f2fs: avoid unused block when dio write in LFS mode >  >On 2024/8/16 8:17, Daejun Park wrote: >> Hi Chao Yu, >>>  >>> --

Re: [f2fs-dev] (2) [PATCH] f2fs-tools: add write hint support

2024-08-15 Thread Daejun Park
Hi Chao Yu, >  >- Original Message - >Sender : Chao Yu >Date : 2024-08-15 12:33 (GMT+9) >Title : Re: [PATCH] f2fs-tools: add write hint support >  >On 2024/8/9 15:32, Daejun Park wrote: >> This patch enables support for write hints by segment type. >

Re: [f2fs-dev] (2) [PATCH] f2fs: avoid unused block when dio write in LFS mode

2024-08-15 Thread Daejun Park
Hi Chao Yu, >  >- Original Message - >Sender : Chao Yu >Date : 2024-08-14 18:50 (GMT+9) >Title : Re: [PATCH] f2fs: avoid unused block when dio write in LFS mode >  >On 2024/8/1 15:47, Daejun Park wrote: >> This patch addresses the problem that when us

[f2fs-dev] [PATCH] f2fs-tools: add write hint support

2024-08-09 Thread Daejun Park
This patch enables support for write hints by segment type. Signed-off-by: Daejun Park --- configure.ac| 2 + fsck/defrag.c | 5 +- fsck/dir.c | 27 +++--- fsck/fsck.c | 24 + fsck/inject.c | 4 +- fsck/mount.c

[f2fs-dev] [PATCH] f2fs: avoid unused block when dio write in LFS mode

2024-08-01 Thread Daejun Park
is not contiguous. However, the block already allocated in this process will remain unused due to the LFS mode. This patch avoids the possibility of unused blocks by escaping f2fs_map_blocks() when allocating the last block in a section. Signed-off-by: Daejun Park --- fs/f2fs/data.c | 13

Re: [f2fs-dev] (2) [PATCH] f2fs: fix null reference error when checking end of zone

2024-07-04 Thread Daejun Park
Hi Chao Yu, >  >- Original Message - >Sender : Chao Yu >Date : 2024-07-04 16:16 (GMT+9) >Title : Re: [PATCH] f2fs: fix null reference error when checking end of zone >  >On 2024/7/4 9:01, Daejun Park wrote: >> This patch fixes a potentially nul

[f2fs-dev] [PATCH] f2fs: fix null reference error when checking end of zone

2024-07-03 Thread Daejun Park
This patch fixes a potentially null pointer being accessed by is_end_zone_blkaddr() that checks the last block of a zone when f2fs is mounted as a single device. Fixes: e067dc3c6b9c ("f2fs: maintain six open zones for zoned devices") Signed-off-by: Daejun Park --- fs/f2fs/data.c |

Re: [f2fs-dev] (2) [PATCH v2] f2fs: add support single node mode

2024-06-24 Thread Daejun Park
Hi Chao, > >It looks complicated to enable single_node_sec mode dynamically, what do >you think of making this as a feature which can only be eanbled by mkfs? I think it is good idea, I will change this patch for mkfs tool. Thanks, Daejun ___ Linux

Re: [f2fs-dev] (2) (2) (2) [PATCH] Revert "f2fs: use flush command instead of FUA for zoned device"

2024-06-20 Thread Daejun Park
>On 2024/6/20 15:22, Daejun Park wrote: >>> On 2024/6/20 13:56, Daejun Park wrote: >>>> Hi Chao, >>>> >>>>> Jaegeuk, >>>>> >>>>> Quoted commit message from commit c550e25bca66 ("f2fs: use flush command >>&g

Re: [f2fs-dev] (2) (2) [PATCH] Revert "f2fs: use flush command instead of FUA for zoned device"

2024-06-20 Thread Daejun Park
>On 2024/6/20 13:56, Daejun Park wrote: >> Hi Chao, >> >>> Jaegeuk, >>> >>> Quoted commit message from commit c550e25bca66 ("f2fs: use flush command >>> instead of FUA for zoned device") >>> " >>> The block laye

Re: [f2fs-dev] (2) [PATCH] Revert "f2fs: use flush command instead of FUA for zoned device"

2024-06-19 Thread Daejun Park
Hi Chao, > Jaegeuk, > > Quoted commit message from commit c550e25bca66 ("f2fs: use flush command > instead of FUA for zoned device") > " > The block layer for zoned disk can reorder the FUA'ed IOs. Let's use flush > command to keep the write order. > " > > It seems mq-deadline use fifo queue and

[f2fs-dev] [PATCH v2] f2fs: add support single node mode

2024-06-16 Thread Daejun Park
node section, add the 'single_node_sec' in mount option. The single node section mode can be activated when the number of active logs is equal to 6. Signed-off-by: Daejun Park --- Documentation/filesystems/f2fs.rst | 2 + fs/f2fs/f2fs.h | 3 ++ fs/f2fs/

Re: [f2fs-dev] (2) [PATCH] f2fs: fix convert inline inode on readonly mode

2024-06-11 Thread Daejun Park
> On 2024/6/12 10:20, Daejun Park wrote: > > syzbot reported a bug in f2fs_vm_page_mkwrite() which checks for > > f2fs_has_inline_data(inode). > > The bug was caused by f2fs_convert_inline_inode() not returning an > > error when called on a read-only filesystem, but re

[f2fs-dev] [PATCH] f2fs: fix convert inline inode on readonly mode

2024-06-11 Thread Daejun Park
that f2fs_convert_inline_inode() returns -EROFS on readonly. Fixes: ec2ddf499402 ("f2fs: don't allow any writes on readonly mount") Reported-by: syzbot+f195123a45ad487ca...@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=f195123a45ad487ca66c Signed-off-

Re: [f2fs-dev] (2) [RFC PATCH] f2fs: add support single node section mode

2024-06-09 Thread Daejun Park
> Hi Daejun, > 1. It is not compatible with "F2FS_OPTION(sbi).active_logs == 2". > 2. Once has_enough_free_secs is false, F2FS cannot restore to multi-node > sections even after has_enough_free_secs becomes true and the filesystem > is unmounted and remounted. This seems unreasonable. Hi Yongpeng

[f2fs-dev] [RFC PATCH] f2fs: add support single node section mode

2024-05-31 Thread Daejun Park
node section, add the 'single_node_sec' in mount option. Signed-off-by: Daejun Park --- Documentation/filesystems/f2fs.rst | 2 + fs/f2fs/f2fs.h | 3 ++ fs/f2fs/recovery.c | 3 ++ fs/f2fs/segment.c | 77 +

Re: [f2fs-dev] [PATCH] f2fs: do not issue small discard commands during checkpoint

2023-06-13 Thread Daejun Park
Hi Jaegeuk, > If there're huge # of small discards, this will increase checkpoint latency > insanely. Let's issue small discards only by trim. > > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/segment.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/fs/f2fs/segment.

Re: [f2fs-dev] (2) (2) [PATCH v6] f2fs: add async reset zone command support

2023-05-17 Thread Daejun Park
> On 05/11, Daejun Park wrote: > > > Sender : Jaegeuk Kim  > > > Date : 2023-05-10 03:53 (GMT+9) > > > Title : Re: [PATCH v6] f2fs: add async reset zone command support > > > To : 박대준 > > > CC : c...@kernel.org, > > > rost...@goodmis

Re: [f2fs-dev] (2) [PATCH v6] f2fs: add async reset zone command support

2023-05-10 Thread Daejun Park
.@vger.kernel.org, > linux-trace-ker...@vger.kernel.org, > 김석환, 송용길, > 김범수 >   > On 05/08, Daejun Park wrote: > > v5 -> v6 > > Added trace_f2fs_iostat support for zone reset command. > > > > v4 -> v5 > > Added f2fs iostat for zone reset command.

[f2fs-dev] [PATCH v6] f2fs: add async reset zone command support

2023-05-08 Thread Daejun Park
zation scenario by faster checkpointing. Signed-off-by: Daejun Park --- fs/f2fs/f2fs.h | 1 + fs/f2fs/iostat.c| 1 + fs/f2fs/segment.c | 84 +++-- include/trace/events/f2fs.h | 24 +-- 4 files changed, 104 insertions(

[f2fs-dev] [PATCH v5] f2fs: add async reset zone command support

2023-05-03 Thread Daejun Park
reviously incorrectly merged. v1 -> v2 Changed to apply the optional async reset write pointer by default. This patch enables submit reset zone command asynchornously. It helps decrease average latency of write IOs in high utilization scenario by faster checkpointing. Signed-off-by: Daejun P

Re: [f2fs-dev] (2) [PATCH v4] f2fs: add async reset zone command support

2023-05-03 Thread Daejun Park
, > linux-f2fs-devel@lists.sourceforge.net, > linux-ker...@vger.kernel.org, > linux-trace-ker...@vger.kernel.org > CC : 김석환, 송용길, > 김범수 >   > On 2023/5/2 12:16, Daejun Park wrote: > > Changelog: > > > > v3 -> v4 > > Fixed build error caused by un

[f2fs-dev] [PATCH v4] f2fs: add async reset zone command support

2023-05-01 Thread Daejun Park
hanged to apply the optional async reset write pointer by default. This patch enables submit reset zone command asynchornously. It helps decrease average latency of write IOs in high utilization scenario by faster checkpointing. Signed-off-by: Daejun Park --- fs/f2fs/segment.c

[f2fs-dev] [PATCH v3] f2fs: add async reset zone command support

2023-04-27 Thread Daejun Park
efault. This patch enables submit reset zone command asynchornously. It helps decrease average latency of write IOs in high utilization scenario by faster checkpointing. Signed-off-by: Daejun Park --- fs/f2fs/segment.c | 85 ++--- include/trace/events/

Re: [f2fs-dev] (2) [PATCH v2] f2fs: add async reset zone command support

2023-04-26 Thread Daejun Park
Thank you for your review. I have responded in the comments below. > On 2023/4/25 16:10, Daejun Park wrote: > > Changelog: > > > > v1 -> v2 > > Changed to apply the optional async reset write pointer by default. > > > > > > This patch enables su

[f2fs-dev] [PATCH v2] f2fs: add async reset zone command support

2023-04-25 Thread Daejun Park
Changelog: v1 -> v2 Changed to apply the optional async reset write pointer by default. This patch enables submit reset zone command asynchornously. It helps decrease average latency of write IOs in high utilization scenario by faster checkpointing. Signed-off-by: Daejun Park --- fs/f

Re: [f2fs-dev] (2) [PATCH] f2fs: add async reset zone command support

2023-04-20 Thread Daejun Park
Hi Jeageuk, Thanks for helpful review. > > On 04/14, Daejun Park wrote: > > This patch enables submit reset zone command asynchornously. It helps > > decrease average latency of write IOs in high utilization scenario by > > faster checkpointing. > >

[f2fs-dev] [PATCH] f2fs: add async reset zone command support

2023-04-13 Thread Daejun Park
This patch enables submit reset zone command asynchornously. It helps decrease average latency of write IOs in high utilization scenario by faster checkpointing. Signed-off-by: Daejun Park --- Documentation/filesystems/f2fs.rst | 4 ++ fs/f2fs/f2fs.h | 1 + fs/f2fs

[f2fs-dev] [PATCH] f2fs: support cold file defragementation

2021-05-12 Thread Daejun Park
policy is applied, so it is can not be defragmented. This patch temporarily clears the cold bit so that the file can be defragmented. Signed-off-by: Daejun Park --- fs/f2fs/file.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/file.c b/fs/f2fs

Re: [f2fs-dev] [PATCH] f2fs: set file as cold when file defragmentation

2021-05-12 Thread Daejun Park
>On 05/11, Chao Yu wrote: >> On 2021/5/11 14:41, Daejun Park wrote: >> > > On 2021/5/11 13:09, Jaegeuk Kim wrote: >> > > > On 05/11, Chao Yu wrote: >> > > > > On 2021/5/10 22:47, Jaegeuk Kim wrote: >> > > > > > O

Re: [f2fs-dev] [PATCH] f2fs: set file as cold when file defragmentation

2021-05-10 Thread Daejun Park
>On 2021/5/11 13:09, Jaegeuk Kim wrote: >> On 05/11, Chao Yu wrote: >>> On 2021/5/10 22:47, Jaegeuk Kim wrote: >>>> On 05/06, Chao Yu wrote: >>>>> On 2021/5/6 12:46, Jaegeuk Kim wrote: >>>>>> On 05/06, Chao Yu wrote: >>>>

[f2fs-dev] [PATCH] f2fs: refactoring nat and sit functions

2021-04-28 Thread Daejun Park
This patch separates the APIs for nat and sit. f2fs_lookup_journal_in_cursum -> f2fs_lookup_journal_{nats|sits}_in_cursum __has_cursum_space -> __has_{nats|sits}_in_cursum_space Signed-off-by: Daejun Park --- fs/f2fs/f2fs.h| 16 +++- fs/f2fs/node.c| 11 +-- f

[f2fs-dev] [PATCH] f2fs: set file as cold when file defragmentation

2021-04-28 Thread Daejun Park
In file defragmentation by ioctl, all data blocks in the file are re-written out-of-place. File defragmentation implies user will not update and mostly read the file. So before the defragmentation, we set file temperature as cold for better block allocation. Signed-off-by: Daejun Park --- fs

[f2fs-dev] [PATCH v2] f2fs: change write_hint for hot/warm nodes

2020-11-03 Thread Daejun Park
the wrong stream seperation. * Liang, Yu, et al. "An empirical study of F2FS on mobile devices." 2017 IEEE 23rd International Conference on Embedded and Real-Time Computing Systems and Applications (RTCSA). Signed-off-by: Daejun Park --- v2: update documentation and comments --- Doc

Re: [f2fs-dev] [PATCH] f2fs: change write_hint for hot/warm nodes

2020-11-03 Thread Daejun Park
>>>From 818a76a9aee5bf225565264274d211edb07bae7d Mon Sep 17 00:00:00 2001 >> From: Daejun Park >> Date: Tue, 3 Nov 2020 15:30:26 +0900 >> >> >> In the fs-based mode of F2FS, the mapping of hot/warm node to >> WRITE_LIFE_NOT_SET should be chang

[f2fs-dev] [PATCH] f2fs: change write_hint for hot/warm nodes

2020-11-02 Thread Daejun Park
>From 818a76a9aee5bf225565264274d211edb07bae7d Mon Sep 17 00:00:00 2001 From: Daejun Park Date: Tue, 3 Nov 2020 15:30:26 +0900 In the fs-based mode of F2FS, the mapping of hot/warm node to WRITE_LIFE_NOT_SET should be changed to WRITE_LIFE_SHORT. As a result of analyzing the write pattern