Re: [f2fs-dev] [PATCH v2] f2fs: add support for counting time of submit discard cmd

2022-12-12 Thread Jaegeuk Kim
On 12/12, Chao Yu wrote: > On 2022/12/12 20:51, Yangtao Li wrote: > > This patch adds support for counting the average time and > > peak time of submit discard command, and we can see its > > value in debugfs. > > > > It is not sure whether the block layer has recorded these > > data, and these da

Re: [f2fs-dev] [PATCH v2] f2fs: don't call f2fs_issue_discard_timeout() when discard_cmd_cnt is 0 in f2fs_put_super()

2022-12-12 Thread Jaegeuk Kim
On 12/12, Chao Yu wrote: > On 2022/12/12 22:14, Yangtao Li wrote: > > Hi Chao, > > > > > The difference here is, if we use f2fs_realtime_discard_enable() in > > > f2fs_put_super(), we will only write checkpoint w/ CP_TRIMMED flag > > > when discard option is enable and device supports discard. > >

Re: [f2fs-dev] [PATCH] f2fs: don't set FI_COMPRESS_RELEASED if file is not compressed

2022-12-09 Thread Jaegeuk Kim
On 12/08, zhoudan8 wrote: > In compress_mode=user, f2fs_release_compress_blocks() > does not verify whether it has been compressed and > sets FI_COMPRESS_RELEASED directly. which will lead to > return -EINVAL after calling compress. > To fix it,let's do not set FI_COMPRESS_RELEASED if file > is n

Re: [f2fs-dev] [PATCH 2/2] f2fs: add support for counting the average time of submit discard cmd

2022-12-09 Thread Jaegeuk Kim
On 11/29, Yangtao Li wrote: > This patch adds support for counting the average time of submit discard > command, and we can see its value in debugfs. What about peak latencies as well? > > Signed-off-by: Yangtao Li > --- > fs/f2fs/debug.c | 7 +-- > fs/f2fs/f2fs.h| 5 + > fs/f2

Re: [f2fs-dev] [PATCH 1/6 v2] f2fs: specify extent cache for read explicitly

2022-12-09 Thread Jaegeuk Kim
Let's descrbie it's read extent cache. Signed-off-by: Jaegeuk Kim --- Change log from v1: - keep showing the mount option fs/f2fs/extent_cache.c | 4 ++-- fs/f2fs/f2fs.h | 10 +- fs/f2fs/inode.c| 2 +- fs/f2fs/node.c | 2 +- fs/f2fs/node.h

Re: [f2fs-dev] [PATCH 1/6] f2fs: specify extent cache for read explicitly

2022-12-09 Thread Jaegeuk Kim
On 12/09, Chao Yu wrote: > On 2022/12/9 1:29, Jaegeuk Kim wrote: > > On 12/08, Chao Yu wrote: > > > On 2022/12/6 2:54, Jaegeuk Kim wrote: > > > > Let's descrbie it's read extent cache. > > > > > > > > Signed-off-by:

Re: [f2fs-dev] [PATCH 1/6] f2fs: specify extent cache for read explicitly

2022-12-08 Thread Jaegeuk Kim
On 12/08, Chao Yu wrote: > On 2022/12/6 2:54, Jaegeuk Kim wrote: > > Let's descrbie it's read extent cache. > > > > Signed-off-by: Jaegeuk Kim > > --- > > fs/f2fs/extent_cache.c | 4 ++-- > > fs/f2fs/f2fs.h | 10 +- > >

Re: [f2fs-dev] [PATCH 6/6 v2] f2fs: add block_age-based extent cache

2022-12-06 Thread Jaegeuk Kim
ge of test device is large enough(128G) so that it will not switch to SSR mode during the test. Benefit: dirty segment count increment reduce about 14% - before: Dirty +21110 - after: Dirty +18286 Signed-off-by: qixiaoyu1 Signed-off-by: xiongping1 Signed-off-by: Jaegeuk Kim --- Change l

Re: [f2fs-dev] [PATCH 4/6 v2] f2fs: refactor extent_cache to support for read and more

2022-12-06 Thread Jaegeuk Kim
This patch prepares extent_cache to get more use-cases. Signed-off-by: Jaegeuk Kim --- Change log from v1: - fix a bug fs/f2fs/data.c | 14 +++ fs/f2fs/debug.c| 53 +- fs/f2fs/extent_cache.c | 85 +++--- 3

Re: [f2fs-dev] [PATCH 1/5] f2fs: record total data blocks allocated since mount

2022-12-05 Thread Jaegeuk Kim
On 11/28, Jaegeuk Kim wrote: > On 11/28, qixiaoyu1 wrote: > > From: xiongping1 > > > > Signed-off-by: xiongping1 > > Signed-off-by: qixiaoyu1 > > --- > > fs/f2fs/Kconfig | 7 +++ > > fs/f2fs/Makefile| 1 + > > fs/f2fs/block_a

[f2fs-dev] [PATCH 4/6] f2fs: refactor extent_cache to support for read and more

2022-12-05 Thread Jaegeuk Kim
This patch prepares extent_cache to be ready for addition. Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 20 +- fs/f2fs/debug.c | 65 +++-- fs/f2fs/extent_cache.c | 463 +--- fs/f2fs/f2fs.h | 108 ++--- fs/f2fs

[f2fs-dev] [PATCH 1/6] f2fs: specify extent cache for read explicitly

2022-12-05 Thread Jaegeuk Kim
Let's descrbie it's read extent cache. Signed-off-by: Jaegeuk Kim --- fs/f2fs/extent_cache.c | 4 ++-- fs/f2fs/f2fs.h | 10 +- fs/f2fs/inode.c| 2 +- fs/f2fs/node.c | 2 +- fs/f2fs/node.h | 2 +- fs/f2fs/segment.c | 4 ++-- fs/f2

