Re: [f2fs-dev] [PATCH 1/2] f2fs: introduce checkpoint=merge mount option

2021-01-11 Thread Chao Yu
On 2021/1/11 13:15, Daeho Jeong wrote: From: Daeho Jeong We've added a new mount option "checkpoint=merge", which creates a kernel daemon and makes it to merge concurrent checkpoint requests as much as possible to eliminate redundant checkpoint issues. Plus, we can eliminate the sluggish issue

[f2fs-dev] [PATCH v2] f2fs: compress: fix potential deadlock

2021-01-11 Thread Chao Yu
generic/269 reports a hangtask issue, the root cause is ABBA deadlock described as below: Thread AThread B - down_write(&sbi->gc_lock) -- A - f2fs_write_data_pages - lock all pages in cluster -- B

Re: [f2fs-dev] [PATCH 1/2] f2fs: introduce checkpoint=merge mount option

2021-01-11 Thread Jaegeuk Kim
On 01/11, Daeho Jeong wrote: > From: Daeho Jeong > > We've added a new mount option "checkpoint=merge", which creates a > kernel daemon and makes it to merge concurrent checkpoint requests as > much as possible to eliminate redundant checkpoint issues. Plus, we > can eliminate the sluggish issue

Re: [f2fs-dev] [PATCH v3 1/5] f2fs: compress: add compress_inode to cache compressed blocks

2021-01-11 Thread Jaegeuk Kim
Hi Chao, After quick test of fsstress w/ fault injection, it gave wrong block address errors. Could you please run the test a bit? Thanks, On 01/07, Chao Yu wrote: > Support to use address space of inner inode to cache compressed block, > in order to improve cache hit ratio of random read. > >

Re: [f2fs-dev] [PATCH 1/2] f2fs: introduce checkpoint=merge mount option

2021-01-11 Thread Jaegeuk Kim
On 01/11, Daeho Jeong wrote: > From: Daeho Jeong > > We've added a new mount option "checkpoint=merge", which creates a > kernel daemon and makes it to merge concurrent checkpoint requests as > much as possible to eliminate redundant checkpoint issues. Plus, we > can eliminate the sluggish issue

Re: [f2fs-dev] [PATCH v3 1/5] f2fs: compress: add compress_inode to cache compressed blocks

2021-01-11 Thread Chao Yu
On 2021/1/11 17:48, Jaegeuk Kim wrote: Hi Chao, After quick test of fsstress w/ fault injection, it gave wrong block address errors. Could you please run the test a bit? Jaegeuk, Oh, I've covered with fstest cases and there is no such error message, let me try fault injection + SPO case soon.

Re: [f2fs-dev] [PATCH v2 01/12] fs: fix lazytime expiration handling in __writeback_single_inode()

2021-01-11 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [PATCH v2 04/12] fat: only specify I_DIRTY_TIME when needed in fat_update_time()

2021-01-11 Thread Christoph Hellwig
On Fri, Jan 08, 2021 at 11:58:55PM -0800, Eric Biggers wrote: > + if ((flags & S_VERSION) && inode_maybe_inc_iversion(inode, false)) > + dirty_flags |= I_DIRTY_SYNC; fat does not support i_version updates, so this bit can be skipped. __

Re: [f2fs-dev] [PATCH v2 08/12] fs: drop redundant check from __writeback_single_inode()

2021-01-11 Thread Christoph Hellwig
On Fri, Jan 08, 2021 at 11:58:59PM -0800, Eric Biggers wrote: > From: Eric Biggers > > wbc->for_sync implies wbc->sync_mode == WB_SYNC_ALL, so there's no need > to check for both. Just check for WB_SYNC_ALL. > > Signed-off-by: Eric Biggers Looks good, Reviewed-by: Christoph Hellwig __

Re: [f2fs-dev] [PATCH v2 09/12] fs: improve comments for writeback_single_inode()

2021-01-11 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [PATCH v2 11/12] ext4: simplify i_state checks in __ext4_update_other_inode_time()

2021-01-11 Thread Christoph Hellwig
On Fri, Jan 08, 2021 at 11:59:02PM -0800, Eric Biggers wrote: > if ((inode->i_state & (I_FREEING | I_WILL_FREE | I_NEW | > -I_DIRTY_INODE)) || > - ((inode->i_state & I_DIRTY_TIME) == 0)) > +I_DIRTY_TIME)) != I_DIRTY_TIME) >

Re: [f2fs-dev] [PATCH v3 1/5] f2fs: compress: add compress_inode to cache compressed blocks

