Re: [f2fs-dev] [PATCH v4 1/2] dump.f2fs: Add ability to dump folders

2024-05-23 Thread Daeho Jeong
The -r flag > will dump the entire fs from the root inode. -f or -y will skip the > prompt before dumping, and -P will preserve the mode/owner info for the > created file/folder. > > Signed-off-by: Daniel Rosenberg > Reviewed-by: Daeho Jeong

Re: [f2fs-dev] [PATCH v4 2/2] dump.f2fs: Fix xattr dumping

2024-05-23 Thread Daeho Jeong
On Thu, May 23, 2024 at 3:48 PM Daniel Rosenberg via Linux-f2fs-devel wrote: > > Xattrs for files with inline data were being skipped. This dumps those, > as well as xattrs for folders. > > Signed-off-by: Daniel Rosenberg > Reviewed-by: Daeho Jeong > --

Re: [f2fs-dev] [PATCH v2 1/2] dump.f2fs: Add ability to dump folders

2024-05-20 Thread Daeho Jeong
o_dump(struct f2fs_sb_info *sbi) > struct f2fs_checkpoint *ckpt = F2FS_CKPT(sbi); > u32 flag = le32_to_cpu(ckpt->ckpt_flags); > > + if (opt->use_root_nid) > + opt->nid = sbi->root_ino_num; > + > if (opt->end_nat == -1) &g

Re: [f2fs-dev] [PATCH 2/2] dump.f2fs: Fix xattr dumping

2024-05-20 Thread Daeho Jeong
> nid, > } > /* last block in extent cache */ > print_extent(true); > - > - dump_xattr(sbi, node_blk); > - return 0; > +dump_xattr: > + dump_xattr(sbi, node_blk, is_dir); > + return ret; > } > >

Re: [f2fs-dev] [PATCH 1/2] dump.f2fs: Add ability to dump folders

2024-05-20 Thread Daeho Jeong
On Tue, May 7, 2024 at 6:26 PM Daniel Rosenberg via Linux-f2fs-devel wrote: > > This adds the ability to dump folders as well as files. Folders are > dumped recursively. Additionally, dumped files/folders may be directed > to a folder specified by -o [path] instead of ./lost_found. The -r flag >

[f2fs-dev] [PATCH v2] f2fs: allow dirty sections with zero valid block for checkpoint disabled

2024-05-10 Thread Daeho Jeong
From: Daeho Jeong Following the semantic for dirty segments in checkpoint disabled mode, apply the same rule to dirty sections. Signed-off-by: Daeho Jeong --- v2: simplified codes with the same logic --- fs/f2fs/segment.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff

[f2fs-dev] [PATCH] f2fs: allow dirty sections with zero valid block for checkpoint disabled

2024-05-07 Thread Daeho Jeong
From: Daeho Jeong Following the semantic for dirty segments in checkpoint disabled mode, apply the same rule to dirty sections. Signed-off-by: Daeho Jeong --- fs/f2fs/segment.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c

Re: [f2fs-dev] [PATCH 3/3] f2fs: fix false alarm on invalid block address

2024-04-27 Thread Daeho Jeong
On Thu, Apr 25, 2024 at 12:30 AM Chao Yu wrote: > > On 2024/4/19 18:27, Juhyung Park wrote: > > On Sat, Apr 13, 2024 at 5:57 AM Jaegeuk Kim wrote: > >> > >> On 04/11, Chao Yu wrote: > >>> On 2024/4/10 4:34, Jaegeuk Kim wrote: > f2fs_ra_meta_pages can try to read ahead on invalid block

Re: [f2fs-dev] [PATCH v2] f2fs: zone: fix to don't trigger OPU on pinfile for direct IO

2024-04-27 Thread Daeho Jeong
On Sat, Apr 27, 2024 at 6:12 PM Chao Yu wrote: > > Otherwise, it breaks pinfile's sematics. > > Cc: Daeho Jeong > Signed-off-by: Chao Yu > --- > v2: > - fix to disallow OPU on pinfile no matter what device type f2fs uses. > fs/f2fs/data.c | 5 +++-- > 1 fi

Re: [f2fs-dev] [PATCH] f2fs: zone: fix to don't trigger OPU on pinfile for direct IO

2024-04-27 Thread Daeho Jeong
On Fri, Apr 26, 2024 at 6:49 PM Chao Yu wrote: > > On 2024/4/26 22:14, Daeho Jeong wrote: > > On Fri, Apr 26, 2024 at 3:35 AM Chao Yu wrote: > >> > >> Otherwise, it breaks pinfile's sematics. > >> > >> Cc: Daeho Jeong > >> Signed-off-by:

Re: [f2fs-dev] [PATCH] f2fs: zone: fix to don't trigger OPU on pinfile for direct IO

2024-04-26 Thread Daeho Jeong
On Fri, Apr 26, 2024 at 3:35 AM Chao Yu wrote: > > Otherwise, it breaks pinfile's sematics. > > Cc: Daeho Jeong > Signed-off-by: Chao Yu > --- > fs/f2fs/data.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/fs/f2fs/data.c b/fs/f2

