Re: [f2fs-dev] [PATCH] f2fs: get parent inode when recovering pino

2020-05-06 Thread Chao Yu
On 2020/5/7 6:36, Gao Xiang wrote: > On Wed, May 06, 2020 at 12:16:13PM -0700, Eric Biggers wrote: >> On Wed, May 06, 2020 at 02:47:19PM +0800, Gao Xiang wrote: >>> On Wed, May 06, 2020 at 09:58:22AM +0800, Gao Xiang wrote: On Tue, May 05, 2020 at 06:24:28PM -0700, Eric Biggers wrote: > On

Re: [f2fs-dev] [PATCH] f2fs: get parent inode when recovering pino

2020-05-06 Thread Chao Yu
On 2020/5/6 14:55, Chao Yu wrote: > On 2020/5/6 9:24, Eric Biggers wrote: >> On Wed, May 06, 2020 at 08:14:07AM +0800, Gao Xiang wrote: Actually, I think this is wrong because the fsync can be done via a file descriptor that was opened to a now-deleted link to the file. >>> >>> I'm s

Re: [f2fs-dev] [PATCH] f2fs: don't return vmalloc() memory from f2fs_kmalloc()

2020-05-06 Thread Chao Yu
On 2020/5/7 2:43, Eric Biggers wrote: > On Wed, May 06, 2020 at 03:43:36PM +0800, Chao Yu wrote: >> On 2020/5/6 4:48, Eric Biggers wrote: >>> From: Eric Biggers >>> >>> kmalloc() returns kmalloc'ed memory, and kvmalloc() returns either >>> kmalloc'ed or vmalloc'ed memory. But the f2fs wrappers, f

Re: [f2fs-dev] [PATCH v2] f2fs: shrink spinlock coverage

2020-05-06 Thread Chao Yu
On 2020/5/6 23:05, Jaegeuk Kim wrote: > On 05/06, Chao Yu wrote: >> In f2fs_try_to_free_nids(), .nid_list_lock spinlock critical region will >> increase as expected shrink number increase, to avoid spining other CPUs >> for long time, it's better to implement like extent cache and nats >> shrinker.

Re: [f2fs-dev] [PATCH] f2fs: change maximum zstd compression buffer size

2020-05-06 Thread Chao Yu
On 2020/5/6 22:56, Jaegeuk Kim wrote: > On 05/06, Chao Yu wrote: >> On 2020/5/6 7:05, Jaegeuk Kim wrote: >>> On 05/05, Chao Yu wrote: On 2020-5-4 22:30, Jaegeuk Kim wrote: > From: Daeho Jeong > > Current zstd compression buffer size is one page and header size less > than clus

Re: [f2fs-dev] [PATCH 1/3] f2fs_io: add fsync

2020-05-06 Thread Chao Yu
On 2020/5/6 22:39, Jaegeuk Kim wrote: > On 05/06, Chao Yu wrote: >> On 2020/5/2 8:29, Jaegeuk Kim wrote: >>> Signed-off-by: Jaegeuk Kim >>> --- >>> tools/f2fs_io/f2fs_io.c | 25 + >>> 1 file changed, 25 insertions(+) >>> >>> diff --git a/tools/f2fs_io/f2fs_io.c b/tools/f2f

Re: [f2fs-dev] [PATCH] f2fs: get parent inode when recovering pino

2020-05-06 Thread Gao Xiang
On Wed, May 06, 2020 at 12:16:13PM -0700, Eric Biggers wrote: > On Wed, May 06, 2020 at 02:47:19PM +0800, Gao Xiang wrote: > > On Wed, May 06, 2020 at 09:58:22AM +0800, Gao Xiang wrote: > > > On Tue, May 05, 2020 at 06:24:28PM -0700, Eric Biggers wrote: > > > > On Wed, May 06, 2020 at 08:14:07AM +0

Re: [f2fs-dev] [PATCH] f2fs: get parent inode when recovering pino

2020-05-06 Thread Eric Biggers
On Wed, May 06, 2020 at 02:47:19PM +0800, Gao Xiang wrote: > On Wed, May 06, 2020 at 09:58:22AM +0800, Gao Xiang wrote: > > On Tue, May 05, 2020 at 06:24:28PM -0700, Eric Biggers wrote: > > > On Wed, May 06, 2020 at 08:14:07AM +0800, Gao Xiang wrote: > > > > > > > > > > Actually, I think this is wr

Re: [f2fs-dev] [PATCH] f2fs: don't return vmalloc() memory from f2fs_kmalloc()