2021-01-11 Thread Chao Yu
On 2021/1/11 18:31, Chao Yu wrote: On 2021/1/11 17:48, Jaegeuk Kim wrote: Hi Chao, After quick test of fsstress w/ fault injection, it gave wrong block address errors. Could you please run the test a bit? Jaegeuk, Oh, I've covered with fstest cases and there is no such error message, let me

Re: [f2fs-dev] [RFC PATCH] f2fs: using generic_file_llseek() instead of generic_file_llseek_size()

2021-01-11 Thread Chengguang Xu
在 星期一, 2021-01-11 15:35:07 Chao Yu 撰写 > On 2021/1/10 19:48, Chengguang Xu wrote: > > generic_file_llseek_size() is used for filesystems that have > > a custom maximum size and a custom EOF position. so it's better > > to replace it using generic_file_llseek(). > > F2FS inode may

Re: [f2fs-dev] [RFC PATCH] f2fs: using generic_file_llseek() instead of generic_file_llseek_size()

2021-01-11 Thread Chao Yu
On 2021/1/11 21:47, Chengguang Xu wrote: 在 星期一, 2021-01-11 15:35:07 Chao Yu 撰写 > On 2021/1/10 19:48, Chengguang Xu wrote: > > generic_file_llseek_size() is used for filesystems that have > > a custom maximum size and a custom EOF position. so it's better > > to replace it usi

Re: [f2fs-dev] [PATCH v2 01/12] fs: fix lazytime expiration handling in __writeback_single_inode()

2021-01-11 Thread Jan Kara
On Fri 08-01-21 23:58:52, Eric Biggers wrote: > From: Eric Biggers > > When lazytime is enabled and an inode is being written due to its > in-memory updated timestamps having expired, either due to a sync() or > syncfs() system call or due to dirtytime_expire_interval having elapsed, > the VFS ne

Re: [f2fs-dev] [PATCH v2 02/12] fs: correctly document the inode dirty flags

2021-01-11 Thread Jan Kara
On Fri 08-01-21 23:58:53, Eric Biggers wrote: > From: Eric Biggers > > The documentation for I_DIRTY_SYNC and I_DIRTY_DATASYNC is a bit > misleading, and I_DIRTY_TIME isn't documented at all. Fix this. > > Reviewed-by: Christoph Hellwig > Signed-off-by: Eric Biggers Looks good to me. You can

Re: [f2fs-dev] [PATCH v2 03/12] fs: only specify I_DIRTY_TIME when needed in generic_update_time()

2021-01-11 Thread Jan Kara
On Fri 08-01-21 23:58:54, Eric Biggers wrote: > From: Eric Biggers > > generic_update_time() always passes I_DIRTY_TIME to > __mark_inode_dirty(), which doesn't really make sense because (a) > generic_update_time() might be asked to do only an i_version update, not > also a timestamps update; and

Re: [f2fs-dev] [PATCH v2 04/12] fat: only specify I_DIRTY_TIME when needed in fat_update_time()

2021-01-11 Thread Jan Kara
On Fri 08-01-21 23:58:55, Eric Biggers wrote: > From: Eric Biggers > > As was done for generic_update_time(), only pass I_DIRTY_TIME to > __mark_inode_dirty() when the inode's timestamps were actually updated > and lazytime is enabled. This avoids a weird edge case where > I_DIRTY_TIME could be

Re: [f2fs-dev] [PATCH v2 05/12] fs: don't call ->dirty_inode for lazytime timestamp updates

2021-01-11 Thread Jan Kara
On Fri 08-01-21 23:58:56, Eric Biggers wrote: > From: Eric Biggers > > There is no need to call ->dirty_inode for lazytime timestamp updates > (i.e. for __mark_inode_dirty(I_DIRTY_TIME)), since by the definition of > lazytime, filesystems must ignore these updates. Filesystems only need > to car

Re: [f2fs-dev] [PATCH v2 06/12] fs: pass only I_DIRTY_INODE flags to ->dirty_inode

2021-01-11 Thread Jan Kara
On Fri 08-01-21 23:58:57, Eric Biggers wrote: > From: Eric Biggers > > ->dirty_inode is now only called when I_DIRTY_INODE (I_DIRTY_SYNC and/or > I_DIRTY_DATASYNC) is set. However it may still be passed other dirty > flags at the same time, provided that these other flags happened to be > passed

Re: [f2fs-dev] [PATCH v2 07/12] fs: clean up __mark_inode_dirty() a bit

2021-01-11 Thread Jan Kara
On Fri 08-01-21 23:58:58, Eric Biggers wrote: > From: Eric Biggers > > Improve some comments, and don't bother checking for the I_DIRTY_TIME > flag in the case where we just cleared it. > > Also, warn if I_DIRTY_TIME and I_DIRTY_PAGES are passed to > __mark_inode_dirty() at the same time, as thi