[f2fs-dev] [PATCH 6/6] f2fs: add block_age-based extent cache

2022-12-05 Thread Jaegeuk Kim
ge of test device is large enough(128G) so that it will not switch to SSR mode during the test. Benefit: dirty segment count increment reduce about 14% - before: Dirty +21110 - after: Dirty +18286 Signed-off-by: qixiaoyu1 Signed-off-by: xiongping1 Signed-off-by: Jaegeuk Kim --- Documentation/A

[f2fs-dev] [PATCH 5/6] f2fs: allocate the extent_cache by default

2022-12-05 Thread Jaegeuk Kim
Let's allocate it to remove the runtime complexity. Signed-off-by: Jaegeuk Kim --- fs/f2fs/extent_cache.c | 38 +++--- fs/f2fs/f2fs.h | 3 ++- fs/f2fs/inode.c| 6 -- fs/f2fs/namei.c| 4 ++-- 4 files changed, 27 insertions(+

[f2fs-dev] [PATCH 3/6] f2fs: remove unnecessary __init_extent_tree

2022-12-05 Thread Jaegeuk Kim
Added into the caller. Signed-off-by: Jaegeuk Kim --- fs/f2fs/extent_cache.c | 21 + 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/fs/f2fs/extent_cache.c b/fs/f2fs/extent_cache.c index 2a8e31e6d518..c6810347e205 100644 --- a/fs/f2fs/extent_cache.c +++ b/fs

[f2fs-dev] [PATCH 2/6] f2fs: move internal functions into extent_cache.c

2022-12-05 Thread Jaegeuk Kim
No functional change. Signed-off-by: Jaegeuk Kim --- fs/f2fs/extent_cache.c | 88 +- fs/f2fs/f2fs.h | 69 + 2 files changed, 81 insertions(+), 76 deletions(-) diff --git a/fs/f2fs/extent_cache.c b/fs/f2fs

Re: [f2fs-dev] [xfstests-bld PATCH] test_appliance: add f2fs/compress config

2022-11-29 Thread Jaegeuk Kim
On 11/28, Eric Biggers wrote: > From: Eric Biggers > > Add a f2fs/compress configuration which causes all files to be > automatically compressed, similar to how f2fs/encrypt causes all files > to be automatically encrypted. > > Signed-off-by: Eric Biggers Acked-by:

Re: [f2fs-dev] [PATCH v4] fsverity: stop using PG_error to track error status

