Re: [f2fs-dev] [PATCH] f2fs: fix to set flush_merge opt and show noflush_merge

2022-10-28 Thread Chao Yu
On 2022/10/26 21:05, Yangtao Li via Linux-f2fs-devel wrote: Some minor modifications to flush_merge and related parameters: 1.The FLUSH_MERGE opt is set by default only in non-ro mode. 2.When ro and merge are set at the same time, an error is reported. 3.Display noflush_merge mount

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

2022-10-28 Thread Chao Yu
Minor comments below. On 2022/10/25 11:32, Yangtao Li wrote: gc_mode sysfs node can show the current gc_mode as a string. Introducing it increases readability. Introducing it to increase readability. Signed-off-by: Yangtao Li --- Documentation/ABI/testing/sysfs-fs-f2fs | 6 ++

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

2022-10-28 Thread Chao Yu
On 2022/10/25 21:26, Yangtao Li via Linux-f2fs-devel 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 pend list(Show diacrd_cmd count on each entry, .:not exist):

[f2fs-dev] [PATCH 0/6] fsverity: support for non-4K pages

2022-10-28 Thread Eric Biggers
[This patchset applies to v6.1-rc2 + my other patch https://lore.kernel.org/r/20221028175807.55495-1-ebigg...@kernel.org. You can get everything from tag "fsverity-non4k-v1" of https://git.kernel.org/pub/scm/fs/fscrypt/fscrypt.git] Currently, filesystems (ext4, f2fs, and btrfs) only support

[f2fs-dev] [PATCH 6/6] ext4: allow verity with fs block size < PAGE_SIZE

2022-10-28 Thread Eric Biggers
From: Eric Biggers Now that the needed changes have been made to fs/buffer.c, ext4 is ready to support the verity feature when the filesystem block size is less than the page size. So remove the mount-time check that prevented this. Signed-off-by: Eric Biggers ---

[f2fs-dev] [PATCH 3/6] ext4: simplify ext4_readpage_limit()

2022-10-28 Thread Eric Biggers
From: Eric Biggers Now that the implementation of FS_IOC_ENABLE_VERITY has changed to not involve reading back Merkle tree blocks that were previously written, there is no need for ext4_readpage_limit() to allow for this case. Signed-off-by: Eric Biggers --- fs/ext4/readpage.c | 3 +-- 1 file

[f2fs-dev] [PATCH 4/6] f2fs: simplify f2fs_readpage_limit()

2022-10-28 Thread Eric Biggers
From: Eric Biggers Now that the implementation of FS_IOC_ENABLE_VERITY has changed to not involve reading back Merkle tree blocks that were previously written, there is no need for f2fs_readpage_limit() to allow for this case. Signed-off-by: Eric Biggers --- fs/f2fs/data.c | 3 +-- 1 file

[f2fs-dev] [PATCH 1/6] fsverity: support verification with tree block size < PAGE_SIZE

2022-10-28 Thread Eric Biggers
From: Eric Biggers Add support for verifying data from verity files whose Merkle tree block size is less than the page size. The main use case for this is to allow a single Merkle tree block size to be used across all systems, so that only one set of fsverity file digests and signatures is

[f2fs-dev] [PATCH 5/6] fs/buffer.c: support fsverity in block_read_full_folio()

2022-10-28 Thread Eric Biggers
From: Eric Biggers After each filesystem block (as represented by a buffer_head) has been read from disk by block_read_full_folio(), verify it if needed. The verification is done on the fsverity_read_workqueue. Also allow reads of verity metadata past i_size, as required by ext4. This is

[f2fs-dev] [PATCH 2/6] fsverity: support enabling with tree block size < PAGE_SIZE

2022-10-28 Thread Eric Biggers
From: Eric Biggers Make FS_IOC_ENABLE_VERITY support values of fsverity_enable_arg::block_size other than PAGE_SIZE. To make this possible, rework build_merkle_tree(), which was reading data and hash pages from the file and assuming that they were the same thing as "blocks". For reading the

Re: [f2fs-dev] [PATCH v2 1/2] f2fs: fix the assign logic of iocb

2022-10-28 Thread Chao Yu
On 2022/10/27 17:12, Mukesh Ojha wrote: commit 18ae8d12991b ("f2fs: show more DIO information in tracepoint") introduces iocb field in 'f2fs_direct_IO_enter' trace event And it only assigns the pointer and later it accesses its field in trace print log. Unable to handle kernel paging request at

Re: [f2fs-dev] [PATCH 2/2] f2fs: fix the msg data type

2022-10-28 Thread Chao Yu
On 2022/10/27 17:12, Mukesh Ojha wrote: Data type of msg in f2fs_write_checkpoint trace should be const char * instead of char *. Signed-off-by: Mukesh Ojha Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list

Re: [f2fs-dev] [PATCH] f2fs: Fix typo in comments

2022-10-28 Thread Chao Yu
On 2022/10/27 19:01, Keoseong Park wrote: Change "truncateion" to "truncation". Signed-off-by: Keoseong Park Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net

Re: [f2fs-dev] [PATCH v5 1/2] f2fs: correct i_size change for atomic writes

2022-10-28 Thread Chao Yu
On 2022/10/19 1:00, Daeho Jeong wrote: From: Daeho Jeong We need to make sure i_size doesn't change until atomic write commit is successful and restore it when commit is failed. Signed-off-by: Daeho Jeong --- v5: prevent only i_size update for atomic files when dirtying inode v4: move i_size

Re: [f2fs-dev] [PATCH v3 11/23] f2fs: Convert f2fs_fsync_node_pages() to use filemap_get_folios_tag()

2022-10-28 Thread Chao Yu
On 2022/10/18 4:24, Vishal Moola (Oracle) wrote: Convert function to use a folio_batch instead of pagevec. This is in preparation for the removal of find_get_pages_range_tag(). Signed-off-by: Vishal Moola (Oracle) Acked-by: Chao Yu Thanks, --- fs/f2fs/node.c | 19 ++-

Re: [f2fs-dev] [PATCH v3 12/23] f2fs: Convert f2fs_flush_inline_data() to use filemap_get_folios_tag()

2022-10-28 Thread Chao Yu
On 2022/10/18 4:24, Vishal Moola (Oracle) wrote: Convert function to use a folio_batch instead of pagevec. This is in preparation for the removal of find_get_pages_tag(). Signed-off-by: Vishal Moola (Oracle) Acked-by: Chao Yu Thanks, --- fs/f2fs/node.c | 17 + 1 file

Re: [f2fs-dev] [PATCH v3 13/23] f2fs: Convert f2fs_sync_node_pages() to use filemap_get_folios_tag()

2022-10-28 Thread Chao Yu
On 2022/10/18 4:24, Vishal Moola (Oracle) wrote: Convert function to use a folio_batch instead of pagevec. This is in preparation for the removal of find_get_pages_range_tag(). Signed-off-by: Vishal Moola (Oracle) Acked-by: Chao Yu Thanks, --- fs/f2fs/node.c | 17 + 1

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

2022-10-28 Thread Yangtao Li via Linux-f2fs-devel
As Jaegeuk suggested to remove it. And it is not a super critical node, which just for internal tests now. Let's remove the testing gc_urgent_high_remaining sysfs node. As well as updating the description in the documentation to indicate that readers need to use the new node. BTW, fill in a

[f2fs-dev] [PATCH] f2fs: fix to destroy sbi->post_read_wq in error path of f2fs_fill_super()

2022-10-28 Thread Chao Yu
In error path of f2fs_fill_super(), this patch fixes to call f2fs_destroy_post_read_wq() once if we fail in f2fs_start_ckpt_thread(). Fixes: 261eeb9c1585 ("f2fs: introduce checkpoint_merge mount option") Signed-off-by: Chao Yu --- fs/f2fs/super.c | 2 +- 1 file changed, 1 insertion(+), 1

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

2022-10-28 Thread Jaegeuk Kim
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=d34f1e7212c1965a409d4581a32a92a1c91495fc Thanks, On 10/28, Yangtao Li wrote: > As Jaegeuk suggested to remove it. And it is not a

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

2022-10-28 Thread Eric Biggers
On Tue, Sep 06, 2022 at 11:43:47PM +0800, Chao Yu wrote: > > @@ -1768,6 +1745,8 @@ static void f2fs_verify_cluster(struct work_struct > > *work) > > void f2fs_decompress_end_io(struct decompress_io_ctx *dic, bool failed, > > bool in_task) > > { > > + int i; > > +

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

2022-10-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] f2fs: stop issue discard if has fsck tag

2022-10-28 Thread Yangtao Li via Linux-f2fs-devel
Under the current logic, after the fsck flag is set, the discard thread will still run periodically. Fixes: d618477473eb ("f2fs: stop issue discard if something wrong with f2fs") Signed-off-by: Yangtao Li --- fs/f2fs/segment.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[f2fs-dev] [PATCH v2] f2fs: stop discard thread if has fsck tag

2022-10-28 Thread Yangtao Li via Linux-f2fs-devel
Under the current logic, after the fsck flag is set, the discard thread will still run periodically. So stop the discard thread from running to avoid energy consumption after the fsck flag is set. Fixes: d618477473eb ("f2fs: stop issue discard if something wrong with f2fs") Signed-off-by:

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=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/sysfs.c

Re: [f2fs-dev] [PATCH v3 08/23] ceph: Convert ceph_writepages_start() to use filemap_get_folios_tag()

2022-10-28 Thread Jeff Layton
On Mon, 2022-10-17 at 13:24 -0700, Vishal Moola (Oracle) wrote: > Convert function to use a folio_batch instead of pagevec. This is in > preparation for the removal of find_get_pages_range_tag(). > > Also some minor renaming for consistency. > > Signed-off-by: Vishal Moola (Oracle) > --- >