Re: [f2fs-dev] [PATCH v2 08/12] fs: drop redundant check from __writeback_single_inode()

2021-01-11 Thread Jan Kara
On Fri 08-01-21 23:58:59, Eric Biggers wrote: > From: Eric Biggers > > wbc->for_sync implies wbc->sync_mode == WB_SYNC_ALL, so there's no need > to check for both. Just check for WB_SYNC_ALL. > > Signed-off-by: Eric Biggers Looks good to me. Feel free to add: Reviewed-by: Jan Kara

Re: [f2fs-dev] [PATCH v2 09/12] fs: improve comments for writeback_single_inode()

2021-01-11 Thread Jan Kara
On Fri 08-01-21 23:59:00, Eric Biggers wrote: > From: Eric Biggers > > Some comments for writeback_single_inode() and > __writeback_single_inode() are outdated or not very helpful, especially > with regards to writeback list handling. Update them. > > Signed-off-by: Eric Biggers Yeah, looks m

Re: [f2fs-dev] [PATCH v2 10/12] gfs2: don't worry about I_DIRTY_TIME in gfs2_fsync()

2021-01-11 Thread Jan Kara
On Fri 08-01-21 23:59:01, Eric Biggers wrote: > From: Eric Biggers > > The I_DIRTY_TIME flag is primary used within the VFS, and there's no > reason for ->fsync() implementations to do anything with it. This is > because when !datasync, the VFS will expire dirty timestamps before > calling ->fsy

Re: [f2fs-dev] [PATCH v2 11/12] ext4: simplify i_state checks in __ext4_update_other_inode_time()

2021-01-11 Thread Jan Kara
On Fri 08-01-21 23:59:02, Eric Biggers wrote: > From: Eric Biggers > > Since I_DIRTY_TIME and I_DIRTY_INODE are mutually exclusive in i_state, > there's no need to check for I_DIRTY_TIME && !I_DIRTY_INODE. Just check > for I_DIRTY_TIME. > > Signed-off-by: Eric Biggers Looks good to me. Feel f

Re: [f2fs-dev] [PATCH v2 00/12] lazytime fix and cleanups

