[f2fs-dev] [Bug 208325] f2fs inconsistent node block

2020-06-30 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=208325 --- Comment #5 from Chao Yu (c...@kernel.org) --- (In reply to zKqri0 from comment #4) > >[print_node_info: 271] Node ID [0x203a7962:540703074] is direct node or > >>indirect node. > >[0][0x5452202c : 1414668332] > >[1]

Re: [f2fs-dev] [PATCH] f2fs: add symbolic link to kobject in sysfs

2020-06-30 Thread Chao Yu
Hi Daeho, On 2020/6/30 8:56, Daeho Jeong wrote: > From: Daeho Jeong > > Added a symbolic link to directory of sysfs. It will > create a symbolic link such as "mount_0" and "mount_1" to > each f2fs mount in the order of mounting filesystem. It will > provide easy access to sysfs node even if not

[f2fs-dev] [Bug 208325] f2fs inconsistent node block

2020-06-30 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=208325 --- Comment #4 from zkq...@gmail.com --- (In reply to Chao Yu from comment #3) > (In reply to zKqri0 from comment #2) > > Mount options are "/dev/sda2 on / type f2fs > > (rw,relatime,lazytime,background_gc=on,discard,no_heap,user_xattr, > > inline

Re: [f2fs-dev] [PATCH 1/2] f2fs: split f2fs_allocate_new_segments()

2020-06-30 Thread Jaegeuk Kim
On 07/01, Chao Yu wrote: > Jaegeuk, could you please help to change __allocate_new_segment() to static > in your tree? Sure. :) > > On 2020/6/30 4:19, Jaegeuk Kim wrote: > > On 06/22, Chao Yu wrote: > >> to two independent functions: > >> - f2fs_allocate_new_segment() for specified type segment

Re: [f2fs-dev] [PATCH] f2fs: add GC_URGENT_LOW mode in gc_urgent

2020-06-30 Thread Daeho Jeong
Yes, it's correct. 2020년 7월 1일 (수) 오후 12:35, Chao Yu 님이 작성: > > On 2020/6/30 8:54, Daeho Jeong wrote: > > From: Daeho Jeong > > > > Added a new gc_urgent mode, GC_URGENT_LOW, in which mode > > F2FS will lower the bar of checking idle in order to > > process outstanding discard commands and GC a l

Re: [f2fs-dev] [PATCH] f2fs: add GC_URGENT_LOW mode in gc_urgent

2020-06-30 Thread Chao Yu
On 2020/6/30 8:54, Daeho Jeong wrote: > From: Daeho Jeong > > Added a new gc_urgent mode, GC_URGENT_LOW, in which mode > F2FS will lower the bar of checking idle in order to > process outstanding discard commands and GC a little bit > aggressively. > > Signed-off-by: Daeho Jeong > --- > Docume

Re: [f2fs-dev] [PATCH v3 3/4] f2fs: add inline encryption support

2020-06-30 Thread Chao Yu
On 2020/6/30 20:14, Satya Tangirala wrote: > Wire up f2fs to support inline encryption via the helper functions which > fs/crypto/ now provides. This includes: > > - Adding a mount option 'inlinecrypt' which enables inline encryption > on encrypted files where it can be used. > > - Setting the

Re: [f2fs-dev] [PATCH] f2fs: add parameter op_flag in f2fs_submit_page_read()

2020-06-30 Thread Chao Yu
On 2020/7/1 10:27, Jia Yang wrote: > The parameter op_flag is not used in f2fs_get_read_data_page(), > but it is used in f2fs_grab_read_bio(). Obviously, op_flag is > not passed to f2fs_grab_read_bio() successfully. We need to add > parameter in f2fs_submit_page_read() to pass it. > > The case: >

[f2fs-dev] [PATCH] f2fs: fix return value of move_data_block()

2020-06-30 Thread Chao Yu
If f2fs_grab_cache_page() fails, it needs to return -ENOMEM. Signed-off-by: Chao Yu --- fs/f2fs/gc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 3b718da69910..11b4adde9baf 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -849,8 +849,10

[f2fs-dev] [PATCH] f2fs: add parameter op_flag in f2fs_submit_page_read()

