[f2fs-dev] [PATCH 2/2] f2fs: let discard thread wait a little longer if dev is busy

2018-04-08 Thread Yunlei He
This patch modify discard thread wait policy as below: issued io_interrupted wait time(ms) 1.8 0 50 2. (0,8) 1 50 3.0 1 500 (dev is busy) 4.0 0

[f2fs-dev] [PATCH 1/2] f2fs: stop issue discard if something wrong with f2fs

2018-04-08 Thread Yunlei He
This patch stop discard thread to issue discard io if something wrong with f2fs, which is similar to fstrim. Signed-off-by: Yunlei He --- fs/f2fs/segment.c | 5 + 1 file changed, 5 insertions(+) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 5854cc4..f75f503

[f2fs-dev] [PATCH] f2fs: correct return value of f2fs_trim_fs

2018-04-08 Thread Chao Yu
From: Chao Yu Correct return value in two cases: - return EINVAL if end boundary is out-of-range. - return EIO if fs needs off-line check. Signed-off-by: Chao Yu --- fs/f2fs/segment.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [f2fs-dev] [RESEND PATCH] f2fs: no need to take the address of the array of sb->s_uuid

2018-04-08 Thread Gao Xiang
Hi Chao and Jaegeuk, On 2018/4/8 20:16, Chao Yu wrote: > On 2018/4/5 11:58, Gao Xiang wrote: >> Keep in line with the common case since it is some weird >> to take the address of an array again. > > I encounter compile error after applying this patch: > > super.c: In function ‘f2fs_fill_super’:

[f2fs-dev] [PATCH] f2fs: check cur_valid_map_mir & raw_sit block count when flush sit entries

2018-04-08 Thread Zhikang Zhang
We should check valid_map_mir and block count to ensure the flushed raw_sit is correct. Signed-off-by: Zhikang Zhang Signed-off-by: Yunlei He --- fs/f2fs/segment.c | 9 + 1 file changed, 9 insertions(+) diff --git a/fs/f2fs/segment.c

Re: [f2fs-dev] [PATCH 1/2] f2fs: stop issue discard if something wrong with f2fs

2018-04-08 Thread Chao Yu
On 2018/4/8 17:19, heyunlei wrote: > > >> -Original Message- >> From: Yuchao (T) >> Sent: Sunday, April 08, 2018 4:26 PM >> To: heyunlei; jaeg...@kernel.org; linux-f2fs-devel@lists.sourceforge.net >> Cc: Wangbintian >> Subject: Re: [f2fs-dev][PATCH 1/2] f2fs: stop issue discard if

Re: [f2fs-dev] [PATCH 2/2] f2fs: let discard thread wait a little longer if dev is busy

2018-04-08 Thread Chao Yu
On 2018/4/8 15:11, Yunlei He wrote: > This patch modify discard thread wait policy as below: > issued io_interrupted wait time(ms) > 1.8 0 50 > 2. (0,8) 1 50 > 3.0 1 500 (dev

Re: [f2fs-dev] [RESEND PATCH] f2fs: no need to take the address of the array of sb->s_uuid

2018-04-08 Thread Chao Yu
On 2018/4/5 11:58, Gao Xiang wrote: > Keep in line with the common case since it is some weird > to take the address of an array again. I encounter compile error after applying this patch: super.c: In function ‘f2fs_fill_super’: super.c:2711:2: error: incompatible type for argument 1 of

[f2fs-dev] [PATCH] f2fs: set deadline to drop expired inmem pages

2018-04-08 Thread Chao Yu
f2fs doesn't allow abuse on atomic write class interface, so except limiting in-mem pages' total memory usage capacity, we need to limit start-commit time as well, otherwise we may run into infinite loop during foreground GC because target blocks in victim segment are belong to atomic opened file

[f2fs-dev] [PATCH] f2fs: don't split checkpoint in fstrim

2018-04-08 Thread Chao Yu
From: Chao Yu Now, we issue discard asynchronously in separated thread instead of in checkpoint, after that, we won't encounter long latency in checkpoint due to huge number of synchronous discard command handling, so, we don't need to split checkpoint to do trim in batch,

Re: [f2fs-dev] [PATCH] f2fs: check cur_valid_map_mir & raw_sit block count when flush sit entries

2018-04-08 Thread Chao Yu
On 2018/4/9 4:28, Zhikang Zhang wrote: > We should check valid_map_mir and block count to ensure > the flushed raw_sit is correct. > > Signed-off-by: Zhikang Zhang > Signed-off-by: Yunlei He Reviewed-by: Chao Yu Thanks,

Re: [f2fs-dev] [PATCH] mkfs.f2fs: introduce new option V to show version

2018-04-08 Thread Chao Yu
On 2018/4/8 10:15, Sheng Yong wrote: > This patch introduces a new option -V to show the version of mkfs.f2fs > and exit after that. BTW, should we add -V for other misc tools? > > Signed-off-by: Sheng Yong Reviewed-by: Chao Yu Thanks,

Re: [f2fs-dev] [PATCH] resize.f2fs: clear CP_COMPACT_SUM_FLAG when rebuilding checkpoint

2018-04-08 Thread Chao Yu
On 2018/4/8 10:14, Sheng Yong wrote: > Resize rebuilds checkpoint with 6 summary blocks, so if > CP_COMPACT_SUM_FLAG is set in the old checkpoint, clear it. > > Signed-off-by: Sheng Yong Reviewed-by: Chao Yu Thanks,

[f2fs-dev] [PATCH v2] f2fs: don't split checkpoint in fstrim

2018-04-08 Thread Chao Yu
Now, we issue discard asynchronously in separated thread instead of in checkpoint, after that, we won't encounter long latency in checkpoint due to huge number of synchronous discard command handling, so, we don't need to split checkpoint to do trim in batch, merge it and obsolete related sysfs

Re: [f2fs-dev] [PATCH] common/config: support f2fs-tools v1.9 and later

2018-04-08 Thread Chao Yu
On 2018/4/7 23:29, Eryu Guan wrote: > On Thu, Apr 05, 2018 at 03:19:01PM -0700, Eric Biggers wrote: >> Pass the -f option to mkfs.f2fs when it appears to support it. This is >> required by f2fs-tools v1.9 and later in order to format the filesystem >> even when an existing filesystem is detected.

[f2fs-dev] [PATCH] fsck.f2fs: recover nat bits feature default by fsck

2018-04-08 Thread Yunlei He
Now, nat bits feature is enabled by default, we will meet with the following scenarios: i. disabled, without CP_NAT_BITS_FLAG, if fsck find some fs errors, fix or write new checkpoint will then enable it. ii. enabled, with CP_NAT_BITS_FLAG, in the case of sudden power off, bitmap

[f2fs-dev] [PATCH] f2fs: disable nat bits without setting SBI_NEED_FSCK

2018-04-08 Thread Yunlei He
nat bits feature is recover default by fsck, no need to set SBI_NEED_FSCK flag. Signed-off-by: Yunlei He --- fs/f2fs/f2fs.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 1df7f10..0ffaefc2 100644 --- a/fs/f2fs/f2fs.h +++

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

2018-04-08 Thread Yunlei He
This patch stop discard thread to issue discard io if something wrong with f2fs, which is similar to fstrim. v1->v2: add fs error check in not only discard thread but also umount process Signed-off-by: Yunlei He --- fs/f2fs/segment.c | 7 ++- 1 file changed, 6