Re: [f2fs-dev] [PATCH v1] f2fs: Fix discard bug on zoned block devices with 2MiB zone size

2023-03-23 Thread Chao Yu
On 2023/3/24 6:03, Jaegeuk Kim wrote: On 03/23, Chao Yu wrote: On 2023/3/13 17:48, Yonggil Song wrote: When using f2fs on a zoned block device with 2MiB zone size, IO errors occurs because f2fs tries to write data to a zone that has not been reset. The cause is that f2fs tries to discard

Re: [f2fs-dev] [RFC PATCH] f2fs: preserve direct write semantics when buffering is forced

2023-03-23 Thread Jaegeuk Kim
On 03/24, Damien Le Moal wrote: > On Thu, 2023-03-23 at 16:46 -0700, Jaegeuk Kim wrote: > > On 03/23, Damien Le Moal wrote: > > > On Thu, 2023-03-23 at 15:14 -0700, Jaegeuk Kim wrote: > > > > On 03/20, Christoph Hellwig wrote: > > > > > On Mon, Feb 20, 2023 at 01:20:04PM +0100, Hans Holmberg

Re: [f2fs-dev] [RFC PATCH] f2fs: preserve direct write semantics when buffering is forced

2023-03-23 Thread Damien Le Moal via Linux-f2fs-devel
On Thu, 2023-03-23 at 16:46 -0700, Jaegeuk Kim wrote: > On 03/23, Damien Le Moal wrote: > > On Thu, 2023-03-23 at 15:14 -0700, Jaegeuk Kim wrote: > > > On 03/20, Christoph Hellwig wrote: > > > > On Mon, Feb 20, 2023 at 01:20:04PM +0100, Hans Holmberg wrote: > > > > > A) Supporting proper direct

Re: [f2fs-dev] [PATCH] f2fs: fix align check for npo2

2023-03-23 Thread Jaegeuk Kim
On 03/23, Yohan Joung wrote: > Fix alignment check to be correct in npo2 as well > > Signed-off-by: Yohan Joung > --- > fs/f2fs/segment.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c > index 055e70e77aa2..46458085a8d0 100644 >

Re: [f2fs-dev] [RFC PATCH] f2fs: preserve direct write semantics when buffering is forced

2023-03-23 Thread Jaegeuk Kim
On 03/23, Damien Le Moal wrote: > On Thu, 2023-03-23 at 15:14 -0700, Jaegeuk Kim wrote: > > On 03/20, Christoph Hellwig wrote: > > > On Mon, Feb 20, 2023 at 01:20:04PM +0100, Hans Holmberg wrote: > > > > A) Supporting proper direct writes for zoned block devices would > > > > be the best, but it

Re: [f2fs-dev] [RFC PATCH] f2fs: preserve direct write semantics when buffering is forced

