Re: [f2fs-dev] [PATCH] f2fs: sepearte hot/cold in free nid

2018-04-19 Thread Chao Yu
On 2018/4/20 10:30, heyunlei wrote: > > >> -Original Message- >> From: Chao Yu [mailto:yuch...@huawei.com] >> Sent: Friday, April 20, 2018 9:53 AM >> To: jaeg...@kernel.org >> Cc: linux-ker...@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net >> Subject: [f2fs-dev] [PATCH] f2fs:

Re: [f2fs-dev] [PATCH 4/5] f2fs: show GC failure info in debugfs

2018-04-19 Thread Jaegeuk Kim
On 04/18, Chao Yu wrote: > This patch adds to show GC failure information in debugfs, now it just > shows count of failure caused by atomic write. > > Signed-off-by: Chao Yu > --- > fs/f2fs/debug.c | 5 + > fs/f2fs/f2fs.h | 1 + > fs/f2fs/gc.c| 13 +++-- >

Re: [f2fs-dev] [PATCH v2] f2fs: use cur_map instead of ckpt_map

2018-04-19 Thread Chao Yu
On 2018/4/20 11:26, Jaegeuk Kim wrote: > On 04/20, heyunlei wrote: >> >> >>> -Original Message- >>> From: Yuchao (T) >>> Sent: Friday, April 13, 2018 9:12 AM >>> To: Jaegeuk Kim; heyunlei >>> Cc: linux-f2fs-devel@lists.sourceforge.net; Wangbintian; Zhangdianfang >>> (Euler) >>> Subject:

Re: [f2fs-dev] [PATCH v2] f2fs: use cur_map instead of ckpt_map

2018-04-19 Thread heyunlei
>-Original Message- >From: Jaegeuk Kim [mailto:jaeg...@kernel.org] >Sent: Friday, April 20, 2018 11:41 AM >To: Yuchao (T) >Cc: heyunlei; linux-f2fs-devel@lists.sourceforge.net; Wangbintian; >Zhangdianfang (Euler) >Subject: Re: [f2fs-dev][PATCH v2] f2fs: use cur_map instead of ckpt_map >

Re: [f2fs-dev] [PATCH 5/5] f2fs: fix to avoid race during access gc_thread pointer

2018-04-19 Thread Jaegeuk Kim
On 04/18, Chao Yu wrote: > Thread A Thread BThread C > - f2fs_remount > - stop_gc_thread > - f2fs_sbi_store > - issue_discard_thread >sbi->gc_thread = NULL; >

Re: [f2fs-dev] [PATCH] fsck.f2fs: add -O features to tune the bits

2018-04-19 Thread Jaegeuk Kim
On 04/20, Chao Yu wrote: > On 2018/4/20 9:46, Junling Zheng wrote: > > Hi, Jaegeuk > > > > On 2018/4/20 4:54, Jaegeuk Kim wrote: > >> This patch add -O features for fsck.f2fs in order to tune the feature bits. > >> Currently, it supports -O encrypt only. > >> > > > > Shall we introduce a new

Re: [f2fs-dev] [PATCH v2 2/2] f2fs: refactor read path to allow multiple postprocessing steps

2018-04-19 Thread Jaegeuk Kim
Queued in f2fs/dev. Thanks, On 04/18, Eric Biggers wrote: > Currently f2fs's ->readpage() and ->readpages() assume that either the > data undergoes no postprocessing, or decryption only. But with > fs-verity, there will be an additional authenticity verification step, > and it may be needed

Re: [f2fs-dev] [PATCH 3/5] f2fs: avoid stucking GC due to atomic write

2018-04-19 Thread Jaegeuk Kim
On 04/20, Chao Yu wrote: > On 2018/4/20 11:12, Jaegeuk Kim wrote: > > On 04/18, Chao Yu wrote: > >> f2fs doesn't allow abuse on atomic write class interface, so except > >> limiting in-mem pages' total memory usage capacity, we need to limit > >> atomic-write usage as well when filesystem is

Re: [f2fs-dev] [PATCH 5/5] f2fs: fix to avoid race during access gc_thread pointer

2018-04-19 Thread Chao Yu
On 2018/4/20 11:19, Jaegeuk Kim wrote: > On 04/18, Chao Yu wrote: >> Thread A Thread BThread C >> - f2fs_remount >> - stop_gc_thread >> - f2fs_sbi_store >> - issue_discard_thread

Re: [f2fs-dev] [PATCH 5/5] f2fs: fix to avoid race during access gc_thread pointer

