Re: [f2fs-dev] [RFC PATCH 4/4] f2fs-tools: introduce sb checksum

2018-08-13 Thread Chao Yu
On 2018/8/14 10:03, Junling Zheng wrote: > Hi, Chao > > On 2018/8/13 22:33, Chao Yu wrote: >> On 2018/8/13 21:32, Junling Zheng wrote: >>> This patch introduced crc for superblock. >>> >>> Signed-off-by: Junling Zheng >>> --- >>> fsck/mount.c | 23 +++ >>>

Re: [f2fs-dev] [PATCH 2/2] f2fs: tune discard speed with storage usage rate

2018-08-13 Thread Jaegeuk Kim
On 08/10, Chao Yu wrote: > Previously, discard speed was fixed mostly, and in high usage rate > device, we will speed up issuing discard, but it doesn't make sense > that in a non-full filesystem, we still issue discard with slow speed. Could you please elaborate the problem in more detail? The

Re: [f2fs-dev] [PATCH 1/2] f2fs: set 4KB discard granularity by default

2018-08-13 Thread Jaegeuk Kim
On 08/10, Chao Yu wrote: > Small granularity (size < 64K) fragmentation will cause f2fs suspending > all pending discards, result in performance regression, so let's set > 4KB discard granularity by default. > > So that without fstrim, we also have the ability to avoid any performance >

Re: [f2fs-dev] [PATCH v3] f2fs: fix performance issue observed with multi-thread sequential read

2018-08-13 Thread Jaegeuk Kim
On 08/14, Chao Yu wrote: > On 2018/8/14 4:11, Jaegeuk Kim wrote: > > On 08/13, Chao Yu wrote: > >> Hi Jaegeuk, > >> > >> On 2018/8/11 2:56, Jaegeuk Kim wrote: > >>> This reverts the commit - "b93f771 - f2fs: remove writepages lock" > >>> to fix the drop in sequential read throughput. > >>> > >>>

Re: [f2fs-dev] [PATCH v3] f2fs: fix performance issue observed with multi-thread sequential read

2018-08-13 Thread Chao Yu
On 2018/8/14 4:11, Jaegeuk Kim wrote: > On 08/13, Chao Yu wrote: >> Hi Jaegeuk, >> >> On 2018/8/11 2:56, Jaegeuk Kim wrote: >>> This reverts the commit - "b93f771 - f2fs: remove writepages lock" >>> to fix the drop in sequential read throughput. >>> >>> Test: ./tiotest -t 32 -d /data/tio_tmp -f 32

Re: [f2fs-dev] [RFC PATCH 3/4] f2fs-tools: unify the writeback of superblock

2018-08-13 Thread Junling Zheng
On 2018/8/13 22:25, Chao Yu wrote: > On 2018/8/13 21:32, Junling Zheng wrote: >> Introduce __write_superblock() to support updating specified one >> superblock or both, thus we can wrapper it in update_superblock() and >> f2fs_write_super_block to unify all places where sb needs to be updated. >>

Re: [f2fs-dev] [RFC PATCH 4/4] f2fs-tools: introduce sb checksum

2018-08-13 Thread Junling Zheng
Hi, Chao On 2018/8/13 22:33, Chao Yu wrote: > On 2018/8/13 21:32, Junling Zheng wrote: >> This patch introduced crc for superblock. >> >> Signed-off-by: Junling Zheng >> --- >> fsck/mount.c | 23 +++ >> fsck/resize.c | 12 ++-- >> include/f2fs_fs.h | 16

[f2fs-dev] [PATCH] f2fs: rework fault injection handling to avoid a warning

2018-08-13 Thread Arnd Bergmann
When CONFIG_F2FS_FAULT_INJECTION is disabled, we get a warning about an unused label: fs/f2fs/segment.c: In function '__submit_discard_cmd': fs/f2fs/segment.c:1059:1: error: label 'submit' defined but not used [-Werror=unused-label] This could be fixed by adding another #ifdef around it, but

Re: [f2fs-dev] [PATCH] f2fs: avoid fi->i_gc_rwsem[WRITE] lock in f2fs_gc

2018-08-13 Thread Jaegeuk Kim
On 08/12, Chao Yu wrote: > On 2018/8/4 10:31, Chao Yu wrote: > > How about keep lock order as: > > > > - inode_lock > > - i_mmap_sem > > - lock_all() > > - unlock_all() > > - i_gc_rwsem[WRITE] > >- lock_op() > > I got below warning when testing last dev-test: > > - f2fs_direct_IO