2021-01-11 Thread Jan Kara
Hi! On Fri 08-01-21 23:58:51, Eric Biggers wrote: > Hello, > > Patch 1 fixes a bug in how __writeback_single_inode() handles lazytime > expirations. I originally reported this last year > (https://lore.kernel.org/r/20200306004555.gb225...@gmail.com) because it > causes the FS_IOC_REMOVE_ENCRYPTI

Re: [f2fs-dev] [PATCH v2] f2fs: fix to keep isolation of atomic write

2021-01-11 Thread Jaegeuk Kim
On 01/06, Jaegeuk Kim wrote: > On 01/06, Jaegeuk Kim wrote: > > Hi Chao, > > > > With a quick test, this patch causes down_write failure resulting in > > blocking > > process. I didn't dig in the bug so, please check the code again. :P > > nvm. I can see it works now. Hmm, this gives a huge per

Re: [f2fs-dev] [PATCH v2 04/12] fat: only specify I_DIRTY_TIME when needed in fat_update_time()

2021-01-11 Thread Eric Biggers
On Mon, Jan 11, 2021 at 11:52:01AM +0100, Christoph Hellwig wrote: > On Fri, Jan 08, 2021 at 11:58:55PM -0800, Eric Biggers wrote: > > + if ((flags & S_VERSION) && inode_maybe_inc_iversion(inode, false)) > > + dirty_flags |= I_DIRTY_SYNC; > > fat does not support i_version updates, so

Re: [f2fs-dev] [PATCH v2 11/12] ext4: simplify i_state checks in __ext4_update_other_inode_time()

2021-01-11 Thread Eric Biggers
On Mon, Jan 11, 2021 at 11:53:42AM +0100, Christoph Hellwig wrote: > On Fri, Jan 08, 2021 at 11:59:02PM -0800, Eric Biggers wrote: > > if ((inode->i_state & (I_FREEING | I_WILL_FREE | I_NEW | > > - I_DIRTY_INODE)) || > > - ((inode->i_state & I_DIRTY_TIME) == 0)) >

Re: [f2fs-dev] [PATCH v2 00/12] lazytime fix and cleanups

2021-01-11 Thread Eric Biggers
On Mon, Jan 11, 2021 at 04:15:17PM +0100, Jan Kara wrote: > Hi! > > On Fri 08-01-21 23:58:51, Eric Biggers wrote: > > Hello, > > > > Patch 1 fixes a bug in how __writeback_single_inode() handles lazytime > > expirations. I originally reported this last year > > (https://lore.kernel.org/r/2020030

Re: [f2fs-dev] [PATCH 1/2] f2fs: introduce checkpoint=merge mount option

2021-01-11 Thread Daeho Jeong
2021년 1월 11일 (월) 오후 6:34, Chao Yu 님이 작성: > > On 2021/1/11 13:15, Daeho Jeong wrote: > > From: Daeho Jeong > > > > We've added a new mount option "checkpoint=merge", which creates a > > kernel daemon and makes it to merge concurrent checkpoint requests as > > much as possible to eliminate redundant

Re: [f2fs-dev] [PATCH 1/2] f2fs: introduce checkpoint=merge mount option

2021-01-11 Thread Daeho Jeong
Got it~ :) 2021년 1월 11일 (월) 오후 6:50, Jaegeuk Kim 님이 작성: > > On 01/11, Daeho Jeong wrote: > > From: Daeho Jeong > > > > We've added a new mount option "checkpoint=merge", which creates a > > kernel daemon and makes it to merge concurrent checkpoint requests as > > much as possible to eliminate red

Re: [f2fs-dev] [PATCH v3 1/5] f2fs: compress: add compress_inode to cache compressed blocks

2021-01-11 Thread Chao Yu
On 2021/1/11 19:45, Chao Yu wrote: On 2021/1/11 18:31, Chao Yu wrote: On 2021/1/11 17:48, Jaegeuk Kim wrote: Hi Chao, After quick test of fsstress w/ fault injection, it gave wrong block address errors. Could you please run the test a bit? Jaegeuk, Oh, I've covered with fstest cases and the

[f2fs-dev] [PATCH] f2fs: fix to set/clear I_LINKABLE under i_lock

2021-01-11 Thread Chao Yu
fsstress + fault injection test case reports a warning message as below: WARNING: CPU: 13 PID: 6226 at fs/inode.c:361 inc_nlink+0x32/0x40 Call Trace: f2fs_init_inode_metadata+0x25c/0x4a0 [f2fs] f2fs_add_inline_entry+0x153/0x3b0 [f2fs] f2fs_add_dentry+0x75/0x80 [f2fs] f2fs_do_add_link+0x108/0x1

Re: [f2fs-dev] [PATCH v3 1/5] f2fs: compress: add compress_inode to cache compressed blocks

2021-01-11 Thread Jaegeuk Kim
On 01/12, Chao Yu wrote: > On 2021/1/11 19:45, Chao Yu wrote: > > On 2021/1/11 18:31, Chao Yu wrote: > > > On 2021/1/11 17:48, Jaegeuk Kim wrote: > > > > Hi Chao, > > > > > > > > After quick test of fsstress w/ fault injection, it gave wrong block > > > > address > > > > errors. Could you please

Re: [f2fs-dev] [PATCH v2] f2fs: fix to keep isolation of atomic write

2021-01-11 Thread Chao Yu
On 2021/1/12 0:32, Jaegeuk Kim wrote: On 01/06, Jaegeuk Kim wrote: On 01/06, Jaegeuk Kim wrote: Hi Chao, With a quick test, this patch causes down_write failure resulting in blocking process. I didn't dig in the bug so, please check the code again. :P nvm. I can see it works now. Hmm, this

Re: [f2fs-dev] [PATCH v2 04/12] fat: only specify I_DIRTY_TIME when needed in fat_update_time()

2021-01-11 Thread Dave Chinner
On Mon, Jan 11, 2021 at 11:50:27AM -0800, Eric Biggers wrote: > On Mon, Jan 11, 2021 at 11:52:01AM +0100, Christoph Hellwig wrote: > > On Fri, Jan 08, 2021 at 11:58:55PM -0800, Eric Biggers wrote: > > > + if ((flags & S_VERSION) && inode_maybe_inc_iversion(inode, false)) > > > + dirty_flags

[f2fs-dev] [PATCH -next] f2fs: docs: rectify the table header in sysfs-fs-f2fs

2021-01-11 Thread Lukas Bulwahn
Commit 969945899a35 ("f2fs: introduce sb_status sysfs node") documents the sb_status values in a table in ./Documentation/ABI/testing/sysfs-fs-f2fs, but the table header of the first column has a wrong length. Hence, make htmldocs warns: Documentation/ABI/testing/sysfs-fs-f2fs:382: WARNING: Mal

Re: [f2fs-dev] [PATCH -next] f2fs: docs: rectify the table header in sysfs-fs-f2fs

2021-01-11 Thread Chao Yu
On 2021/1/12 14:39, Lukas Bulwahn wrote: Commit 969945899a35 ("f2fs: introduce sb_status sysfs node") documents the sb_status values in a table in ./Documentation/ABI/testing/sysfs-fs-f2fs, but the table header of the first column has a wrong length. Thanks for fixing this, however original patc