2018-04-19 Thread Jaegeuk Kim
On 04/20, Chao Yu wrote: > On 2018/4/20 11:19, Jaegeuk Kim wrote: > > On 04/18, Chao Yu wrote: > >> Thread A Thread BThread C > >> - f2fs_remount > >> - stop_gc_thread > >>- f2fs_sbi_store > >>

Re: [f2fs-dev] [PATCH] f2fs: sepearte hot/cold in free nid

2018-04-19 Thread Chao Yu
On 2018/4/20 11:37, Jaegeuk Kim wrote: > On 04/20, Chao Yu wrote: >> As most indirect node, dindirect node, and xattr node won't be updated >> after they are created, but inode node and other direct node will change >> more frequently, so store their nat entries mixedly in whole nat table >> will

Re: [f2fs-dev] [PATCH v2 1/2] fscrypt: allow synchronous bio decryption

2018-04-19 Thread Jaegeuk Kim
Queued in f2fs/dev. Thanks, On 04/18, Eric Biggers wrote: > Currently, fscrypt provides fscrypt_decrypt_bio_pages() which decrypts a > bio's pages asynchronously, then unlocks them afterwards. But, this > assumes that decryption is the last "postprocessing step" for the bio, > so it's

Re: [f2fs-dev] [PATCH 4/5] f2fs: show GC failure info in debugfs

2018-04-19 Thread Chao Yu
On 2018/4/20 11:15, Jaegeuk Kim wrote: > On 04/18, Chao Yu wrote: >> This patch adds to show GC failure information in debugfs, now it just >> shows count of failure caused by atomic write. >> >> Signed-off-by: Chao Yu >> --- >> fs/f2fs/debug.c | 5 + >> fs/f2fs/f2fs.h

Re: [f2fs-dev] [PATCH] f2fs: sepearte hot/cold in free nid

2018-04-19 Thread Jaegeuk Kim
On 04/20, Chao Yu wrote: > As most indirect node, dindirect node, and xattr node won't be updated > after they are created, but inode node and other direct node will change > more frequently, so store their nat entries mixedly in whole nat table > will suffer: > - fragment nat table soon due to

Re: [f2fs-dev] [PATCH v2] f2fs: use cur_map instead of ckpt_map

2018-04-19 Thread Jaegeuk Kim
On 04/20, Chao Yu wrote: > On 2018/4/20 11:26, Jaegeuk Kim wrote: > > On 04/20, heyunlei wrote: > >> > >> > >>> -Original Message- > >>> From: Yuchao (T) > >>> Sent: Friday, April 13, 2018 9:12 AM > >>> To: Jaegeuk Kim; heyunlei > >>> Cc: linux-f2fs-devel@lists.sourceforge.net;

Re: [f2fs-dev] [PATCH] f2fs: sepearte hot/cold in free nid

2018-04-19 Thread heyunlei
>-Original Message- >From: Chao Yu [mailto:yuch...@huawei.com] >Sent: Friday, April 20, 2018 9:53 AM >To: jaeg...@kernel.org >Cc: linux-ker...@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net >Subject: [f2fs-dev] [PATCH] f2fs: sepearte hot/cold in free nid > >As most indirect

Re: [f2fs-dev] [PATCH 3/5] f2fs: avoid stucking GC due to atomic write

2018-04-19 Thread Jaegeuk Kim
On 04/18, Chao Yu wrote: > f2fs doesn't allow abuse on atomic write class interface, so except > limiting in-mem pages' total memory usage capacity, we need to limit > atomic-write usage as well when filesystem is seriously fragmented, > otherwise we may run into infinite loop during foreground GC

Re: [f2fs-dev] [PATCH v2] f2fs: use cur_map instead of ckpt_map

2018-04-19 Thread Jaegeuk Kim
On 04/20, heyunlei wrote: > > > >-Original Message- > >From: Yuchao (T) > >Sent: Friday, April 13, 2018 9:12 AM > >To: Jaegeuk Kim; heyunlei > >Cc: linux-f2fs-devel@lists.sourceforge.net; Wangbintian; Zhangdianfang > >(Euler) > >Subject: Re: [f2fs-dev][PATCH v2] f2fs: use cur_map

Re: [f2fs-dev] [PATCH 2/2] f2fs: refactor read path to allow multiple postprocessing steps

2018-04-19 Thread Chao Yu
Hi Eric and Jaegeuk, On 2018/4/19 1:18, Eric Biggers via Linux-f2fs-devel wrote: > Hi Chao, > > On Wed, Apr 18, 2018 at 02:27:32PM +0800, Chao Yu wrote: >> Hi Eric, >> >> On 2018/4/18 1:42, Eric Biggers wrote: >>> Hi Chao, >>> >>> On Tue, Apr 17, 2018 at 05:13:12PM +0800, Chao Yu wrote: > +