Re: [f2fs-dev] [PATCH v3] f2fs: fix performance issue observed with multi-thread sequential read

2018-08-13 Thread Jaegeuk Kim
On 08/13, Chao Yu wrote: > Hi Jaegeuk, > > On 2018/8/11 2:56, Jaegeuk Kim wrote: > > This reverts the commit - "b93f771 - f2fs: remove writepages lock" > > to fix the drop in sequential read throughput. > > > > Test: ./tiotest -t 32 -d /data/tio_tmp -f 32 -b 524288 -k 1 -k 3 -L > > device: UFS >

Re: [f2fs-dev] [RFC PATCH 4/4] f2fs-tools: introduce sb checksum

2018-08-13 Thread Chao Yu
On 2018/8/13 21:32, Junling Zheng wrote: > This patch introduced crc for superblock. > > Signed-off-by: Junling Zheng > --- > fsck/mount.c | 23 +++ > fsck/resize.c | 12 ++-- > include/f2fs_fs.h | 16 +++- > mkfs/f2fs_format.c | 3 +++ > 4

[f2fs-dev] [RFC PATCH 3/4] f2fs-tools: unify the writeback of superblock

2018-08-13 Thread Junling Zheng
Introduce __write_superblock() to support updating specified one superblock or both, thus we can wrapper it in update_superblock() and f2fs_write_super_block to unify all places where sb needs to be updated. Signed-off-by: Junling Zheng --- fsck/fsck.h| 2 +- fsck/mount.c | 74

[f2fs-dev] [RFC PATCH RESEND 2/4] f2fs-tools: rename CHECKSUM_OFFSET to CP_CHKSUM_OFFSET

2018-08-13 Thread Junling Zheng
This patch renamed CHECKSUM_OFFSET to CP_CHKSUM_OFFSET. Reviewed-by: Chao Yu Signed-off-by: Junling Zheng --- fsck/fsck.c| 4 ++-- fsck/mount.c | 4 ++-- fsck/resize.c | 8 include/f2fs_fs.h | 6 +++--- mkfs/f2fs_format.c | 14 +++--- 5 files changed,

[f2fs-dev] [RFC PATCH 4/4] f2fs-tools: introduce sb checksum

2018-08-13 Thread Junling Zheng
This patch introduced crc for superblock. Signed-off-by: Junling Zheng --- fsck/mount.c | 23 +++ fsck/resize.c | 12 ++-- include/f2fs_fs.h | 16 +++- mkfs/f2fs_format.c | 3 +++ 4 files changed, 47 insertions(+), 7 deletions(-) diff --git

[f2fs-dev] [RFC PATCH RESEND 1/4] f2fs: support superblock checksum

2018-08-13 Thread Junling Zheng
Now we support crc32 checksum for superblock. Reviewed-by: Chao Yu Signed-off-by: Junling Zheng --- fs/f2fs/f2fs.h | 2 ++ fs/f2fs/super.c | 29 + fs/f2fs/sysfs.c | 7 +++ include/linux/f2fs_fs.h | 3 ++- 4 files changed, 40

Re: [f2fs-dev] [PATCH] Revert "f2fs: use printk_ratelimited for f2fs_msg"

2018-08-13 Thread Joe Perches
On Mon, 2018-08-13 at 14:28 +0800, Chao Yu wrote: > Don't limit printing log, so that we will not miss any key messages. > > This reverts commit a36c106dffb616250117efb1cab271c19a8f94ff. [] > diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c [] > @@ -209,7 +209,7 @@ void f2fs_msg(struct super_block

Re: [f2fs-dev] [PATCH v2] f2fs: fix return value of f2fs_set_qf_name and parse_options

2018-08-13 Thread Chao Yu
On 2018/8/13 13:41, Tiezhu Yang wrote: > match_strdup() returns NULL when kmalloc failed, so the caller > function f2fs_set_qf_name() should return -ENOMEM in this case; > match_int() returns -ENOMEM, -EINVAL, or -ERANGE on failure, > so the caller function parse_options() should not always return

[f2fs-dev] [PATCH] Revert "f2fs: use printk_ratelimited for f2fs_msg"

2018-08-13 Thread Chao Yu
Don't limit printing log, so that we will not miss any key messages. This reverts commit a36c106dffb616250117efb1cab271c19a8f94ff. Signed-off-by: Chao Yu --- fs/f2fs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index