2020-06-30 Thread Jia Yang
The parameter op_flag is not used in f2fs_get_read_data_page(), but it is used in f2fs_grab_read_bio(). Obviously, op_flag is not passed to f2fs_grab_read_bio() successfully. We need to add parameter in f2fs_submit_page_read() to pass it. The case: - gc_data_segment - f2fs_get_read_data_page(..,

Re: [f2fs-dev] [PATCH v3] f2fs: avoid readahead race condition

2020-06-30 Thread Chao Yu
On 2020/7/1 4:56, Jaegeuk Kim wrote: > On 06/30, Nathan Chancellor wrote: >> On Mon, Jun 29, 2020 at 01:27:20PM -0700, Jaegeuk Kim wrote: >>> If two readahead threads having same offset enter in readpages, every read >>> IOs are split and issued to the disk which giving lower bandwidth. >>> >>> Thi

Re: [f2fs-dev] [PATCH 1/2] f2fs: split f2fs_allocate_new_segments()

2020-06-30 Thread Chao Yu
Jaegeuk, could you please help to change __allocate_new_segment() to static in your tree? On 2020/6/30 4:19, Jaegeuk Kim wrote: > On 06/22, Chao Yu wrote: >> to two independent functions: >> - f2fs_allocate_new_segment() for specified type segment allocation >> - f2fs_allocate_new_segments() for a

Re: [f2fs-dev] [PATCH v3] f2fs: avoid readahead race condition

2020-06-30 Thread Jaegeuk Kim
On 06/30, Nathan Chancellor wrote: > On Mon, Jun 29, 2020 at 01:27:20PM -0700, Jaegeuk Kim wrote: > > If two readahead threads having same offset enter in readpages, every read > > IOs are split and issued to the disk which giving lower bandwidth. > > > > This patch tries to avoid redundant readah

Re: [f2fs-dev] [PATCH] f2fs: always expose label 'next_page'

2020-06-30 Thread Randy Dunlap
>> Cc: linux-f2fs-devel@lists.sourceforge.net >> --- >> fs/f2fs/data.c |2 -- >> 1 file changed, 2 deletions(-) >> >> --- linux-next-20200630.orig/fs/f2fs/data.c >> +++ linux-next-20200630/fs/f2fs/data.c >> @@ -2366,9 +2366,7 @@ set_error_page:

Re: [f2fs-dev] [PATCH v3] f2fs: avoid readahead race condition

2020-06-30 Thread Nathan Chancellor
On Mon, Jun 29, 2020 at 01:27:20PM -0700, Jaegeuk Kim wrote: > If two readahead threads having same offset enter in readpages, every read > IOs are split and issued to the disk which giving lower bandwidth. > > This patch tries to avoid redundant readahead calls. > > Signed-off-by: Jaegeuk Kim >

Re: [f2fs-dev] [PATCH] f2fs: always expose label 'next_page'

2020-06-30 Thread Jaegeuk Kim
this into the original patch. Let me know. Thanks, > > Signed-off-by: Randy Dunlap > Cc: Jaegeuk Kim > Cc: Chao Yu > Cc: linux-f2fs-devel@lists.sourceforge.net > --- > fs/f2fs/data.c |2 -- > 1 file changed, 2 deletions(-) > > --- linux-next-202006

[f2fs-dev] [PATCH] f2fs: always expose label 'next_page'

2020-06-30 Thread Randy Dunlap
Cc: Jaegeuk Kim Cc: Chao Yu Cc: linux-f2fs-devel@lists.sourceforge.net --- fs/f2fs/data.c |2 -- 1 file changed, 2 deletions(-) --- linux-next-20200630.orig/fs/f2fs/data.c +++ linux-next-20200630/fs/f2fs/data.c @@ -2366,9 +2366,7 @@ set_error_page: zero_user_segment

Re: [f2fs-dev] [PATCH v3 2/4] fscrypt: add inline encryption support

2020-06-30 Thread Eric Biggers
On Tue, Jun 30, 2020 at 12:14:36PM +, Satya Tangirala via Linux-f2fs-devel wrote: > Add support for inline encryption to fs/crypto/. With "inline > encryption", the block layer handles the decryption/encryption as part > of the bio, instead of the filesystem doing the crypto itself via > Linu

Re: [f2fs-dev] [PATCH] doc: cgroup: add f2fs and xfs to supported list for writeback

2020-06-30 Thread Eric Sandeen
On 6/30/20 12:42 AM, Christoph Hellwig wrote: > On Mon, Jun 29, 2020 at 02:08:09PM -0500, Eric Sandeen wrote: >> f2fs and xfs have both added support for cgroup writeback: >> >> 578c647 f2fs: implement cgroup writeback support >> adfb5fb xfs: implement cgroup aware writeback >> >> so add them to th

[f2fs-dev] [Bug 208325] f2fs inconsistent node block

2020-06-30 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=208325 --- Comment #3 from Chao Yu (c...@kernel.org) --- (In reply to zKqri0 from comment #2) > Mount options are "/dev/sda2 on / type f2fs > (rw,relatime,lazytime,background_gc=on,discard,no_heap,user_xattr, > inline_xattr,acl,inline_data,inline_dentry,

[f2fs-dev] [PATCH v3 4/4] ext4: add inline encryption support

2020-06-30 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Wire up ext4 to support inline encryption via the helper functions which fs/crypto/ now provides. This includes: - Adding a mount option 'inlinecrypt' which enables inline encryption on encrypted files where it can be used. - Setting the bio_crypt_ctx on bios that will be

[f2fs-dev] [PATCH v3 3/4] f2fs: add inline encryption support

2020-06-30 Thread Satya Tangirala via Linux-f2fs-devel
Wire up f2fs to support inline encryption via the helper functions which fs/crypto/ now provides. This includes: - Adding a mount option 'inlinecrypt' which enables inline encryption on encrypted files where it can be used. - Setting the bio_crypt_ctx on bios that will be submitted to an inl

[f2fs-dev] [PATCH v3 1/4] fs: introduce SB_INLINECRYPT

2020-06-30 Thread Satya Tangirala via Linux-f2fs-devel
Introduce SB_INLINECRYPT, which is set by filesystems that wish to use blk-crypto for file content en/decryption. This flag maps to the '-o inlinecrypt' mount option which multiple filesystems will implement, and code in fs/crypto/ needs to be able to check for this mount option in a filesystem-ind

[f2fs-dev] [PATCH v3 0/4] Inline Encryption Support for fscrypt

2020-06-30 Thread Satya Tangirala via Linux-f2fs-devel
This patch series adds support for Inline Encryption to fscrypt, f2fs and ext4. It builds on the inline encryption support now present in the block layer, and has been rebased on v5.8-rc3. This patch series previously went though a number of iterations as part of the "Inline Encryption Support" pa

[f2fs-dev] [PATCH v3 2/4] fscrypt: add inline encryption support

2020-06-30 Thread Satya Tangirala via Linux-f2fs-devel
Add support for inline encryption to fs/crypto/. With "inline encryption", the block layer handles the decryption/encryption as part of the bio, instead of the filesystem doing the crypto itself via Linux's crypto API. This model is needed in order to take advantage of the inline encryption hardwa

Re: [f2fs-dev] [PATCH] f2fs: remove unused parameter in f2fs_get_read_data_page()

2020-06-30 Thread Jia Yang
> On 2020/6/30 12:45, Jia Yang wrote: >> The parameter "op_flags" is not used in f2fs_get_read_data_page(), >> so it can be removed. > > I don't think so, there is one missing case as below, in where op_flag > was set incorrectly in f2fs_grab_read_bio(), we need to add one more > parameter to p

[f2fs-dev] [PATCH RFC 2/5] f2fs: record average update time of segment

2020-06-30 Thread Chao Yu
Previously, once we update one block in segment, we will update mtime of segment to last time, making aged segment becoming freshest, result in that GC with cost benefit algorithm missing such segment, So this patch changes to record mtime as average block updating time instead of last updating tim

[f2fs-dev] [PATCH RFC 4/5] f2fs: support 64-bits key in f2fs rb-tree node entry

2020-06-30 Thread Chao Yu
then, we can add specified entry into rb-tree with 64-bits segment time as key. Signed-off-by: Chao Yu --- fs/f2fs/extent_cache.c | 37 +++-- fs/f2fs/f2fs.h | 15 --- fs/f2fs/segment.c | 4 ++-- 3 files changed, 49 insertions(+), 7 deleti

[f2fs-dev] [PATCH RFC 5/5] f2fs: support age threshold based garbage collection

2020-06-30 Thread Chao Yu
There are several issues in current background GC algorithm: - valid blocks is one of key factors during cost overhead calculation, so if segment has less valid block, however even its age is young or it locates hot segment, CB algorithm will still choose the segment as victim, it's not appropriate

[f2fs-dev] [PATCH RFC 3/5] f2fs: inherit mtime of original block during GC

2020-06-30 Thread Chao Yu
Don't let f2fs inner GC ruins original aging degree of segment. Signed-off-by: Chao Yu --- fs/f2fs/data.c| 2 +- fs/f2fs/f2fs.h| 5 +++-- fs/f2fs/gc.c | 4 ++-- fs/f2fs/segment.c | 55 --- 4 files changed, 49 insertions(+), 17 deletions

[f2fs-dev] [PATCH RFC 1/5] f2fs: introduce inmem curseg

2020-06-30 Thread Chao Yu
Previous implementation of aligned pinfile allocation will: - allocate new segment on cold data log no matter whether last used segment is partially used or not, it makes IOs more random; - force concurrent cold data/GCed IO going into warm data area, it can make a bad effect on hot/cold data separ

Re: [f2fs-dev] [PATCH] f2fs: remove unused parameter in f2fs_get_read_data_page()

2020-06-30 Thread Chao Yu
On 2020/6/30 12:45, Jia Yang wrote: > The parameter "op_flags" is not used in f2fs_get_read_data_page(), > so it can be removed. I don't think so, there is one missing case as below, in where op_flag was set incorrectly in f2fs_grab_read_bio(), we need to add one more parameter to pass op_flag val