2023-03-23 Thread Damien Le Moal via Linux-f2fs-devel
On Thu, 2023-03-23 at 15:14 -0700, Jaegeuk Kim wrote: > On 03/20, Christoph Hellwig wrote: > > On Mon, Feb 20, 2023 at 01:20:04PM +0100, Hans Holmberg wrote: > > > A) Supporting proper direct writes for zoned block devices would > > > be the best, but it is currently not supported (probably for >

[f2fs-dev] [PATCH] f2fs: fix scheduling while atomic in decompression path

2023-03-23 Thread Jaegeuk Kim
[ 16.945668][C0] Call trace: [ 16.945678][C0] dump_backtrace+0x110/0x204 [ 16.945706][C0] dump_stack_lvl+0x84/0xbc [ 16.945735][C0] __schedule_bug+0xb8/0x1ac [ 16.945756][C0] __schedule+0x724/0xbdc [ 16.945778][C0] schedule+0x154/0x258 [ 16.945793][

Re: [f2fs-dev] [RFC PATCH] f2fs: preserve direct write semantics when buffering is forced

2023-03-23 Thread Jaegeuk Kim
On 02/20, Hans Holmberg wrote: > In some cases, e.g. for zoned block devices, direct writes are > forced into buffered writes that will populate the page cache > and be written out just like buffered io. > > Direct reads, on the other hand, is supported for the zoned > block device case. This has

Re: [f2fs-dev] [RFC PATCH] f2fs: preserve direct write semantics when buffering is forced

2023-03-23 Thread Jaegeuk Kim
On 03/20, Christoph Hellwig wrote: > On Mon, Feb 20, 2023 at 01:20:04PM +0100, Hans Holmberg wrote: > > A) Supporting proper direct writes for zoned block devices would > > be the best, but it is currently not supported (probably for > > a good but non-obvious reason). Would it be feasible to > >

Re: [f2fs-dev] [PATCH v1] f2fs: Fix discard bug on zoned block devices with 2MiB zone size

2023-03-23 Thread Jaegeuk Kim
On 03/23, Chao Yu wrote: > On 2023/3/13 17:48, Yonggil Song wrote: > > When using f2fs on a zoned block device with 2MiB zone size, IO errors > > occurs because f2fs tries to write data to a zone that has not been reset. > > > > The cause is that f2fs tries to discard multiple zones at once. This

[f2fs-dev] [Bug 216050] f2fs_gc occupies 100% cpu

2023-03-23 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216050 --- Comment #140 from Jaegeuk Kim (jaeg...@kernel.org) --- Cook, it seems no reason not to merge this patch. Thanks, -- You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the

[f2fs-dev] [PATCH] f2fs: get out of a repeat loop when getting a locked data page

2023-03-23 Thread Jaegeuk Kim
https://bugzilla.kernel.org/show_bug.cgi?id=216050 Somehow we're getting a page which has a different mapping. Let's avoid the infinite loop. Cc: Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/data.c

Re: [f2fs-dev] [PATCH v2] f2fs: convert to MAX_SBI_FLAG instead of 32 in stat_show()

2023-03-23 Thread Chao Yu
On 2023/3/8 22:06, Yangtao Li wrote: BIW reduce the s_flag array size and make s_flag constant. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net

Re: [f2fs-dev] [PATCH] f2fs: fix to handle filemap_fdatawrite() error in f2fs_ioc_decompress_file/f2fs_ioc_compress_file

2023-03-23 Thread Chao Yu
On 2023/3/2 17:55, Yangtao Li wrote: It seems inappropriate that the current logic does not handle filemap_fdatawrite() errors, so let's fix it. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list

Re: [f2fs-dev] [PATCH v1] f2fs: Fix discard bug on zoned block devices with 2MiB zone size

2023-03-23 Thread Chao Yu
On 2023/3/13 17:48, Yonggil Song wrote: When using f2fs on a zoned block device with 2MiB zone size, IO errors occurs because f2fs tries to write data to a zone that has not been reset. The cause is that f2fs tries to discard multiple zones at once. This is caused by a condition in

Re: [f2fs-dev] [PATCH 6/7] ext4: Enable negative dentries on case-insensitive lookup

2023-03-23 Thread Theodore Ts'o
On Wed, Jun 22, 2022 at 03:46:02PM -0400, Gabriel Krisman Bertazi wrote: > Instead of invalidating negative dentries during case-insensitive > lookups, mark them as such and let them be added to the dcache. > d_ci_revalidate is able to properly filter them out if necessary based > on the dentry

Re: [f2fs-dev] [PATCH 2/7] fs: Add DCACHE_CASEFOLD_LOOKUP flag

2023-03-23 Thread Theodore Ts'o
On Wed, Jun 22, 2022 at 03:45:58PM -0400, Gabriel Krisman Bertazi wrote: > This flag marks a negative or positive dentry as being created after a > case-insensitive lookup operation. It is useful to differentiate > dentries this way to detect whether the negative dentry can be trusted > during a

Re: [f2fs-dev] [PATCH 1/7] fs: Expose name under lookup to d_revalidate hook

2023-03-23 Thread Theodore Ts'o
On Wed, Jun 22, 2022 at 03:45:57PM -0400, Gabriel Krisman Bertazi wrote: > Negative dentries support on case-insensitive ext4/f2fs will require > access to the name under lookup to ensure it matches the dentry. This > adds an optional new flavor of cached dentry revalidation hook to expose > this

Re: [f2fs-dev] [PATCH 5/7] libfs: Merge encrypted_ci_dentry_ops and ci_dentry_ops

2023-03-23 Thread Theodore Ts'o
On Wed, Jun 22, 2022 at 03:46:01PM -0400, Gabriel Krisman Bertazi wrote: > Now that casefold needs d_revalidate and calls fscrypt_d_revalidate > itself, generic_encrypt_ci_dentry_ops and generic_ci_dentry_ops are now > equivalent. Merge them together and simplify the setup code. > >

Re: [f2fs-dev] [PATCH 3/7] libfs: Validate negative dentries in case-insensitive directories

2023-03-23 Thread Theodore Ts'o
On Wed, Jun 22, 2022 at 03:45:59PM -0400, Gabriel Krisman Bertazi wrote: > Introduce a dentry revalidation helper to be used by case-insensitive > filesystems to check if it is safe to reuse a negative dentry. > > A negative dentry is safe to be reused on a case-insensitive lookup if > it was

Re: [f2fs-dev] [PATCH 4/7] libfs: Support revalidation of encrypted case-insensitive dentries

2023-03-23 Thread Theodore Ts'o
On Wed, Jun 22, 2022 at 03:46:00PM -0400, Gabriel Krisman Bertazi wrote: > Preserve the existing behavior for encrypted directories, by rejecting > negative dentries of encrypted+casefolded directories. This allows > generic_ci_d_revalidate to be used by filesystems with both features > enabled,

Re: [f2fs-dev] [PATCH] f2fs: handle dqget error in f2fs_transfer_project_quota()

2023-03-23 Thread Chao Yu
+Shilong, Hi, Shilong, Could you please help to check this patch? in original patch, it tries to ignore such error intentionally? or it is a bug? On 2023/2/21 22:45, Yangtao Li wrote: We should set the error code when dqget() failed. Fixes: 2c1d03056991 ("f2fs: support

[f2fs-dev] [Bug 216050] f2fs_gc occupies 100% cpu

2023-03-23 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216050 --- Comment #139 from Guido (guido.iod...@gmail.com) --- I have been using the kernel with this patch for a month now and so far no problems. Out of superstition (I am Italian!), I'm afraid to say that the bug is fixed, but it seems plausible --

Re: [f2fs-dev] [PATCH 3/3] f2fs: remove entire rb_entry sharing

2023-03-23 Thread Chao Yu
On 2023/3/14 4:12, Jaegeuk Kim wrote: This is a last part to remove the memory sharing for rb_tree in extent_cache. This should also fix arm32 memory alignment issue. [struct extent_node] [struct rb_entry] [0] struct rb_node rb_node;[0] struct rb_node rb_node; union {

Re: [f2fs-dev] [PATCH 2/3] f2fs: factor out discard_cmd usage from general rb_tree use

2023-03-23 Thread Chao Yu
On 2023/3/14 4:12, Jaegeuk Kim wrote: This is a second part to remove the mixed use of rb_tree in discard_cmd from extent_cache. This should also fix arm32 memory alignment issue caused by shared rb_entry. [struct discard_cmd] [struct rb_entry] [0] struct rb_node rb_node;

Re: [f2fs-dev] [PATCH 1/3] f2fs: factor out victim_entry usage from general rb_tree use

2023-03-23 Thread Chao Yu
On 2023/3/14 4:12, Jaegeuk Kim wrote: Let's reduce the complexity of mixed use of rb_tree in victim_entry from extent_cache and discard_cmd. This should fix arm32 memory alignment issue caused by shared rb_entry. [struct victim_entry] [struct rb_entry] [0] struct rb_node rb_node;

Re: [f2fs-dev] [PATCH v3 01/10] kobject: introduce kobject_del_and_put()

2023-03-23 Thread Greg KH
On Thu, Mar 23, 2023 at 12:58:30AM +0800, Yangtao Li wrote: > There are plenty of using kobject_del() and kobject_put() together > in the kernel tree. This patch wraps these two calls in a single helper. > > Signed-off-by: Yangtao Li > --- > v3: > -convert to inline helper > v2: > -add

[f2fs-dev] F2FS kernel panic - latest 5.10 stable

2023-03-23 Thread Micha L via Linux-f2fs-devel
Hello everyone, I'm maintaining a kernel for Pixel 7 android devices running the 5.10 kernel. After merging the latest updates from f2fs stable for 5.10, users experience a kernel panic, which I believe is caused by the most recently pushed tag there. I never personally experienced the panic,

[f2fs-dev] [PATCH] f2fs: fix align check for npo2

2023-03-23 Thread Yohan Joung
Fix alignment check to be correct in npo2 as well Signed-off-by: Yohan Joung --- fs/f2fs/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 055e70e77aa2..46458085a8d0 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@