[f2fs-dev] [PATCH] f2fs-tools: add -g to give default options

2018-04-19 Thread Jaegeuk Kim
This patch adds -g option to set default options for specific environment. I added it for android as a example. # mkfs.f2fs -g android $dev : gives "-d1 -f -O encrypt -O quota -w 4096" # fsck.f2fs -g android $dev : gives "-a" Signed-off-by: Jaegeuk Kim ---

[f2fs-dev] [PATCH] fsck.f2fs: add -O features to tune the bits

2018-04-19 Thread Jaegeuk Kim
This patch add -O features for fsck.f2fs in order to tune the feature bits. Currently, it supports -O encrypt only. Signed-off-by: Jaegeuk Kim --- fsck/fsck.h | 1 + fsck/main.c | 9 - fsck/mount.c | 39 ++- fsck/resize.c |

[f2fs-dev] [xfstests-bld PATCH 2/2] test-appliance: add 'encrypt' config for f2fs

2018-04-19 Thread Eric Biggers
From: Eric Biggers Allow testing f2fs using the test_dummy_encryption mount option, available with f2fs in kernel 4.17 and later. E.g., gce-xfstests -c f2fs/encrypt -g auto This is the f2fs equivalent of ext4/encrypt. Signed-off-by: Eric Biggers

[f2fs-dev] [xfstests-bld PATCH 1/2] test-appliance: fix specifying f2fs mount options in config file

2018-04-19 Thread Eric Biggers
From: Eric Biggers setup_mount_opts() is supposed to prepend "-o " to the mount options, but it failed to do so in the case where mount options are specified in a config file rather than on the command line. Fix it. Signed-off-by: Eric Biggers ---

[f2fs-dev] [PATCH] mkfs.f2fs: factor out feature table from mkfs.f2fs

2018-04-19 Thread Jaegeuk Kim
This patch makes feature bit work be global in f2fs-tools. Signed-off-by: Jaegeuk Kim --- include/f2fs_fs.h | 77 + mkfs/f2fs_format_main.c | 67 ++- 2 files changed, 80 insertions(+), 64

Re: [f2fs-dev] [PATCH v5] f2fs: stop issue discard if something wrong with f2fs

2018-04-19 Thread heyunlei
>-Original Message- >From: heyunlei >Sent: Friday, April 13, 2018 11:08 AM >To: jaeg...@kernel.org; Yuchao (T); linux-f2fs-devel@lists.sourceforge.net >Cc: Wangbintian; heyunlei; Zhangdianfang (Euler) >Subject: [f2fs-dev][PATCH v5] f2fs: stop issue discard if something wrong with >f2fs

Re: [f2fs-dev] [PATCH v2] f2fs: use cur_map instead of ckpt_map

2018-04-19 Thread heyunlei
>-Original Message- >From: Yuchao (T) >Sent: Friday, April 13, 2018 9:12 AM >To: Jaegeuk Kim; heyunlei >Cc: linux-f2fs-devel@lists.sourceforge.net; Wangbintian; Zhangdianfang (Euler) >Subject: Re: [f2fs-dev][PATCH v2] f2fs: use cur_map instead of ckpt_map > >On 2018/4/13 6:37, Jaegeuk

Re: [f2fs-dev] [PATCH] fsck.f2fs: add -O features to tune the bits

2018-04-19 Thread Junling Zheng
Hi, Jaegeuk On 2018/4/20 4:54, Jaegeuk Kim wrote: > This patch add -O features for fsck.f2fs in order to tune the feature bits. > Currently, it supports -O encrypt only. > Shall we introduce a new tool like tune.f2fs to tune the parameters of f2fs? Maybe we will tune others parameters in the

[f2fs-dev] [PATCH] f2fs: sepearte hot/cold in free nid

2018-04-19 Thread Chao Yu
As most indirect node, dindirect node, and xattr node won't be updated after they are created, but inode node and other direct node will change more frequently, so store their nat entries mixedly in whole nat table will suffer: - fragment nat table soon due to different update rate - more nat

Re: [f2fs-dev] [PATCH] fsck.f2fs: add -O features to tune the bits

2018-04-19 Thread Chao Yu
On 2018/4/20 9:46, Junling Zheng wrote: > Hi, Jaegeuk > > On 2018/4/20 4:54, Jaegeuk Kim wrote: >> This patch add -O features for fsck.f2fs in order to tune the feature bits. >> Currently, it supports -O encrypt only. >> > > Shall we introduce a new tool like tune.f2fs to tune the parameters of