2022-11-29 Thread Jaegeuk Kim
On 11/28, Eric Biggers wrote: > On Mon, Nov 28, 2022 at 10:48:41PM -0800, Jaegeuk Kim wrote: > > > static void f2fs_finish_read_bio(struct bio *bio, bool in_task) > > > { > > > struct bio_vec *bv; > > > struct bvec_iter_all iter_all; > > > +

Re: [f2fs-dev] [PATCH v4] fsverity: stop using PG_error to track error status

2022-11-28 Thread Jaegeuk Kim
On 11/25, Eric Biggers wrote: > From: Eric Biggers > > As a step towards freeing the PG_error flag for other uses, change ext4 > and f2fs to stop using PG_error to track verity errors. Instead, if a > verity error occurs, just mark the whole bio as failed. The coarser > granularity isn't really

Re: [f2fs-dev] [PATCH 1/5] f2fs: record total data blocks allocated since mount

2022-11-28 Thread Jaegeuk Kim
On 11/28, qixiaoyu1 wrote: > From: xiongping1 > > Signed-off-by: xiongping1 > Signed-off-by: qixiaoyu1 > --- > fs/f2fs/Kconfig | 7 +++ > fs/f2fs/Makefile| 1 + > fs/f2fs/block_age.c | 28 > fs/f2fs/debug.c | 7 +++ > fs/f2fs/f2fs.h | 15

Re: [f2fs-dev] [PATCH] f2fs: add support for counting the average time of submit discard cmd

2022-11-28 Thread Jaegeuk Kim
Need to run checkpatch? On 11/23, Yangtao Li wrote: > This patch adds support for counting the average time of submit discard > command, and we can see its value in debugfs. > > Signed-off-by: Yangtao Li > --- > fs/f2fs/debug.c | 7 +-- > fs/f2fs/f2fs.h| 5 + > fs/f2fs/segment.c

Re: [f2fs-dev] [PATCH] f2fs: Add f2fs bug tracker link

2022-11-28 Thread Jaegeuk Kim
If you don't mind, let me merge this patch into Chao's patch, since both are same topic. On 11/28, Yangtao Li wrote: > It's better to use bugzilla.kernel.org for reporting bugs. > > Signed-off-by: Yangtao Li > --- > Documentation/filesystems/f2fs.rst | 6 +- > 1 file changed, 5 insertions(+

Re: [f2fs-dev] segment allocation cleanups

2022-11-28 Thread Jaegeuk Kim
On 11/28, Christoph Hellwig wrote: > Hi Jaegeuk and Chao, > > this series cleans up the segment allocation code a bit. Thanks, applied for test. > > Diffstat > segment.c | 71 > ++ > segment.h |6 - > 2 files changed, 30 in

Re: [f2fs-dev] [PATCH v4] fsverity: stop using PG_error to track error status

2022-11-28 Thread Jaegeuk Kim
ore > complicated than desired, but the basic premise still works. > > Note: there are still a few uses of PageError in f2fs, but they are on > the write path, so they are unrelated and this patch doesn't touch them. > > Reviewed-by: Chao Yu Acked-by: Jaegeuk Kim Thanks

Re: [f2fs-dev] [PATCH v7] f2fs: introduce F2FS_IOC_START_ATOMIC_REPLACE

2022-11-23 Thread Jaegeuk Kim
On 11/23, Chao Yu wrote: > On 2022/11/12 1:04, Daeho Jeong wrote: > > From: Daeho Jeong > > > > introduce a new ioctl to replace the whole content of a file atomically, > > which means it induces truncate and content update at the same time. > > We can start it with F2FS_IOC_START_ATOMIC_REPLACE

Re: [f2fs-dev] [PATCH v5] f2fs: fix to enable compress for newly created file if extension matches

2022-11-23 Thread Jaegeuk Kim
(), which do extension check, in f2fs_should_compress() to check extensions before setting inline data flag. Fixes: 7165841d578e ("f2fs: fix to check inline_data during compressed inode conversion") Signed-off-by: Sheng Yong Signed-off-by: Jaegeuk Kim --- Change log from v4

Re: [f2fs-dev] [PATCH v4] f2fs: fix to enable compress for newly created file if extension matches

2022-11-23 Thread Jaegeuk Kim
On 11/23, Chao Yu wrote: > On 2022/11/17 9:12, Jaegeuk Kim wrote: > > If compress_extension is set, and a newly created file matches the > > extension, the file could be marked as compression file. However, > > if inline_data is also enabled, there is no chance to check it

Re: [f2fs-dev] [PATCH v4] f2fs: fix to enable compress for newly created file if extension matches

2022-11-16 Thread Jaegeuk Kim
On 11/16, Sheng Yong wrote: > > > On 2022/11/16 7:00, Jaegeuk Kim wrote: > > If compress_extension is set, and a newly created file matches the > > extension, the file could be marked as compression file. However, > > if inline_data is also enabled, there is no chance

Re: [f2fs-dev] [PATCH v4] f2fs: fix to enable compress for newly created file if extension matches

2022-11-16 Thread Jaegeuk Kim
(), which do extension check, in f2fs_should_compress() to check extensions before setting inline data flag. Fixes: 7165841d578e ("f2fs: fix to check inline_data during compressed inode conversion") Signed-off-by: Sheng Yong Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h | 2 +- fs/f2

Re: [f2fs-dev] [PATCH v4] f2fs: fix to enable compress for newly created file if extension matches

2022-11-15 Thread Jaegeuk Kim
(), which do extension check, in f2fs_should_compress() to check extensions before setting inline data flag. Fixes: 7165841d578e ("f2fs: fix to check inline_data during compressed inode conversion") Signed-off-by: Sheng Yong Signed-off-by: Jaegeuk Kim --- Checking this version. fs/f

Re: [f2fs-dev] [PATCH v3] f2fs: fix to enable compress for newly created file if extension matches

2022-11-15 Thread Jaegeuk Kim
eturns false. > > This patch moves set_compress_inode(), which do extension check, in > f2fs_should_compress() to check extensions before setting inline > data flag. > > Fixes: 7165841d578e ("f2fs: fix to check inline_data during compressed inode > conversion") > Signe

Re: [f2fs-dev] [PATCH v3] f2fs: fix to enable compress for newly created file if extension matches

2022-11-15 Thread Jaegeuk Kim
eturns false. > > This patch moves set_compress_inode(), which do extension check, in > f2fs_should_compress() to check extensions before setting inline > data flag. > > Fixes: 7165841d578e ("f2fs: fix to check inline_data during compressed inode > conversion") > Signe

Re: [f2fs-dev] [PATCH v2 1/2] f2fs: fix to enable compress for newly created file if extension matches

2022-11-14 Thread Jaegeuk Kim
On 11/14, Jaegeuk Kim wrote: > If compress_extension is set, and a newly created file matches the > extension, the file could be marked as compression file. However, > if inline_data is also enabled, there is no chance to check its > extension since f2fs_should_compress() always r

Re: [f2fs-dev] [PATCH v3] f2fs: add proc entry to show discard_plist info

2022-11-14 Thread Jaegeuk Kim
On 11/11, Yangtao Li wrote: > This patch adds a new proc entry to show discard_plist > information in more detail, which is very helpful to > know the discard pend list count clearly. > > Such as: > > Discard pending list(Show diacrd command count on each entry): > 04943 1

Re: [f2fs-dev] [PATCH] f2fs: remove submit label in __submit_discard_cmd()

2022-11-14 Thread Jaegeuk Kim
On 11/12, Yangtao Li wrote: > Complaint from Matthew Wilcox in another similar place: > > "submit? You don't submit anything at the 'submit' label. > it should be called 'skip' or something. But I think this > is just badly written and you don't need a goto at all." > > Let's

Re: [f2fs-dev] [PATCH v6] f2fs: support errors=remount-ro|continue|panic mountoption

2022-11-14 Thread Jaegeuk Kim
On 11/14, Chao Yu wrote: > On 2022/11/8 9:17, Chao Yu wrote: > > Jaegeuk, > > > > On 2022/11/8 5:49, Jaegeuk Kim wrote: > > > Chao, > > > > > > Could you please run xfstests since I met some issues with this? > > > I had to drop this to t

Re: [f2fs-dev] [PATCH v2 2/2] f2fs: move set_file_temperature into f2fs_new_inode

2022-11-14 Thread Jaegeuk Kim
Since the file name has already passed to f2fs_new_inode(), let's move set_file_temperature() into f2fs_new_inode(). Signed-off-by: Sheng Yong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim --- fs/f2fs/namei.c | 62 +++-- 1 file change

Re: [f2fs-dev] [PATCH v2 1/2] f2fs: fix to enable compress for newly created file if extension matches

2022-11-14 Thread Jaegeuk Kim
(), which do extension check, in f2fs_should_compress() to check extensions before setting inline data flag. Fixes: 7165841d578e ("f2fs: fix to check inline_data during compressed inode conversion") Signed-off-by: Sheng Yong Signed-off-by: Jaegeuk Kim --- fs/f2fs/nam

Re: [f2fs-dev] [PATCH v2 1/2] f2fs: fix to enable compress for newly created file if extension matches

2022-11-11 Thread Jaegeuk Kim
Does thes make sense? https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/commit/?h=dev-test&id=608460dfae20b9d23aa222f7448710a086778222 https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/commit/?h=dev-test&id=962379487b5cb9f3b85ea367b130c2c6ca584edf Second one is neede

Re: [f2fs-dev] [PATCH] f2fs: remove gc_urgent_high_remaining node

2022-11-10 Thread Jaegeuk Kim
On 11/10, Yangtao Li wrote: > Hi Jaegeuk, > > > Hi, > > > I modified and integrated some patches as below. Could you please take a > > look? > > > https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/commit/?h=dev&id=d34f1e7212c1965a409d4581a32a92a1c91495fc > > I've looked at the r

Re: [f2fs-dev] [PATCH v2] f2fs: allow to read node block after shutdown

2022-11-08 Thread Jaegeuk Kim
If block address is still alive, we should give a valid node block even after shutdown. Otherwise, we can see zero data when reading out a file. Cc: sta...@vger.kernel.org Fixes: 83a3bfdb5a8 ("f2fs: indicate shutdown f2fs to allow unmount successfully") Signed-off-by: Jaegeuk Kim

[f2fs-dev] [PATCH] f2fs: allow to read node block after shutdown

2022-11-08 Thread Jaegeuk Kim
If block address is still alive, we should give a valid node block even after shutdown. Otherwise, we can see zero data when reading out a file. Fixes: 83a3bfdb5a8 ("f2fs: indicate shutdown f2fs to allow unmount successfully") Signed-off-by: Jaegeuk Kim --- fs/f2fs/node.c | 3 +

Re: [f2fs-dev] [PATCH v6] f2fs: support errors=remount-ro|continue|panic mountoption

2022-11-07 Thread Jaegeuk Kim
; Signed-off-by: Jaegeuk Kim > --- > v6: > - rebase the code > Documentation/filesystems/f2fs.rst | 4 + > fs/f2fs/checkpoint.c | 7 +- > fs/f2fs/f2fs.h | 18 +++- > fs/f2fs/file.c | 5 -- > fs/f2fs/gc.c

Re: [f2fs-dev] [PATCH] f2fs: remove gc_urgent_high_remaining node

2022-10-28 Thread Jaegeuk Kim
s total written kbytes issued to > disk. > What: /sys/fs/f2fs//features > Date:July 2017 > Contact: "Jaegeuk Kim" > -Description: /feature_list/ > +Description: : should use /sys/fs/f2fs//feature_list/ > Shows all e

Re: [f2fs-dev] [PATCH 2/2] f2fs: introduce gc_mode sysfs node

2022-10-28 Thread Jaegeuk Kim
Hi, I merged two patches and modified a bit. Please take a look. https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/commit/?h=dev&id=28ea9479410bab555db26e8437ea61b180e768d6 On 10/25, Yangtao Li wrote: > gc_mode sysfs node can show the current gc_mode as a string. > Introducing it

[f2fs-dev] [PATCH] f2fs: use sysfs_emit instead of sprintf

2022-10-28 Thread Jaegeuk Kim
Let's use sysfs_emit. Signed-off-by: Jaegeuk Kim --- fs/f2fs/sysfs.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c index 66c88220d319..aaf93bb6c64d 100644 --- a/fs/f2fs/sysfs.c +++ b/fs/f2fs/sy

Re: [f2fs-dev] [PATCH v2 2/2] f2fs: introducr gc_urgent_idle_remaining sysfs node and mark gc_urgent_high_remaining node deprecated

2022-10-27 Thread Jaegeuk Kim
On 10/28, Chao Yu wrote: > On 2022/10/28 11:22, Jaegeuk Kim wrote: > > On 10/28, Chao Yu wrote: > > > On 2022/10/25 14:50, Yangtao Li wrote: > > > > Added a new sysfs node called gc_urgent_idle_remaining. > > > > The user can set the trial count limit for

Re: [f2fs-dev] [PATCH] f2fs: fix possible memory leak in f2fs_init_sysfs()

2022-10-27 Thread Jaegeuk Kim
On 10/28, Chao Yu wrote: > Jaegeuk, > > There is a generic fix [1], let's drop this one... Ok, thanks. > > https://lore.kernel.org/lkml/20221025071549.1280528-1-yangyingli...@huawei.com/T/ > > On 2022/10/20 16:45, Chao Yu wrote: > > On 2022/10/18 15:32, Yang Yingliang wrote: > > > Inject fault

Re: [f2fs-dev] [PATCH v2 2/2] f2fs: introducr gc_urgent_idle_remaining sysfs node and mark gc_urgent_high_remaining node deprecated

2022-10-27 Thread Jaegeuk Kim
_attr *a, > > return count; > > } > > - if (!strcmp(a->attr.name, "gc_urgent_high_remaining")) { > > - spin_lock(&sbi->gc_urgent_high_lock); > > - sbi->gc_urgent_high_remaining = t; &

Re: [f2fs-dev] [PATCH 3/3] f2fs: fix to f2fs_handle_critical_error when errors=remount-ro

2022-10-27 Thread Jaegeuk Kim
On 10/28, Chao Yu wrote: > On 2022/10/28 10:33, Yangtao Li wrote: > > > It won't pollute global namespace since it's a static function just be > > > used in f2fs/super.c... > > > > emm, I think it would be nice to see the f2fs_record_error_work symbol > > in the stack, it can be explicitly a func

[f2fs-dev] [PATCH] f2fs: do not stop threads in irq context

2022-10-27 Thread Jaegeuk Kim
Let's stop threads first to avoid irq context. Signed-off-by: Jaegeuk Kim --- fs/f2fs/super.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index a241e4073f1d..14b4bb0f8ce6 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/su

Re: [f2fs-dev] [PATCH 2/2] f2fs: fix return val in f2fs_start_ckpt_thread()

2022-10-27 Thread Jaegeuk Kim
I integrated two patches into single one. I think we don't need Fixes. On 10/27, Chao Yu wrote: > On 2022/10/27 18:24, Yangtao Li wrote: > > Return PTR_ERR(cprc->f2fs_issue_ckpt) instead of -ENOMEM; > > > > Fixes line? > > > Signed-off-by: Yangtao Li > > Reviewed-by: Chao Yu > > Thanks, _

Re: [f2fs-dev] [PATCH 1/3 v2] f2fs-tools: give less overprovisioning space

2022-10-26 Thread Jaegeuk Kim
As f2fs becomes more resilient for GCs, let's give the marginal overprovision space back to user. Fix an issue where reserved_space > ovp_space, reported by Shinichiro. Signed-off-by: Shinichiro Kawasaki Signed-off-by: Jaegeuk Kim --- Change log from v1: - adjust ovp should be lar

Re: [f2fs-dev] [PATCH v2] f2fs: allow to set compression for inlined file

2022-10-26 Thread Jaegeuk Kim
The below commit disallows to set compression on empty created file which has a inline_data. Let's fix it. Fixes: 7165841d578e ("f2fs: fix to check inline_data during compressed inode conversion") Signed-off-by: Jaegeuk Kim --- Change log from v1: - add returning an error

Re: [f2fs-dev] [PATCH] f2fs: allow to set compression for inlined file

2022-10-26 Thread Jaegeuk Kim
On 10/26, Chao Yu wrote: > On 2022/10/26 1:46, Jaegeuk Kim wrote: > > On 10/25, Chao Yu wrote: > > > On 2022/10/25 7:36, Jaegeuk Kim wrote: > > > > The below commit disallows to set compression on empty created file > > > > which > > > > h

Re: [f2fs-dev] [PATCH] f2fs: allow to set compression for inlined file

2022-10-25 Thread Jaegeuk Kim
On 10/25, Chao Yu wrote: > On 2022/10/25 7:36, Jaegeuk Kim wrote: > > The below commit disallows to set compression on empty created file which > > has a inline_data. Let's fix it. > > > > Fixes: 7165841d578e ("f2fs: fix to check inline_data during compress

[f2fs-dev] [PATCH] f2fs: allow to set compression for inlined file

2022-10-24 Thread Jaegeuk Kim
The below commit disallows to set compression on empty created file which has a inline_data. Let's fix it. Fixes: 7165841d578e ("f2fs: fix to check inline_data during compressed inode conversion") Signed-off-by: Jaegeuk Kim --- fs/f2fs/file.c | 3 +++ 1 file changed, 3 inse

Re: [f2fs-dev] [PATCH 1/3] f2fs-tools: give less overprovisioning space

2022-10-24 Thread Jaegeuk Kim
On 10/21, Shinichiro Kawasaki wrote: > On Oct 20, 2022 / 16:18, Jaegeuk Kim wrote: > > ... > > > Thanks, I think that fix looks good to me. I applied into the original > > patch. > > https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f

Re: [f2fs-dev] [PATCH 1/3] f2fs-tools: give less overprovisioning space

2022-10-20 Thread Jaegeuk Kim
On 10/20, Shinichiro Kawasaki wrote: > On Oct 10, 2022 / 15:15, Jaegeuk Kim wrote: > > As f2fs becomes more resilient for GCs, let's give the marginal > > overprovision > > space back to user. > > > > Signed-off-by: Jaegeuk Kim > > Hello Jaegeuk, >

[f2fs-dev] [PATCH] f2fs: let's avoid to get cp_rwsem twice by f2fs_evict_inode by d_invalidate

2022-10-17 Thread Jaegeuk Kim
f2fs_unlink -> f2fs_lock_op -> d_invalidate -> shrink_dentry_list -> iput_final -> f2fs_evict_inode -> f2fs_lock_op Signed-off-by: Jaegeuk Kim --- fs/f2fs/namei.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/namei.c b/fs/

[f2fs-dev] [PATCH 3/3] f2fs-tools: set host-aware zoned device similar to host-managed one

2022-10-10 Thread Jaegeuk Kim
It'd be good to generate zone-aware sequential writes to both of HA and HM zoned devices. Signed-off-by: Jaegeuk Kim --- fsck/mount.c| 2 +- mkfs/f2fs_format.c | 2 +- mkfs/f2fs_format_main.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fsck/moun

[f2fs-dev] [PATCH 2/3] fsck.f2fs: fix missing to assign c.zoned_model

2022-10-10 Thread Jaegeuk Kim
We need to set the c.zoned_model appropriately for further usages. Signed-off-by: Jaegeuk Kim --- fsck/mount.c | 8 1 file changed, 8 insertions(+) diff --git a/fsck/mount.c b/fsck/mount.c index 0597220b3bc0..cd8a07538150 100644 --- a/fsck/mount.c +++ b/fsck/mount.c @@ -1095,6

[f2fs-dev] [PATCH 1/3] f2fs-tools: give less overprovisioning space

2022-10-10 Thread Jaegeuk Kim
As f2fs becomes more resilient for GCs, let's give the marginal overprovision space back to user. Signed-off-by: Jaegeuk Kim --- fsck/resize.c | 8 include/f2fs_fs.h | 6 -- mkfs/f2fs_format.c | 9 ++--- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a

[f2fs-dev] [GIT PULL] f2fs update for 6.1-rc1

2022-10-10 Thread Jaegeuk Kim
ile inodes f2fs: change to use atomic_t type form sbi.atomic_files Christian Brauner (1): f2fs: port to vfs{g,u}id_t and associated helpers Eric Biggers (1): f2fs: use memcpy_{to,from}_page() where possible Jaegeuk Kim (6): f2fs: LFS mode does not support ATGC f2fs: fix wron

Re: [f2fs-dev] [PATCH] f2fs: fix compile warning

2022-10-10 Thread Jaegeuk Kim
On 10/08, Chao Yu wrote: > On 2022/10/8 3:53, Jaegeuk Kim wrote: > > Merged into the original patch. > > Thanks, so it looks it's not too later to update commit id of original > patch since it's close to the end of merge window. I put this in the next pull request.

Re: [f2fs-dev] [PATCH] f2fs: fix compile warning

2022-10-07 Thread Jaegeuk Kim
Merged into the original patch. On 10/06, Chao Yu wrote: > fs/f2fs/super.c:3886:6: warning: no previous prototype for > 'f2fs_record_stop_reason' [-Wmissing-prototypes] > > Signed-off-by: Chao Yu > --- > fs/f2fs/super.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/

Re: [f2fs-dev] [PATCH v3] f2fs: support errors=remount-ro|continue|panic mountoption

2022-10-05 Thread Jaegeuk Kim
On 10/05, Chao Yu wrote: > On 2022/10/5 4:28, Jaegeuk Kim wrote: > > On 10/04, Chao Yu wrote: > > > This patch supports errors=remount-ro|continue|panic mount option. > > > > > > Signed-off-by: Chao Yu > > > --- > > > - clean up codes > &

Re: [f2fs-dev] [PATCH] mkfs.f2fs: update allocation policy for ro feature

2022-10-02 Thread Jaegeuk Kim
On 10/01, Chao Yu wrote: > On 2022/10/1 6:33, Jaegeuk Kim wrote: > > On 09/30, Chao Yu wrote: > > > On 2022/9/30 2:27, Jaegeuk Kim wrote: > > > > On 09/28, Chao Yu wrote: > > > > > On 2022/9/28 11:15, Jaegeuk Kim wrote: > > > > > > On

[f2fs-dev] [PATCH] f2fs: allow direct read for zoned device

2022-09-30 Thread Jaegeuk Kim
o read IOs. Cc: sta...@vger.kernel.org Fixes: dbf8e63f48af ("f2fs: remove device type check for direct IO") Signed-off-by: Eunhee Rho Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.

Re: [f2fs-dev] [PATCH] mkfs.f2fs: update allocation policy for ro feature

2022-09-30 Thread Jaegeuk Kim
On 09/30, Chao Yu wrote: > On 2022/9/30 2:27, Jaegeuk Kim wrote: > > On 09/28, Chao Yu wrote: > > > On 2022/9/28 11:15, Jaegeuk Kim wrote: > > > > On 09/28, Chao Yu wrote: > > > > > On 2022/9/28 0:40, Jaegeuk Kim wrote: > > > > > >

Re: [f2fs-dev] [PATCH v2 3/3] f2fs: support errors=remount-ro|continue|panic mountoption

2022-09-29 Thread Jaegeuk Kim
On 09/29, Chao Yu wrote: > This patch supports errors=remount-ro|continue|panic mount option. > > Signed-off-by: Chao Yu > --- > v2: > - fix to load sb.s_stop_reason during fill_super(). > Documentation/filesystems/f2fs.rst | 4 + > fs/f2fs/checkpoint.c | 7 +- > fs/f2fs/f2fs.h

Re: [f2fs-dev] [PATCH] mkfs.f2fs: update allocation policy for ro feature

2022-09-29 Thread Jaegeuk Kim
On 09/28, Chao Yu wrote: > On 2022/9/28 11:15, Jaegeuk Kim wrote: > > On 09/28, Chao Yu wrote: > > > On 2022/9/28 0:40, Jaegeuk Kim wrote: > > > > On 09/25, Chao Yu wrote: > > > > > Update allocation policy for ro feature: > > > &g

Re: [f2fs-dev] [PATCH] mkfs.f2fs: update allocation policy for ro feature

2022-09-27 Thread Jaegeuk Kim
On 09/28, Chao Yu wrote: > On 2022/9/28 0:40, Jaegeuk Kim wrote: > > On 09/25, Chao Yu wrote: > > > Update allocation policy for ro feature: > > > - hot_data: allocating blocks by LBA ascending order > > > - hot_node: allocating blocks by LBA descending orde

Re: [f2fs-dev] [PATCH] mkfs.f2fs: update allocation policy for ro feature

2022-09-27 Thread Jaegeuk Kim
On 09/25, Chao Yu wrote: > Update allocation policy for ro feature: > - hot_data: allocating blocks by LBA ascending order > - hot_node: allocating blocks by LBA descending order This will increase the RO image size. > > Signed-off-by: Chao Yu > --- > mkfs/f2fs_format.c | 4 ++-- > 1 file chan

Re: [f2fs-dev] [PATCH v3] f2fs: fix to detect corrupted meta ino

2022-09-22 Thread Jaegeuk Kim
I modified a bit. https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/commit/?h=dev-test&id=a9a1592fa175be43f54f175a972757c47919 Thanks, On 09/22, Chao Yu wrote: > Ping, > > On 2022/9/13 15:48, Chao Yu wrote: > > It is possible that ino of dirent or orphan inode is corrupted in

Re: [f2fs-dev] [RFC PATCH v2] f2fs: record need_fsck in super_block

2022-09-22 Thread Jaegeuk Kim
On 09/20, Chao Yu wrote: > On 2022/9/20 8:56, Jaegeuk Kim wrote: > > On 09/13, Chao Yu wrote: > > > Once CP_ERROR_FLAG is set, checkpoint is disallowed to be triggered to > > > persist CP_FSCK_FLAG, fsck won't repair the image due to lack of > > > CP_FSCK_

Re: [f2fs-dev] [RFC PATCH v2] f2fs: record need_fsck in super_block

2022-09-19 Thread Jaegeuk Kim
On 09/13, Chao Yu wrote: > Once CP_ERROR_FLAG is set, checkpoint is disallowed to be triggered to > persist CP_FSCK_FLAG, fsck won't repair the image due to lack of > CP_FSCK_FLAG. > > This patch proposes to persist newly introduced SB_NEED_FSCK flag into > super block if CP_ERROR_FLAG and SBI_NEE

Re: [f2fs-dev] [PATCH 1/1] f2fs: fix to check space of current segment journal

2022-09-19 Thread Jaegeuk Kim
Hi Philippe, Kernel 4.1 is really old one, so is there any chance to upgrade the kernel at least 4.14? You can find all the backports from below. https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-stable.git On 09/16, Philippe De Muyter wrote: > Tnank you for your patch. > > I have ap

Re: [f2fs-dev] [PATCH 1/1] f2fs: fix to check space of current segment journal

2022-09-19 Thread Jaegeuk Kim
On 09/14, Wu Bo wrote: > As Philippe De Muyter reported: > https://lore.kernel.org/linux-f2fs-devel/20220913224908.GA25100@172.21.0.10/T/#u > > The warning log showed that when finding a new space for nat the journal > space turned out to be full. This because the journal_rwsem is not > locked bef

Re: [f2fs-dev] [PATCH] f2fs: fix missing mapping caused by the mount/umount race

2022-09-16 Thread Jaegeuk Kim
On 09/14, Chao Yu wrote: > On 2022/9/14 23:15, Jaegeuk Kim wrote: > > On 09/14, Chao Yu wrote: > > > On 2022/8/31 11:05, Jaegeuk Kim wrote: > > > > On 08/30, Jaegeuk Kim wrote: > > > > > On 08/30, Chao Yu wrote: > > > > > > On 2022/8/3

Re: [f2fs-dev] [PATCH] f2fs: fix to detect obsolete inner inode during fill_super()

2022-09-16 Thread Jaegeuk Kim
On 09/14, Chao Yu wrote: > On 2022/9/13 14:04, Jaegeuk Kim wrote: > > On 09/13, Chao Yu wrote: > > > On 2022/9/12 23:37, Jaegeuk Kim wrote: > > > > On 09/08, Chao Yu wrote: > > > > > Sometimes we can get a cached meta_inode which has no aops yet. Let&

Re: [f2fs-dev] [PATCH] f2fs: fix missing mapping caused by the mount/umount race

2022-09-14 Thread Jaegeuk Kim
On 09/14, Chao Yu wrote: > On 2022/8/31 11:05, Jaegeuk Kim wrote: > > On 08/30, Jaegeuk Kim wrote: > > > On 08/30, Chao Yu wrote: > > > > On 2022/8/30 5:52, Jaegeuk Kim wrote: > > > > > Sometimes we can get a cached meta_inode which has no aops yet. L

Re: [f2fs-dev] [PATCH -next 0/3] f2fs: clean code and fix type error

2022-09-13 Thread Jaegeuk Kim
On 09/13, Zhang Qilong wrote: > Found serveral code type errors when review the code and fix it. > There is no function change. Could you please combine them into single patch? Thanks, > > Zhang Qilong (3): > f2fs: insert a space around colon > f2fs: replace spaces with tabs > f2fs: fix a

Re: [f2fs-dev] [PATCH] f2fs: fix to detect obsolete inner inode during fill_super()

2022-09-12 Thread Jaegeuk Kim
On 09/13, Chao Yu wrote: > On 2022/9/12 23:37, Jaegeuk Kim wrote: > > On 09/08, Chao Yu wrote: > > > Sometimes we can get a cached meta_inode which has no aops yet. Let's set > > > it > > > all the time to fix the below panic. > > > > &g

Re: [f2fs-dev] [PATCH v2] f2fs: fix to disallow getting inner inode via f2fs_iget()

2022-09-12 Thread Jaegeuk Kim
On 09/13, Chao Yu wrote: > On 2022/9/12 23:39, Jaegeuk Kim wrote: > > On 09/08, Chao Yu wrote: > > > On 2022/9/8 10:19, Jaegeuk Kim wrote: > > > > On 09/08, Chao Yu wrote: > > > > > On 2022/9/8 10:02, Jaegeuk Kim wrote: > > > >

Re: [f2fs-dev] [PATCH v2] f2fs: fix to disallow getting inner inode via f2fs_iget()

2022-09-12 Thread Jaegeuk Kim
On 09/08, Chao Yu wrote: > On 2022/9/8 10:19, Jaegeuk Kim wrote: > > On 09/08, Chao Yu wrote: > > > On 2022/9/8 10:02, Jaegeuk Kim wrote: > > > > On 08/31, Chao Yu wrote: > > > > > From: Chao Yu > > > > > > > > >

Re: [f2fs-dev] [PATCH] f2fs: fix to detect obsolete inner inode during fill_super()

2022-09-12 Thread Jaegeuk Kim
k in f2fs_iget() to avoid finding stale > inode during inner inode initialization. > > Cc: sta...@vger.kernel.org > Reported-by: syzbot+775a3440817f74fdd...@syzkaller.appspotmail.com > Signed-off-by: Jaegeuk Kim > Signed-off-by: Chao Yu > --- > fs/f2fs/inode.c | 11 +++

Re: [f2fs-dev] [PATCH] f2fs: let FI_OPU_WRITE override FADVISE_COLD_BIT

2022-09-07 Thread Jaegeuk Kim
On 09/07, Weichao Guo wrote: > Cold files may be fragmented due to SSR, defragment is needed as > sequential reads are dominant scenarios of these files. FI_OPU_WRITE > should override FADVISE_COLD_BIT to avoid defragment fails. > > Signed-off-by: Weichao Guo > Signed-off-by: Chao Yu > --- > fs

Re: [f2fs-dev] [PATCH v2] f2fs: fix to disallow getting inner inode via f2fs_iget()

2022-09-07 Thread Jaegeuk Kim
On 09/08, Chao Yu wrote: > On 2022/9/8 10:02, Jaegeuk Kim wrote: > > On 08/31, Chao Yu wrote: > > > From: Chao Yu > > > > > > Introduce f2fs_iget_inner() for f2fs_fill_super() to get inner inode: > > > meta inode, node inode or compressed inode, and

[f2fs-dev] [PATCH] f2fs-tools: fix build error on lz4-1.9.4

2022-09-07 Thread Jaegeuk Kim
LZ4_STREAMSIZE_U64 is undefined in new lz4 lib. Signed-off-by: Jaegeuk Kim --- fsck/compress.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fsck/compress.c b/fsck/compress.c index b41349207e38..b15f0a41c46e 100644 --- a/fsck/compress.c +++ b/fsck/compress.c @@ -32,10

Re: [f2fs-dev] [PATCH v2] f2fs: fix to disallow getting inner inode via f2fs_iget()

2022-09-07 Thread Jaegeuk Kim
On 08/31, Chao Yu wrote: > From: Chao Yu > > Introduce f2fs_iget_inner() for f2fs_fill_super() to get inner inode: > meta inode, node inode or compressed inode, and add f2fs_check_nid_range() > in f2fs_iget() to avoid getting inner inode from external interfaces. So, we don't want to check the r

Re: [f2fs-dev] [PATCH v2] Documentation: filesystems: correct possessive "its"

2022-09-07 Thread Jaegeuk Kim
athan Corbet > Cc: linux-fsde...@vger.kernel.org > Cc: linux-f2fs-devel@lists.sourceforge.net > Cc: linux-...@vger.kernel.org > Cc: Christian Brauner > Cc: Seth Forshee > Cc: Al Viro > Cc: Theodore Ts'o > Cc: Jaegeuk Kim > Reviewed-by: Darrick J. Wong >

Re: [f2fs-dev] [PATCH] f2fs: fix missing mapping caused by the mount/umount race

2022-08-30 Thread Jaegeuk Kim
On 08/30, Jaegeuk Kim wrote: > On 08/30, Chao Yu wrote: > > On 2022/8/30 5:52, Jaegeuk Kim wrote: > > > Sometimes we can get a cached meta_inode which has no aops yet. Let's set > > > it > > > all the time to fix the below panic. > > > > &g

Re: [f2fs-dev] [PATCH] f2fs: fix missing mapping caused by the mount/umount race

2022-08-30 Thread Jaegeuk Kim
On 08/30, Chao Yu wrote: > On 2022/8/30 5:52, Jaegeuk Kim wrote: > > Sometimes we can get a cached meta_inode which has no aops yet. Let's set it > > all the time to fix the below panic. > > > > Unable to handle kernel NULL pointer dereference at virtual addre

Re: [f2fs-dev] [PATCH] Documentation: filesystems: correct possessive "its"

2022-08-30 Thread Jaegeuk Kim
s-devel@lists.sourceforge.net > Cc: linux-...@vger.kernel.org > Cc: Christian Brauner > Cc: Seth Forshee For f2fs, Reviewed-by: Jaegeuk Kim Thanks, > --- > Documentation/filesystems/f2fs.rst |2 +- > Documentation/filesystems

Re: [f2fs-dev] [PATCH] f2fs: fix to disallow getting inner inode via f2fs_iget()

2022-08-30 Thread Jaegeuk Kim
On 08/30, Chao Yu wrote: > From: Chao Yu > > Introduce f2fs_iget_inner() for f2fs_fill_super() to get inner inode: > meta inode, node inode or compressed inode, and add f2fs_check_nid_range() > in f2fs_iget() to avoid getting inner inode from external interfaces. > > Signed-off-by: Chao Yu > --

Re: [f2fs-dev] [syzbot] BUG: unable to handle kernel NULL pointer dereference in set_page_dirty

2022-08-29 Thread Jaegeuk Kim
On 08/29, Jaegeuk Kim wrote: > On 08/29, Matthew Wilcox wrote: > > On Mon, Aug 29, 2022 at 10:52:57AM -0700, Jaegeuk Kim wrote: > > > On 08/25, Andrew Morton wrote: > > > > (cc fsf2 developers) > > > > > > > > On Thu, 25 Aug 2022 08:29:32

[f2fs-dev] [PATCH] f2fs: fix missing mapping caused by the mount/umount race

2022-08-29 Thread Jaegeuk Kim
: sta...@vger.kernel.org Reported-by: syzbot+775a3440817f74fdd...@syzkaller.appspotmail.com Signed-off-by: Jaegeuk Kim --- fs/f2fs/inode.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index 6d11c365d7b4..1feb0a8a699e 100644 ---

Re: [f2fs-dev] [syzbot] BUG: unable to handle kernel NULL pointer dereference in set_page_dirty

2022-08-29 Thread Jaegeuk Kim
On 08/29, Matthew Wilcox wrote: > On Mon, Aug 29, 2022 at 10:52:57AM -0700, Jaegeuk Kim wrote: > > On 08/25, Andrew Morton wrote: > > > (cc fsf2 developers) > > > > > > On Thu, 25 Aug 2022 08:29:32 -0700 syzbot > > > wrote: > > > > >

Re: [f2fs-dev] [syzbot] BUG: unable to handle kernel NULL pointer dereference in set_page_dirty

2022-08-29 Thread Jaegeuk Kim
On 08/25, Andrew Morton wrote: > (cc fsf2 developers) > > On Thu, 25 Aug 2022 08:29:32 -0700 syzbot > wrote: > > > Hello, > > > > syzbot found the following issue on: > > > > HEAD commit:a41a877bc12d Merge branch 'for-next/fixes' into for-kernelci > > git tree: > > git://git.kernel

<    1   2   3   4   5   6   7   8   9   10   >