2020-05-06 Thread Eric Biggers
On Wed, May 06, 2020 at 03:43:36PM +0800, Chao Yu wrote: > On 2020/5/6 4:48, Eric Biggers wrote: > > From: Eric Biggers > > > > kmalloc() returns kmalloc'ed memory, and kvmalloc() returns either > > kmalloc'ed or vmalloc'ed memory. But the f2fs wrappers, f2fs_kmalloc() > > and f2fs_kvmalloc(), b

Re: [f2fs-dev] [PATCH v2] f2fs: shrink spinlock coverage

2020-05-06 Thread Jaegeuk Kim
On 05/06, Chao Yu wrote: > In f2fs_try_to_free_nids(), .nid_list_lock spinlock critical region will > increase as expected shrink number increase, to avoid spining other CPUs > for long time, it's better to implement like extent cache and nats > shrinker. > > Signed-off-by: Chao Yu > --- > v2: >

Re: [f2fs-dev] [PATCH] f2fs: change maximum zstd compression buffer size

2020-05-06 Thread Jaegeuk Kim
On 05/06, Chao Yu wrote: > On 2020/5/6 7:05, Jaegeuk Kim wrote: > > On 05/05, Chao Yu wrote: > >> On 2020-5-4 22:30, Jaegeuk Kim wrote: > >>> From: Daeho Jeong > >>> > >>> Current zstd compression buffer size is one page and header size less > >>> than cluster size. By this, zstd compression alway

Re: [f2fs-dev] [PATCH] f2fs: use strcmp() in parse_options()

2020-05-06 Thread Jaegeuk Kim
On 05/06, Chao Yu wrote: > On 2020/5/2 7:35, Eric Biggers wrote: > > From: Eric Biggers > > > > Remove the pointless string length checks. Just use strcmp(). > > > > Signed-off-by: Eric Biggers > > Reviewed-by: Chao Yu > > [...] > > > - } else if (strlen(name) == 4 && > >

Re: [f2fs-dev] [PATCH 3/3] f2fs_io: show more flags

2020-05-06 Thread Jaegeuk Kim
On 05/06, Chao Yu wrote: > On 2020/5/2 8:29, Jaegeuk Kim wrote: > > Signed-off-by: Jaegeuk Kim > > --- > > tools/f2fs_io/f2fs_io.c | 28 > > tools/f2fs_io/f2fs_io.h | 12 > > 2 files changed, 40 insertions(+) > > > > diff --git a/tools/f2fs_io/f2fs_io.c

Re: [f2fs-dev] [PATCH 1/3] f2fs_io: add fsync

2020-05-06 Thread Jaegeuk Kim
On 05/06, Chao Yu wrote: > On 2020/5/2 8:29, Jaegeuk Kim wrote: > > Signed-off-by: Jaegeuk Kim > > --- > > tools/f2fs_io/f2fs_io.c | 25 + > > 1 file changed, 25 insertions(+) > > > > diff --git a/tools/f2fs_io/f2fs_io.c b/tools/f2fs_io/f2fs_io.c > > index c1edef1..c84b6a

[f2fs-dev] [PATCH v2] f2fs: shrink spinlock coverage

2020-05-06 Thread Chao Yu
In f2fs_try_to_free_nids(), .nid_list_lock spinlock critical region will increase as expected shrink number increase, to avoid spining other CPUs for long time, it's better to implement like extent cache and nats shrinker. Signed-off-by: Chao Yu --- v2: - fix unlock wrong spinlock. fs/f2fs/node.

[f2fs-dev] [PATCH] f2fs: shrink spinlock coverage

2020-05-06 Thread Chao Yu
In f2fs_try_to_free_nids(), .nid_list_lock spinlock critical region will increase as expected shrink number increase, to avoid spining other CPUs for long time, it's better to implement like extent cache and nats shrinker. Signed-off-by: Chao Yu --- fs/f2fs/node.c | 15 +++ 1 file ch

Re: [f2fs-dev] [PATCH] f2fs: change maximum zstd compression buffer size

2020-05-06 Thread Chao Yu
On 2020/5/6 7:05, Jaegeuk Kim wrote: > On 05/05, Chao Yu wrote: >> On 2020-5-4 22:30, Jaegeuk Kim wrote: >>> From: Daeho Jeong >>> >>> Current zstd compression buffer size is one page and header size less >>> than cluster size. By this, zstd compression always succeeds even if >>> the real compres

Re: [f2fs-dev] [PATCH] f2fs: don't return vmalloc() memory from f2fs_kmalloc()

2020-05-06 Thread Chao Yu
On 2020/5/6 4:48, Eric Biggers wrote: > From: Eric Biggers > > kmalloc() returns kmalloc'ed memory, and kvmalloc() returns either > kmalloc'ed or vmalloc'ed memory. But the f2fs wrappers, f2fs_kmalloc() > and f2fs_kvmalloc(), both return both kinds of memory. > > It's redundant to have two func