Re: [f2fs-dev] [PATCH 2/3 v2] f2fs: clear writeback when compression failed

2024-04-23 Thread Daeho Jeong
page_array_free(cc->inode, cic->rpages, cc->cluster_size); > > - for (--i; i >= 0; i--) > + for (--i; i >= 0; i--) { > + if (!cc->cpages[i]) > + continue; > fscrypt_finalize_bounce_page(>cpages[i]); >

[f2fs-dev] [PATCH 2/2] f2fs: allow direct io of pinned files for zoned storage

2024-04-11 Thread Daeho Jeong
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 --- fs/f2fs/file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 3ee61bc82c6f

[f2fs-dev] [PATCH 1/2] f2fs: prevent writing without fallocate() for pinned files

2024-04-11 Thread Daeho Jeong
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 --- v2: covered the direct io case

Re: [f2fs-dev] [PATCH v4] f2fs: zone: don't block IO if there is remained open zone

2024-04-11 Thread Daeho Jeong
e, and increase it after completion > of last IO in the zone. > > Cc: Daeho Jeong > Signed-off-by: Chao Yu > --- > v4: > - avoid unneeded condition in f2fs_blkzoned_submit_merged_write(). > fs/f2fs/data.c| 105 ++ > fs/

Re: [f2fs-dev] [PATCH v3] f2fs: zone: don't block IO if there is remained open zone

2024-04-10 Thread Daeho Jeong
e, 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 ++-

Re: [f2fs-dev] [PATCH] f2fs_io: support unset subcommand for pinfile

2024-04-10 Thread Daeho Jeong
, argv[2]); > > + } else if (!strcmp(argv[1], "unset")) { > > + pin = 0; > > + ret = ioctl(fd, F2FS_IOC_SET_PIN_FILE, ); > > + if (ret != 0) > > + die_errno("F2FS_IOC_SET

Re: [f2fs-dev] [PATCH v2] f2fs: don't set RO when shutting down f2fs

2024-04-09 Thread Daeho Jeong
+* RO by shutdown, since RO bypasses thaw_super which can hang the > +* system. > +*/ > + if (continue_fs || f2fs_readonly(sb) || shutdown) { > + f2fs_warn(sbi, "Stopped filesystem due to reason: %d", > reason); >

[f2fs-dev] [PATCH] f2fs: write missing last sum blk of file pinning section

2024-04-09 Thread Daeho Jeong
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 --

Re: [f2fs-dev] [PATCH] f2fs: don't set RO when shutting down f2fs

2024-04-09 Thread Daeho Jeong
On Thu, Apr 4, 2024 at 12:54 PM Jaegeuk Kim wrote: > > Shutdown does not check the error of thaw_super due to readonly, which > causes a deadlock like below. > > f2fs_ioc_shutdown(F2FS_GOING_DOWN_FULLSYNC)issue_discard_thread > - bdev_freeze > - freeze_super > - f2fs_stop_checkpoint()

Re: [f2fs-dev] [PATCH v7] f2fs: fix zoned block device information initialization

2024-04-08 Thread Daeho Jeong
s_per_blkz != > SECTOR_TO_BLOCK(zone_sectors)) > @@ -4191,6 +4215,9 @@ static int f2fs_scan_devices(struct f2fs_sb_info *sbi) > > logical_blksize = bdev_logical_block_size(sbi->sb->s_bdev); > sbi->aligned_blk

Re: [f2fs-dev] [PATCH] f2fs-tools: give 6 sections for overprovision buffer

2024-04-08 Thread Daeho Jeong
+ > - 2 * get_sb(segs_per_sec)); > + overprovision_segment_buffer(sb)); > } > > if (f2fs_get_usable_segments(sb) <= get_cp(overprov_segment_count)) { > -- > 2.44.0.478.gd926399ef9-goo

Re: [f2fs-dev] [PATCH v6] f2fs: fix zoned block device information initialization

2024-04-04 Thread Daeho Jeong
On Thu, Mar 28, 2024 at 12:23 AM Chao Yu 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. > > Signed-off-by:

Re: [f2fs-dev] [PATCH v2] f2fs: zone: don't block IO if there is remained open zone

2024-04-01 Thread Daeho Jeong
e, and increase it after completion > of last IO in the zone. > > Cc: Daeho Jeong > Signed-off-by: Chao Yu > --- > v2: > - remove unneeded declaration. > fs/f2fs/data.c| 80 +-- > fs/f2fs/f2fs.h| 33 ---

[f2fs-dev] [PATCH v7] f2fs: prevent writing without fallocate() for pinned files

2024-04-01 Thread Daeho Jeong
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 --- v2: covered the direct io case

[f2fs-dev] [PATCH v6] f2fs: prevent writing without fallocate() for pinned files

2024-03-29 Thread Daeho Jeong
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 --- v2: covered the direct io case

[f2fs-dev] [PATCH v5] f2fs: prevent writing without fallocate() for pinned files

2024-03-26 Thread Daeho Jeong
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 --- v2: covered the direct io case

Re: [f2fs-dev] [PATCH v3] f2fs: prevent writing without fallocate() for pinned files

2024-03-26 Thread Daeho Jeong
On Mon, Mar 25, 2024 at 8:39 PM Chao Yu wrote: > > On 2024/3/25 23:02, Daeho Jeong wrote: > > On Fri, Mar 22, 2024 at 9:26 PM Chao Yu wrote: > >> > >> On 2024/3/21 1:42, Daeho Jeong wrote: > >>> On Wed, Mar 20, 2024 at 2:38 AM Chao Yu wrote: > >

Re: [f2fs-dev] [PATCH v3] f2fs: prevent writing without fallocate() for pinned files

2024-03-25 Thread Daeho Jeong
On Fri, Mar 22, 2024 at 9:26 PM Chao Yu wrote: > > On 2024/3/21 1:42, Daeho Jeong wrote: > > On Wed, Mar 20, 2024 at 2:38 AM Chao Yu wrote: > >> > >> On 2024/3/20 5:23, Daeho Jeong wrote: > >>> From: Daeho Jeong > >>> > >>&

[f2fs-dev] [PATCH v4] f2fs: prevent writing without fallocate() for pinned files

2024-03-22 Thread Daeho Jeong
From: Daeho Jeong In a case writing without fallocate(), we can't guarantee it's allocated in the conventional area for zoned stroage. Signed-off-by: Daeho Jeong --- v2: covered the direct io case v3: covered the mkwrite case v4: moved pin file check position in prepare_write_begin() --- fs

Re: [f2fs-dev] [PATCH v3] f2fs: prevent writing without fallocate() for pinned files

2024-03-20 Thread Daeho Jeong
On Wed, Mar 20, 2024 at 2:38 AM Chao Yu wrote: > > On 2024/3/20 5:23, Daeho Jeong wrote: > > From: Daeho Jeong > > > > In a case writing without fallocate(), we can't guarantee it's allocated > > in the conventional area for zoned stroage. > > > >

[f2fs-dev] [PATCH v3] f2fs: prevent writing without fallocate() for pinned files

2024-03-19 Thread Daeho Jeong
From: Daeho Jeong In a case writing without fallocate(), we can't guarantee it's allocated in the conventional area for zoned stroage. Signed-off-by: Daeho Jeong --- v2: covered the direct io case v3: covered the mkwrite case --- fs/f2fs/data.c | 14 -- fs/f2fs/file.c | 16

[f2fs-dev] [PATCH v3] f2fs: prevent writing without fallocate() for pinned files

2024-03-19 Thread Daeho Jeong
From: Daeho Jeong In a case writing without fallocate(), we can't guarantee it's allocated in the conventional area for zoned stroage. Signed-off-by: Daeho Jeong --- v2: covered the direct io case v3: covered the mkwrite case --- fs/f2fs/data.c | 14 -- fs/f2fs/file.c | 16

Re: [f2fs-dev] [bug report]WARNING: CPU: 22 PID: 44011 at fs/iomap/iter.c:51 iomap_iter+0x32b observed with blktests zbd/010

2024-03-18 Thread Daeho Jeong
On Sun, Mar 17, 2024 at 10:49 PM Shinichiro Kawasaki via Linux-f2fs-devel wrote: > > I confirmed that the trigger commit is dbf8e63f48af as Yi reported. I took a > look in the commit, but it looks fine to me. So I thought the cause is not > in the commit diff. > > I found the WARN is printed when

Re: [f2fs-dev] [PATCH 1/2] f2fs: mark inode dirty for FI_ATOMIC_COMMITTED flag

2024-03-13 Thread Daeho Jeong
Reviewed-by: Daeho Jeong On Wed, Mar 13, 2024 at 4:37 AM Sunmin Jeong wrote: > > In f2fs_update_inode, i_size of the atomic file isn't updated until > FI_ATOMIC_COMMITTED flag is set. When committing atomic write right > after the writeback of the inode, i_size of t

Re: [f2fs-dev] [PATCH 2/2] f2fs: truncate page cache before clearing flags when aborting atomic write

2024-03-13 Thread Daeho Jeong
Reviewed-by: Daeho Jeong On Wed, Mar 13, 2024 at 4:29 AM Sunmin Jeong wrote: > > In f2fs_do_write_data_page, FI_ATOMIC_FILE flag selects the target inode > between the original inode and COW inode. When aborting atomic write and > writeback occur simultaneously, invalid data ca

[f2fs-dev] [PATCH v2] f2fs: prevent writing without fallocate() for pinned files

2024-03-12 Thread Daeho Jeong
From: Daeho Jeong In a case writing without fallocate(), we can't guarantee it's allocated in the conventional area for zoned stroage. Signed-off-by: Daeho Jeong --- v2: covered the direct io case --- fs/f2fs/data.c | 14 -- fs/f2fs/file.c | 4 2 files changed, 16 insertions

[f2fs-dev] [PATCH 2/2] f2fs: prevent writing without fallocate() for pinned files

2024-03-11 Thread Daeho Jeong
From: Daeho Jeong In a case writing without fallocate(), we can't guarantee it's allocated in the conventional area for zoned stroage. Signed-off-by: Daeho Jeong --- fs/f2fs/data.c | 7 +++ fs/f2fs/file.c | 4 2 files changed, 11 insertions(+) diff --git a/fs/f2fs/data.c b/fs/f2fs

[f2fs-dev] [PATCH 1/2] f2fs: prevent atomic write on pinned file

2024-03-11 Thread Daeho Jeong
From: Daeho Jeong Since atomic write way was changed to out-place-update, we should prevent it on pinned files. Signed-off-by: Daeho Jeong --- fs/f2fs/file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 1c044fb19c87..82277e95c88f

[f2fs-dev] [PATCH] f2fs-tools: reset only current zones

2024-03-08 Thread Daeho Jeong
From: Daeho Jeong Send reset commands to only current zones and finish the others. Signed-off-by: Daeho Jeong --- fsck/fsck.c | 53 +++-- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/fsck/fsck.c b/fsck/fsck.c index 3461a52

Re: [f2fs-dev] [PATCH v2] mkfs.f2fs: should give section-aligned reserved segments

2024-03-08 Thread Daeho Jeong
Reviewed-by: Daeho Jeong On Fri, Feb 23, 2024 at 6:02 PM Jaegeuk Kim wrote: > > The reserved segments should be aligned to the section boundary. > > Signed-off-by: Jaegeuk Kim > --- > > v2: > - fix bug > > include/f2fs_fs.h | 12 +++- > 1 file chan

Re: [f2fs-dev] [PATCH] f2fs-tools: deal with permission denial on non-root user

2024-03-05 Thread Daeho Jeong
Reviewed-by: Daeho Jeong On Tue, Mar 5, 2024 at 12:50 PM Jaegeuk Kim wrote: > > This fixes some android build failures due to the missing permission when > checking the loop device. Until we get a better solution, let's ignore > the error with warnings. > > Signed-o

Re: [f2fs-dev] [PATCH 4/4] f2fs: fix to reset fields for unloaded curseg

2024-02-29 Thread Daeho Jeong
Reviewed-by: Daeho Jeong Thanks, On Sun, Feb 25, 2024 at 5:33 PM Chao Yu wrote: > > In f2fs_allocate_data_block(), before skip allocating new segment > for DATA_PINNED log header, it needs to tag log header as unloaded > one to avoid skipping logic in locate_d

Re: [f2fs-dev] [PATCH 3/4] f2fs: clean up new_curseg()

2024-02-29 Thread Daeho Jeong
Reviewed-by: Daeho Jeong Thanks, On Sun, Feb 25, 2024 at 5:33 PM Chao Yu wrote: > > Move f2fs_valid_pinned_area() check logic from new_curseg() to > get_new_segment(), it can avoid calling __set_free() if it fails > to find free segment in conventional zone for pinned file. &g

Re: [f2fs-dev] [PATCH 1/4] f2fs: fix blkofs_end correctly in f2fs_migrate_blocks()

2024-02-29 Thread Daeho Jeong
On Thu, Feb 29, 2024 at 2:11 AM Chao Yu wrote: > > Jaegeuk, Daeho, > > Any comments on this serials? > > Thanks, No functional difference here, since start_blk is always aligned with the section address. However, this is more clear in itself. Reviewed-by: Daeho Jeong Thanks,

Re: [f2fs-dev] [PATCH 2/4] f2fs: relocate f2fs_precache_extents() in f2fs_swap_activate()

2024-02-29 Thread Daeho Jeong
Reviewed-by: Daeho Jeong Thanks, On Sun, Feb 25, 2024 at 5:33 PM Chao Yu wrote: > > This patch exchangs position of f2fs_precache_extents() and > filemap_fdatawrite(), so that f2fs_precache_extents() can load > extent info after physical addresses of all data are fixed. > > S

Re: [f2fs-dev] [PATCH 5/5] f2fs: allow to mount if cap is 100

2024-02-27 Thread Daeho Jeong
On Mon, Feb 26, 2024 at 2:47 PM Jaegeuk Kim wrote: > > On 02/26, Daeho Jeong wrote: > > On Fri, Feb 23, 2024 at 12:56 PM Jaegeuk Kim wrote: > > > > > > Don't block mounting the partition, if cap is 100%. > > > > > > Signed-off-by: Jaegeuk Kim >

Re: [f2fs-dev] [PATCH 5/5] f2fs: allow to mount if cap is 100

2024-02-26 Thread Daeho Jeong
On Fri, Feb 23, 2024 at 12:56 PM Jaegeuk Kim wrote: > > Don't block mounting the partition, if cap is 100%. > > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/segment.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c > index

Re: [f2fs-dev] [PATCH 4/5] f2fs: prevent an f2fs_gc loop during disable_checkpoint

2024-02-26 Thread Daeho Jeong
Reviewed-by: Daeho Jeong On Sun, Feb 25, 2024 at 6:59 PM Chao Yu wrote: > > On 2024/2/24 4:55, Jaegeuk Kim wrote: > > Don't get stuck in the f2fs_gc loop while disabling checkpoint. Instead, we > > have > > a time-based management. > > > > Signed-off-by: J

Re: [f2fs-dev] [PATCH 3/5] f2fs: print zone status in string and some log

2024-02-26 Thread Daeho Jeong
On Fri, Feb 23, 2024 at 12:56 PM Jaegeuk Kim wrote: > > No functional change, but add some more logs. > > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/segment.c | 34 -- > fs/f2fs/super.c | 1 + > 2 files changed, 25 insertions(+), 10 deletions(-) > > diff --git

Re: [f2fs-dev] [PATCH 2/5] f2fs: fix write pointers all the time

2024-02-26 Thread Daeho Jeong
On Sun, Feb 25, 2024 at 6:49 PM Chao Yu wrote: > > On 2024/2/24 4:55, Jaegeuk Kim wrote: > > Even if the roll forward recovery stopped due to any error, we have to fix > > the write pointers in order to mount the disk from the previous checkpoint. > > Jaegeuk, > > IIUC, we may lost warm node

Re: [f2fs-dev] [PATCH 1/5] f2fs: check number of blocks in a current section

2024-02-26 Thread Daeho Jeong
On Sun, Feb 25, 2024 at 6:42 PM Chao Yu wrote: > > On 2024/2/24 4:55, Jaegeuk Kim wrote: > > In cfd66bb715fd ("f2fs: fix deadloop in foreground GC"), we needed to check > > the number of blocks in a section instead of the segment. > > > > In addtion, let's check the entire node sections when

Re: [f2fs-dev] [PATCH v6] f2fs: New victim selection for GC

2024-02-20 Thread Daeho Jeong
On Tue, Feb 13, 2024 at 5:36 PM Yonggil Song wrote: > > > Overview > > > This patch introduces a new way to preference data sections when selecting > GC victims. Migration of data blocks causes invalidation of node blocks. > Therefore, in situations where GC is frequent, selecting data

[f2fs-dev] [PATCH v2] f2fs_io: add lseek command to execute lseek()

2024-02-15 Thread Daeho Jeong
From: Daeho Jeong Added lseek command to support lseek() for SEEK_DATA and SEEK_HOLE. Signed-off-by: Daeho Jeong --- v2: add SEEK_SET, SEEK_CUR and SEEK_END --- tools/f2fs_io/f2fs_io.c | 47 + 1 file changed, 47 insertions(+) diff --git a/tools/f2fs_io

Re: [f2fs-dev] [PATCH] f2fs_io: add lseek command to execute lseek()

2024-02-15 Thread Daeho Jeong
On Thu, Feb 15, 2024 at 12:36 PM Jaegeuk Kim wrote: > > On 02/15, Daeho Jeong wrote: > > From: Daeho Jeong > > > > Added lseek command to support lseek() for SEEK_DATA and SEEK_HOLE. > > > > Signed-off-by: Daeho Jeong >

[f2fs-dev] [PATCH] f2fs: support SEEK_DATA and SEEK_HOLE for compression files

2024-02-15 Thread Daeho Jeong
From: Daeho Jeong Fix to support SEEK_DATA and SEEK_HOLE for compression files Signed-off-by: Daeho Jeong --- fs/f2fs/file.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 21c3aa93a8db..aa19d8bed479 100644

[f2fs-dev] [PATCH] f2fs_io: add lseek command to execute lseek()

2024-02-15 Thread Daeho Jeong
From: Daeho Jeong Added lseek command to support lseek() for SEEK_DATA and SEEK_HOLE. Signed-off-by: Daeho Jeong --- tools/f2fs_io/f2fs_io.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a/tools/f2fs_io/f2fs_io.c b/tools/f2fs_io/f2fs_io.c index

Re: [f2fs-dev] [PATCH] mkfs.f2fs: fix sparse_mode case on stat

2024-02-13 Thread Daeho Jeong
Reviewed-by: Daeho Jeong On Tue, Feb 13, 2024 at 3:42 PM Jaegeuk Kim wrote: > > When we turn on sparse_mode, stat() will be failed, as the file will be > created afterwards. Let's fix. > > Fixes: 14197d546b93 ("f2fs-tools: fix to check loop device") > Signed-off-b

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

2024-02-13 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

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

2024-02-13 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 --- v3: check the hole when migrating blocks for swap. do not use the remainder of cold pin section. v2: flush previous dirty pages before swapon

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

2024-02-08 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 --- v2: flush previous dirty pages before swapon. do not re-check for the last extent of swap area. merge this patch with swap file pinning

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

2024-02-08 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

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

2024-02-07 Thread Daeho Jeong
Reviewed-by: Daeho Jeong On Tue, Feb 6, 2024 at 4:54 PM Jaegeuk Kim wrote: > > 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

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

2024-02-07 Thread Daeho Jeong
Reviewed-by: Daeho Jeong On Tue, Feb 6, 2024 at 4:55 PM Jaegeuk Kim wrote: > > 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

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

2024-02-07 Thread Daeho Jeong
Reviewed-by: Daeho Jeong On Wed, Feb 7, 2024 at 3:31 PM Jaegeuk Kim wrote: > > Since we don't see any user, let's kill. > > Signed-off-by: Jaegeuk Kim > --- > > from v1: > - keep setting the seq bit > > Documentation/ABI/testing/sysfs-fs-f

Re: [f2fs-dev] [PATCH] f2fs: kill heap-based allocation

2024-02-07 Thread Daeho Jeong
Reviewed-by: Daeho Jeong On Wed, Feb 7, 2024 at 8:50 AM Jaegeuk Kim wrote: > > No one uses this feature. Let's kill it. > > Signed-off-by: Jaegeuk Kim > --- > Documentation/filesystems/f2fs.rst | 3 -- > fs/f2fs/f2fs.h | 51 ++-

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

2024-02-07 Thread Daeho Jeong
able_blocks_per_sec > > -Date:June 2022 > > -Contact: "Jaegeuk Kim" > > -Description: Shows the number of unusable blocks in a section which was > > defined by > > - the zone capacity reported by underlying zoned device. >

[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

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

2024-01-31 Thread Daeho Jeong
From: Daeho Jeong Make to allocate logs after conventional area for HM zoned devices to spare them for file pinning support. Signed-off-by: Daeho Jeong --- v2: make current segment numbers relative to main start block. check zoned block availability before the allocation. --- mkfs

Re: [f2fs-dev] [PATCH] f2fs: zone: fix to wait completion of last bio in zone correctly

2024-01-29 Thread Daeho Jeong
Reviewed-by: Daeho Jeong Thanks, On Mon, Jan 29, 2024 at 3:29 AM Chao Yu wrote: > > It needs to check last zone_pending_bio and wait IO completion before > traverse next fio in io->io_list, otherwise, bio in next zone may be > submitted before all IO completion in current

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

2024-01-29 Thread Daeho Jeong
On Sun, Jan 28, 2024 at 5:27 PM Chao Yu wrote: > > On 2024/1/27 2:17, Daeho Jeong wrote: > > On Thu, Jan 25, 2024 at 5:27 PM Chao Yu wrote: > >> > >> On 2024/1/26 0:25, Daeho Jeong wrote: > >>> On Wed, Jan 24, 2024 at 7:34 PM Chao Yu wrote: > >

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

2024-01-26 Thread Daeho Jeong
On Thu, Jan 25, 2024 at 5:27 PM Chao Yu wrote: > > 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

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

2024-01-25 Thread Daeho Jeong
check that? though it's a corner > case. Can you elaborate more? In the case of F2FS_ZONED_HM, we have the devices[1]. Do you mean the case we format the filesystem intentionally smaller than what devices have? > > On 2024/1/18 7:00, Daeho Jeong wrote: > > From: Daeho Jeo

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

2024-01-17 Thread Daeho Jeong
From: Daeho Jeong Make to allocate logs after conventional area for HM zoned devices to spare them for file pinning support. Signed-off-by: Daeho Jeong --- mkfs/f2fs_format.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c index

Re: [f2fs-dev] [PATCH v1] f2fs: fix max open zone constraints

2024-01-16 Thread Daeho Jeong
On Tue, Jan 16, 2024 at 2:58 PM Daeho Jeong wrote: > > On Tue, Jan 16, 2024 at 6:36 AM Wenjie Qi wrote: > > > > We can get the number of remaining available zone > > resources by subtracting the number of active logs from > > the number of max active zones of

Re: [f2fs-dev] [PATCH v1] f2fs: fix max open zone constraints

2024-01-16 Thread Daeho Jeong
On Tue, Jan 16, 2024 at 6:36 AM Wenjie Qi wrote: > > We can get the number of remaining available zone > resources by subtracting the number of active logs from > the number of max active zones of zoned devices. We can > use these available zone resources to reduce the number > of pending bio

Re: [f2fs-dev] [PATCH v1] f2fs: fix NULL pointer dereference in f2fs_submit_page_write()

2024-01-16 Thread Daeho Jeong
On Tue, Jan 16, 2024 at 6:13 AM Wenjie Qi wrote: > > BUG: kernel NULL pointer dereference, address: 0014 > RIP: 0010:f2fs_submit_page_write+0x6cf/0x780 [f2fs] > Call Trace: > > ? show_regs+0x6e/0x80 > ? __die+0x29/0x70 > ? page_fault_oops+0x154/0x4a0 > ? prb_read_valid+0x20/0x30 > ?

Re: [f2fs-dev] [PATCH v4 6/6] f2fs: introduce FAULT_BLKADDR_CONSISTENCE

2024-01-12 Thread Daeho Jeong
Reviewed-by: Daeho Jeong On Wed, Jan 10, 2024 at 10:43 PM Chao Yu wrote: > > We will encounter below inconsistent status when FAULT_BLKADDR type > fault injection is on. > > Info: checkpoint state = d6 : nat_bits crc fsck compacted_summary > orphan_inodes sudden-p

Re: [f2fs-dev] [PATCH v4 5/6] f2fs: fix to remove unnecessary f2fs_bug_on() to avoid panic

2024-01-12 Thread Daeho Jeong
Reviewed-by: Daeho Jeong On Wed, Jan 10, 2024 at 10:43 PM Chao Yu wrote: > > verify_blkaddr() will trigger panic once we inject fault into > f2fs_is_valid_blkaddr(), fix to remove this unnecessary f2fs_bug_on(). > > Fixes: 18792e64c86d ("f2fs: sup

Re: [f2fs-dev] [PATCH v4 4/6] f2fs: compress: fix to avoid inconsistence bewteen i_blocks and dnode

2024-01-12 Thread Daeho Jeong
Reviewed-by: Daeho Jeong On Wed, Jan 10, 2024 at 10:43 PM Chao Yu wrote: > > In reserve_compress_blocks(), we update blkaddrs of dnode in prior to > inc_valid_block_count(), it may cause inconsistent status bewteen > i_blocks and blkaddrs once inc_valid_block_count() fails

Re: [f2fs-dev] [PATCH v3 3/6] f2fs: compress: fix to check unreleased compressed cluster

2024-01-12 Thread Daeho Jeong
On Thu, Jan 11, 2024 at 5:06 PM Chao Yu wrote: > > On 2024/1/12 1:15, Daeho Jeong wrote: > > On Wed, Jan 10, 2024 at 5:33 PM Chao Yu wrote: > >> > >> On 2024/1/11 9:18, Daeho Jeong wrote: > >>> On Thu, Dec 28, 2023 at 6:33 AM Chao

Re: [f2fs-dev] [PATCH v3 1/6] f2fs: compress: fix to guarantee persisting compressed blocks by CP

2024-01-12 Thread Daeho Jeong
Reviewed-by: Daeho Jeong On Thu, Jan 11, 2024 at 9:17 AM Daeho Jeong wrote: > > On Wed, Jan 10, 2024 at 5:26 PM Chao Yu wrote: > > > > On 2024/1/11 8:55, Daeho Jeong wrote: > > > On Thu, Dec 28, 2023 at 6:33 AM Chao Yu wrote: > > >> > > >> I

Re: [f2fs-dev] [PATCH v4 2/6] f2fs: compress: fix to cover normal cluster write with cp_rwsem

2024-01-12 Thread Daeho Jeong
Reviewed-by: Daeho Jeong On Wed, Jan 10, 2024 at 10:43 PM Chao Yu wrote: > > When we overwrite compressed cluster w/ normal cluster, we should > not unlock cp_rwsem during f2fs_write_raw_pages(), otherwise data > will be corrupted if partial blocks were persisted before CP &

Re: [f2fs-dev] [PATCH v3 1/6] f2fs: compress: fix to guarantee persisting compressed blocks by CP

2024-01-11 Thread Daeho Jeong
On Wed, Jan 10, 2024 at 5:26 PM Chao Yu wrote: > > On 2024/1/11 8:55, Daeho Jeong wrote: > > On Thu, Dec 28, 2023 at 6:33 AM Chao Yu wrote: > >> > >> If data block in compressed cluster is not persisted with metadata > >> during checkpoint, after

Re: [f2fs-dev] [PATCH v3 3/6] f2fs: compress: fix to check unreleased compressed cluster

2024-01-11 Thread Daeho Jeong
On Wed, Jan 10, 2024 at 5:33 PM Chao Yu wrote: > > On 2024/1/11 9:18, Daeho Jeong wrote: > > On Thu, Dec 28, 2023 at 6:33 AM Chao Yu wrote: > >> > >> From: Sheng Yong > >> > >> Compressed cluster may not be released due to we can fail in > &

Re: [f2fs-dev] [PATCH v3 3/6] f2fs: compress: fix to check unreleased compressed cluster

2024-01-10 Thread Daeho Jeong
On Thu, Dec 28, 2023 at 6:33 AM Chao Yu wrote: > > From: Sheng Yong > > Compressed cluster may not be released due to we can fail in > release_compress_blocks(), fix to handle reserved compressed > cluster correctly in reserve_compress_blocks(). > > Fixes: 4c8ff7095bef ("f2fs: support data

Re: [f2fs-dev] [PATCH v3 1/6] f2fs: compress: fix to guarantee persisting compressed blocks by CP

2024-01-10 Thread Daeho Jeong
On Thu, Dec 28, 2023 at 6:33 AM Chao Yu wrote: > > If data block in compressed cluster is not persisted with metadata > during checkpoint, after SPOR, the data may be corrupted, let's > guarantee to write compressed page by checkpoint. > > Fixes: 4c8ff7095bef ("f2fs: support data compression") >

Re: [f2fs-dev] [PATCH 2/4] f2fs: fix write pointers on zoned device after roll forward

2023-12-04 Thread Daeho Jeong
LGTM On Mon, Dec 4, 2023 at 10:06 AM Jaegeuk Kim wrote: > > 1. do roll forward recovery > 2. update current segments pointers > 3. fix the entire zones' write pointers > 4. do checkpoint > > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/recovery.c | 2 ++ > 1 file changed, 2 insertions(+) > >

[f2fs-dev] [PATCH] f2fs-tools: skip finishing zones for current zones

2023-12-04 Thread Daeho Jeong
From: Daeho Jeong Do not finishing zones for current zones. Signed-off-by: Daeho Jeong Fixes: 06a25b021d15 ("f2fs-tools: make six open zone check resilient") --- fsck/fsck.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/fsck/fsck.c b/fsck/fs

Re: [f2fs-dev] [PATCH 3/4] f2fs: check write pointers when checkpoint=disable

2023-12-04 Thread Daeho Jeong
LGTM On Mon, Dec 4, 2023 at 10:06 AM Jaegeuk Kim wrote: > > Even if f2fs was rebooted as staying checkpoint=disable, let's match the write > pointers all the time. > > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/super.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git

Re: [f2fs-dev] [PATCH] fsck.f2fs: run full scan if checkpoint is disabled

2023-12-04 Thread Daeho Jeong
LGTM On Mon, Dec 4, 2023 at 10:07 AM Jaegeuk Kim wrote: > > Let's fix any inconsistency until checkpint being enabled back. > > Signed-off-by: Jaegeuk Kim > --- > fsck/mount.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/fsck/mount.c b/fsck/mount.c > index

Re: [f2fs-dev] [PATCH 4/4] f2fs: let's finish or reset zones all the time

2023-12-04 Thread Daeho Jeong
LGTM On Mon, Dec 4, 2023 at 10:07 AM Jaegeuk Kim wrote: > > In order to limit # of open zones, let's finish or reset zones given # of > valid blocks per section and its zone condition. > > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/segment.c | 74 +++

Re: [f2fs-dev] [PATCH 1/4] f2fs: allocate new section if it's not new

2023-12-04 Thread Daeho Jeong
LGTM On Mon, Dec 4, 2023 at 10:06 AM Jaegeuk Kim wrote: > > If fsck can allocate a new zone, it'd be better to use that instead of > allocating a new one. > > And, it modifies kernel messages. > > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/segment.c | 33 + > 1

[f2fs-dev] [PATCH] f2fs-tools: support zoned ufs devices

2023-11-30 Thread Daeho Jeong
From: Daeho Jeong Support zoned ufs devices. 1. implemented out-place updates 2. keep roll forward recovery intact 3. open block device files with O_SYNC to comply with zoned device's write rules Signed-off-by: Daeho Jeong --- fsck/defrag.c | 2 +- fsck/dir.c | 47

[f2fs-dev] [PATCH] f2fs-tools: convert lost+found dir to regular dentry before adding nodes

2023-11-29 Thread Daeho Jeong
From: Daeho Jeong fsck doesn't support adding inodes to inline dentries. So, need to convert inline lost+found dentry before adding missing inodes. Signed-off-by: Daeho Jeong --- fsck/fsck.c | 8 fsck/fsck.h | 4 2 files changed, 12 insertions(+) diff --git a/fsck/fsck.c b/fsck

[f2fs-dev] [PATCH] f2fs-tools: adjust nat and block release logic

2023-11-17 Thread Daeho Jeong
From: Daeho Jeong Fixes: 0f503e443ccb ("f2fs-tools: do not reuse corrupted quota inodes") Signed-off-by: Daeho Jeong --- fsck/fsck.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fsck/fsck.c b/fsck/fsck.c index 55eddca..2bb759c 100644 --- a/fsck/fsck.c

Re: [f2fs-dev] [PATCH v2] f2fs-tools: do not reuse corrupted quota inodes

2023-11-17 Thread Daeho Jeong
On Fri, Nov 17, 2023 at 9:24 AM Jaegeuk Kim wrote: > > On 11/15, Chao Yu wrote: > > On 2023/10/27 8:21, Daeho Jeong wrote: > > > From: Daeho Jeong > > > > > > When we detect quota inode corruption, we better deallocate the current > > &g

[f2fs-dev] [PATCH] f2fs-tools: initialize user cache valid values

2023-11-09 Thread Daeho Jeong
From: Daeho Jeong Need to initialize user cache valid values to prevent from providing false cache entries. Signed-off-by: Daeho Jeong --- lib/libf2fs_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libf2fs_io.c b/lib/libf2fs_io.c index 39d3777..d76da83 100644

  1   2   3   4   5   >