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 |

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 + >

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

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

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

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

2022-11-28 Thread Eric Biggers
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 a problem since it isn't any worse than

[f2fs-dev] [PATCH 1/2] f2fs: fix some format WARNING in debug.c and sysfs.c

2022-11-28 Thread Yangtao Li via Linux-f2fs-devel
To fix: WARNING: function definition argument 'struct f2fs_attr *' should also have an identifier name + ssize_t (*show)(struct f2fs_attr *, struct f2fs_sb_info *, char *); WARNING: return sysfs_emit(...) formats should include a terminating newline + return sysfs_emit(buf,

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

2022-11-28 Thread Yangtao Li via Linux-f2fs-devel
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 | 18 -- 3 files changed, 26 insertions(+), 4

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

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

2022-11-28 Thread Yangtao Li via Linux-f2fs-devel
Hi qixiaoyu1, Thanks for your patchset. Does this patchset have data related to memory and performance impact? Can you provide scripts or commands for related tests? Thx, Yangtao ___ Linux-f2fs-devel mailing list

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

2022-11-28 Thread Yangtao Li via Linux-f2fs-devel
> If you don't mind, let me merge this patch into Chao's patch, since both > are same topic. Never mind, feel free. :) Thx, Yangtao ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net

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

2022-11-28 Thread Eric Biggers
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 --- test-appliance/files/root/fs/f2fs/cfg/all.list | 1 +

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

2022-11-28 Thread Eric Biggers
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; > > + struct bio_post_read_ctx *ctx = bio->bi_private; > > > > - /* > > -* Update

[f2fs-dev] [PATCH 2/5] f2fs: implement cache to manager block update frequency per inode

2022-11-28 Thread qixiaoyu1
From: xiongping1 Signed-off-by: xiongping1 Signed-off-by: qixiaoyu1 --- fs/f2fs/block_age.c | 590 +++- fs/f2fs/debug.c | 13 + fs/f2fs/f2fs.h | 64 +++- fs/f2fs/file.c | 10 + fs/f2fs/inode.c | 8 +

[f2fs-dev] [PATCH 4/5] f2fs: update block age info during out of place update

2022-11-28 Thread qixiaoyu1
Signed-off-by: qixiaoyu1 Signed-off-by: xiongping1 --- fs/f2fs/block_age.c | 89 - fs/f2fs/f2fs.h | 1 + fs/f2fs/segment.c | 4 ++ 3 files changed, 92 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/block_age.c b/fs/f2fs/block_age.c index

[f2fs-dev] [PATCH 3/5] f2fs: add age_extent_cache mount option

2022-11-28 Thread qixiaoyu1
From: xiongping1 enable data block seperation feature only when age_extent_cache mount option is on Signed-off-by: xiongping1 Signed-off-by: qixiaoyu1 --- Documentation/filesystems/f2fs.rst | 4 fs/f2fs/block_age.c| 3 +++ fs/f2fs/f2fs.h | 1 +

[f2fs-dev] [PATCH 5/5] f2fs: implement data block seperation with block update frequency

2022-11-28 Thread qixiaoyu1
Signed-off-by: qixiaoyu1 Signed-off-by: xiongping1 --- Documentation/ABI/testing/sysfs-fs-f2fs | 14 fs/f2fs/block_age.c | 29 + fs/f2fs/f2fs.h | 4 fs/f2fs/segment.c | 9

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

2022-11-28 Thread qixiaoyu1
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 +++ fs/f2fs/segment.c | 4

[f2fs-dev] [PATCH 0/5] Support enhanced hot/cold data separation for f2fs

2022-11-28 Thread qixiaoyu1
This patch series introduce a runtime hot/cold data separation method for f2fs, in order to improve the accuracy for data temperature classification, reduce the garbage collection overhead after long-term data updates. Enhanced hot/cold data separation can record data block update frequency as

[f2fs-dev] [PATCH 12/15] f2fs: remove the create argument to f2fs_map_blocks

2022-11-28 Thread Christoph Hellwig
The create argument is always identicaly to map->m_may_create, so use that consistently. Signed-off-by: Christoph Hellwig --- fs/f2fs/data.c | 32 ++-- fs/f2fs/f2fs.h | 3 +-- fs/f2fs/file.c | 12 ++--

[f2fs-dev] [PATCH 13/15] f2fs: factor a f2f_map_blocks_cached helper

2022-11-28 Thread Christoph Hellwig
Add a helper to deal with everything needed to return a f2fs_map_blocks structure based on a lookup in the extent cache. Signed-off-by: Christoph Hellwig --- fs/f2fs/data.c | 62 +++--- 1 file changed, 38 insertions(+), 24 deletions(-) diff --git

[f2fs-dev] [PATCH 02/15] f2fs: decouple F2FS_MAP_ from buffer head flags

2022-11-28 Thread Christoph Hellwig
m_flags is never interchanged with the buffer_heads b_flags directly, so use separate codepoints from that. Signed-off-by: Christoph Hellwig --- fs/f2fs/f2fs.h | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index

[f2fs-dev] [PATCH 10/15] f2fs: simplify __allocate_data_block

2022-11-28 Thread Christoph Hellwig
Just use a simple if block for the conditional call to inc_valid_block_count. Signed-off-by: Christoph Hellwig --- fs/f2fs/data.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index fc5207859912ce..87c17602a3fdd4 100644 ---

[f2fs-dev] [PATCH 11/15] f2fs: remove f2fs_get_block

2022-11-28 Thread Christoph Hellwig
Fold f2fs_get_block into the two remaining callers to simplify the call chain a bit. Signed-off-by: Christoph Hellwig --- fs/f2fs/data.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 87c17602a3fdd4..2ae8fcf7cf49f4

[f2fs-dev] [PATCH 04/15] f2fs: split __submit_bio

2022-11-28 Thread Christoph Hellwig
Split __submit_bio into one function each for reads and writes, and a helper for aligning writes. Signed-off-by: Christoph Hellwig --- fs/f2fs/compress.c | 2 +- fs/f2fs/data.c | 111 +++-- fs/f2fs/f2fs.h | 4 +- 3 files changed, 61

[f2fs-dev] [PATCH 01/15] f2fs: don't rely on F2FS_MAP_* in f2fs_iomap_begin

2022-11-28 Thread Christoph Hellwig
When testing with a mixed zoned / convention device combination, there are regular but not 100% reproducible failures in xfstests generic/113 where the __is_valid_data_blkaddr assert hits due to finding a hole. This seems to be because f2fs_map_blocks can set this flag on a hole when it was found

[f2fs-dev] [PATCH 15/15] f2fs: refactor the hole reporting and allocation logic in f2fs_map_blocks

2022-11-28 Thread Christoph Hellwig
Add a is_hole local variable to figure out if the block number might need allocation, and untangle to logic to report the hole or fill it with a block allocation. Signed-off-by: Christoph Hellwig --- fs/f2fs/data.c | 113 - 1 file changed, 56

[f2fs-dev] [PATCH 08/15] f2fs: f2fs_do_map_lock

2022-11-28 Thread Christoph Hellwig
Split f2fs_do_map_lock into a lock and unlock helper to make the code using it easier to read. Signed-off-by: Christoph Hellwig --- fs/f2fs/data.c | 46 +++--- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c

[f2fs-dev] [PATCH 07/15] f2fs: add a f2fs_get_block_locked helper

2022-11-28 Thread Christoph Hellwig
This allows to keep the f2fs_do_map_lock based locking scheme private to data.c. Signed-off-by: Christoph Hellwig --- fs/f2fs/data.c | 16 ++-- fs/f2fs/f2fs.h | 3 +-- fs/f2fs/file.c | 4 +--- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/fs/f2fs/data.c

[f2fs-dev] [PATCH 05/15] f2fs: fold f2fs_lookup_extent_tree into f2fs_lookup_extent_cache

2022-11-28 Thread Christoph Hellwig
No need to keep these two helpers separate. Signed-off-by: Christoph Hellwig --- fs/f2fs/extent_cache.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/fs/f2fs/extent_cache.c b/fs/f2fs/extent_cache.c index 932c070173b976..538e4b79f83c9b 100644 ---

[f2fs-dev] [PATCH 06/15] f2fs: add a f2fs_lookup_extent_cache_block helper

2022-11-28 Thread Christoph Hellwig
All but three callers of f2fs_lookup_extent_cache just want the block address. Add a small helper to simplify them. Signed-off-by: Christoph Hellwig --- fs/f2fs/data.c | 29 +++-- fs/f2fs/extent_cache.c | 11 +++ fs/f2fs/f2fs.h | 2 ++

[f2fs-dev] [PATCH 14/15] f2fs: factor out a f2fs_map_no_dnode

2022-11-28 Thread Christoph Hellwig
Factor out a helper to return a hole when no dnode was found. Signed-off-by: Christoph Hellwig --- fs/f2fs/data.c | 47 --- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index

[f2fs-dev] [PATCH 03/15] f2fs: rename F2FS_MAP_UNWRITTEN to F2FS_MAP_DELALLOC

2022-11-28 Thread Christoph Hellwig
NEW_ADDR blocks are purely in-memory preallocated blocks, and thus equivalent to what the core FS code calls delayed allocations, and not unwritten extents which do have on-disk blocks allocated from which reads always return zeroes until they are converted to written status. Signed-off-by:

[f2fs-dev] [PATCH 09/15] f2fs: reflow prepare_write_begin

2022-11-28 Thread Christoph Hellwig
Reflow prepare_write_begin so that it reads more straight forward, and so that there is one place that does an extent cache lookup instead of three, two of which are hidden in f2fs_get_block calls. Signed-off-by: Christoph Hellwig --- fs/f2fs/data.c | 57

[f2fs-dev] a fix and a bunch of cleanups

2022-11-28 Thread Christoph Hellwig
Hi Jaegeuk and Chao, the first patch in this series fixes a warning and subsequent hang when testing zoned f2fs. The other patches are misc cleanups for the I/O path. Diffstat fs/f2fs/compress.c |2 fs/f2fs/data.c | 544 ++--

[f2fs-dev] segment allocation cleanups

2022-11-28 Thread Christoph Hellwig
Hi Jaegeuk and Chao, this series cleans up the segment allocation code a bit. Diffstat segment.c | 71 ++ segment.h |6 - 2 files changed, 30 insertions(+), 47 deletions(-) ___

[f2fs-dev] [PATCH 2/3] f2fs: open code allocate_segment_by_default

2022-11-28 Thread Christoph Hellwig
allocate_segment_by_default has just two callers, which use very different code pathes inside it based on the force paramter. Just open code the logic in the two callers using a new helper to decided if a new segment should be allocated. Signed-off-by: Christoph Hellwig --- fs/f2fs/segment.c |

[f2fs-dev] [PATCH 3/3] f2fs: remove the unused flush argument to change_curseg

2022-11-28 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- fs/f2fs/segment.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 2e54df1d3feea5..b3b7ea6559f95e 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -2643,7 +2643,7 @@ bool

[f2fs-dev] [PATCH 1/3] f2fs: remove struct segment_allocation default_salloc_ops

2022-11-28 Thread Christoph Hellwig
There is only single instance of these ops, so remove the indirection and call allocate_segment_by_default directly. Signed-off-by: Christoph Hellwig --- fs/f2fs/segment.c | 11 ++- fs/f2fs/segment.h | 6 -- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git

[f2fs-dev] [syzbot] possible deadlock in f2fs_handle_error

2022-11-28 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:6d464646530f Merge branch 'for-next/core' into for-kernelci git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci console output: https://syzkaller.appspot.com/x/log.txt?x=177fa38188 kernel