Re: [f2fs-dev][PATCH RESEND] f2fs: avoid allocating failure in bio_alloc

2013-09-15 Thread Chao Yu
Hi Gu > -Original Message- > From: Gu Zheng [mailto:guz.f...@cn.fujitsu.com] > Sent: Monday, September 16, 2013 10:09 AM > To: Chao Yu > Cc: Kim Jaegeuk; linux-f2fs-de...@lists.sourceforge.net; > linux-fsde...@vger.kernel.org; linux-kernel@vger.kernel.org; 谭姝 > S

RE: [f2fs-dev][PATCH RESEND] f2fs: avoid allocating failure in bio_alloc

2013-09-16 Thread Chao Yu
Hi Gu > -Original Message- > From: Gu Zheng [mailto:guz.f...@cn.fujitsu.com] > Sent: Monday, September 16, 2013 12:40 PM > To: Chao Yu > Cc: 'Kim Jaegeuk'; linux-f2fs-de...@lists.sourceforge.net; > linux-fsde...@vger.kernel.org; linux-kernel@vger.kernel.org; &

Re: Re: [f2fs-dev][PATCH] f2fs: optimize fs_lock for better performance

2013-09-10 Thread Chao Yu
on't care about the exact lock number, but just need to get any not-collided number. So, how about removing the spin_lock? And how about using a random number? Thanks, 2013-09-06 (?), 09:48 +, Chao Yu: > Hi Kim: > > I think there is a performance problem: when all sbi-&

[f2fs-dev][PATCH] f2fs: limit nr_iovecs in bio_alloc

2013-09-13 Thread Chao Yu
This patch add macro MAX_BIO_BLOCKS to limit value of npages in f2fs_bio_alloc, it can avoid to return NULL in bio_alloc caused by npages is larger than UIO_MAXIOV. Signed-off-by: Yu Chao --- fs/f2fs/segment.c |4 +++- fs/f2fs/segment.h |3 +++ 2 files changed, 6 insertions(+), 1 deleti

RE: [f2fs-dev][PATCH] f2fs: limit nr_iovecs in bio_alloc

2013-09-13 Thread Chao Yu
> -Original Message- > From: Jin Xu [mailto:linuxclim...@gmail.com] > Sent: Friday, September 13, 2013 7:49 PM > To: Chao Yu > Cc: ???; linux-f2fs-de...@lists.sourceforge.net; linux-fsde...@vger.kernel.org; > linux-kernel@vger.kernel.org; 谭姝 > Subject: Re: [f2fs-de

[f2fs-dev][PATCH RESEND] f2fs: avoid allocating failure in bio_alloc

2013-09-13 Thread Chao Yu
This patch add macro MAX_BIO_BLOCKS to limit value of npages in f2fs_bio_alloc, it can avoid allocating failure in bio_alloc caused by npages is larger than UIO_MAXIOV. Signed-off-by: Yu Chao --- fs/f2fs/segment.c |4 +++- fs/f2fs/segment.h |3 +++ 2 files changed, 6 insertions(+), 1 de

[f2fs-dev][PATCH DISCUSS] f2fs: readahead continuous sit entry pages for better mount performance

2013-09-30 Thread Chao Yu
Since f2fs mount process should scanning all valid SIT entries and reserve information in memory for following operations during mount process, the mount performance is worse than ext4 in embedded devices. We found a way to improve the mount performance based on current f2fs design strategy. For th

[f2fs-dev] [PATCH] f2fs: avoid allocating failure in bio_alloc

2013-09-22 Thread Chao Yu
This patch add macro MAX_BIO_BLOCKS to limit value of npages in f2fs_bio_alloc, it can avoid allocating failure in bio_alloc caused by npages is larger than BIO_MAX_PAGES. Signed-off-by: Yu Chao --- fs/f2fs/segment.c |4 +++- fs/f2fs/segment.h |2 ++ 2 files changed, 5 insertions(+), 1 d

[f2fs-dev] [PATCH] f2fs: remove unneeded write checkpoint in recover_fsync_data

2013-09-22 Thread Chao Yu
Previously, recover_fsync_data still to write checkpoint when there is nothing to recover with normal umount image. It may reduce mount performance and flash memory lifetime, so let's remove it. Signed-off-by: Tan Shu Signed-off-by: Yu Chao --- fs/f2fs/recovery.c |5 - 1 file changed, 4

RE: [f2fs-dev] [PATCH] f2fs: remove unneeded write checkpoint in recover_fsync_data

2013-09-23 Thread Chao Yu
Hi Gu > -Original Message- > From: Gu Zheng [mailto:guz.f...@cn.fujitsu.com] > Sent: Monday, September 23, 2013 9:54 AM > To: Chao Yu > Cc: Kim Jaegeuk; linux-f2fs-de...@lists.sourceforge.net; > linux-fsde...@vger.kernel.org; linux-kernel@vger.kernel.org; 谭姝 > S

[f2fs-dev] [PATCH RESEND] f2fs: remove unneeded write checkpoint in recover_fsync_data

2013-09-23 Thread Chao Yu
Previously, recover_fsync_data still to write checkpoint when there is nothing to recover with normal umount image. It may reduce mount performance and flash memory lifetime, so let's remove it. Signed-off-by: Tan Shu Signed-off-by: Yu Chao --- fs/f2fs/recovery.c |5 - 1 file changed, 4

[PATCH] nfs: add missing CONFIG_MIGRATION for nfs_migrate_page

2016-09-19 Thread Chao Yu
We'd better to use CONFIG_MIGRATION to cover nfs_migrate_page, otherwise when CONFIG_MIGRATION is not defined, unused nfs_migrate_page will still be compiled into kernel. Signed-off-by: Chao Yu --- fs/nfs/file.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/nfs/file.c b/fs/nfs/f

[PATCH] gfs2: fix to detect failure of register_shrinker

2016-09-19 Thread Chao Yu
From: Chao Yu register_shrinker can fail after commit 1d3d4437eae1 ("vmscan: per-node deferred work"), we should detect the failure of it, otherwise we may fail to register shrinker after gfs2 module was been inited successfully. Signed-off-by: Chao Yu --- fs/gfs2/glock.c | 8 ++

Re: [PATCH] nfs: add missing CONFIG_MIGRATION for nfs_migrate_page

2016-09-19 Thread Chao Yu
Hi Anna, On 2016/9/20 1:38, Anna Schumaker wrote: > Hi Chao, > > On 09/19/2016 08:09 AM, Chao Yu wrote: >> We'd better to use CONFIG_MIGRATION to cover nfs_migrate_page, otherwise >> when CONFIG_MIGRATION is not defined, unused nfs_migrate_page will still >> be co

Re: [PATCH 3/6] f2fs: fix to avoid race condition when updating sbi flag

2016-09-19 Thread Chao Yu
Hi Jaegeuk, On 2016/9/20 5:40, Jaegeuk Kim wrote: > Hi Chao, > > On Sun, Sep 18, 2016 at 11:30:05PM +0800, Chao Yu wrote: >> From: Chao Yu >> >> Making updating of sbi flag atomic by using {test,set,clear}_bit, >> otherwise in concurrency scenario, the

Re: [PATCH 4/6] f2fs: introduce cp_lock to protect updating of ckpt_flags

2016-09-19 Thread Chao Yu
Hi Jaegeuk, On 2016/9/20 5:49, Jaegeuk Kim wrote: > Hi Chao, > > On Sun, Sep 18, 2016 at 11:30:06PM +0800, Chao Yu wrote: >> From: Chao Yu >> >> This patch introduces spinlock to protect updating process of ckpt_flags >> field in struct f2fs_checkpoint, it av

Re: [PATCH] f2fs: fix to avoid slowing down background gc

2016-09-19 Thread Chao Yu
Hi Jaegeuk, On 2016/9/20 6:12, Jaegeuk Kim wrote: > Hi Chao, > > On Sun, Sep 18, 2016 at 07:52:27PM +0800, Chao Yu wrote: >> Previously, we will choose to speed up background gc when the below >> conditions are both satisfied: >> a. There are a number of invalid block

[PATCH v2 3/6] f2fs: fix to avoid race condition when updating sbi flag

2016-09-19 Thread Chao Yu
Making updating of sbi flag atomic by using {test,set,clear}_bit, otherwise in concurrency scenario, the flag could be updated incorrectly. Signed-off-by: Chao Yu --- fs/f2fs/f2fs.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index

[PATCH] raid5: fix to detect failure of register_shrinker

2016-09-19 Thread Chao Yu
register_shrinker can fail after commit 1d3d4437eae1 ("vmscan: per-node deferred work"), we should detect the failure of it, otherwise we may fail to register shrinker after raid5 configuration was setup successfully. Signed-off-by: Chao Yu --- drivers/md/raid5.c | 7 ++- 1 file

Re: [PATCH 4/6] f2fs: introduce cp_lock to protect updating of ckpt_flags

2016-09-19 Thread Chao Yu
On 2016/9/20 10:41, Jaegeuk Kim wrote: > On Tue, Sep 20, 2016 at 09:47:20AM +0800, Chao Yu wrote: >> Hi Jaegeuk, >> >> On 2016/9/20 5:49, Jaegeuk Kim wrote: >>> Hi Chao, >>> >>> On Sun, Sep 18, 2016 at 11:30:06PM +0800, Chao Yu wrote: >>>>

[PATCH v2 4/6] f2fs: introduce cp_lock to protect updating of ckpt_flags

2016-09-19 Thread Chao Yu
This patch introduces spinlock to protect updating process of ckpt_flags field in struct f2fs_checkpoint, it avoids incorrectly updating in race condition. Signed-off-by: Chao Yu --- fs/f2fs/checkpoint.c | 28 fs/f2fs/f2fs.h | 37

Re: [PATCH] f2fs: fix to avoid slowing down background gc

2016-09-19 Thread Chao Yu
On 2016/9/20 10:54, Jaegeuk Kim wrote: > On Tue, Sep 20, 2016 at 10:22:22AM +0800, Chao Yu wrote: >> Hi Jaegeuk, >> >> On 2016/9/20 6:12, Jaegeuk Kim wrote: >>> Hi Chao, >>> >>> On Sun, Sep 18, 2016 at 07:52:27PM +0800, Chao Yu wrote: >>>&g

[PATCH] nfs: cover ->migratepage with CONFIG_MIGRATION

2016-09-19 Thread Chao Yu
It will be more clean to use CONFIG_MIGRATION to cover nfs' private .migratepage in nfs_file_aops like we do in other part of nfs operations. Signed-off-by: Chao Yu --- fs/nfs/file.c | 2 ++ fs/nfs/internal.h | 8 2 files changed, 2 insertions(+), 8 deletions(-) diff --git

Re: [PATCH] nfs: cover ->migratepage with CONFIG_MIGRATION

2016-09-19 Thread Chao Yu
On 2016/9/20 20:51, kbuild test robot wrote: >>> fs/nfs/file.c:547:17: error: 'nfs_migrate_page' undeclared here (not in a >>> function) > .migratepage = nfs_migrate_page, Oops :(, sorry for my mistake, let me fix this. Thanks,

[PATCH v2] nfs: cover ->migratepage with CONFIG_MIGRATION

2016-09-19 Thread Chao Yu
It will be more clean to use CONFIG_MIGRATION to cover nfs' private .migratepage in nfs_file_aops like we do in other part of nfs operations. Signed-off-by: Chao Yu --- fs/nfs/file.c | 2 ++ fs/nfs/internal.h | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/f

Re: [f2fs-dev] [PATCH 1/2] f2fs: use crc and cp version to determine roll-forward recovery

2016-09-20 Thread Chao Yu
Hi Jaegeuk, On 2016/9/20 10:55, Jaegeuk Kim wrote: > Previously, we used cp_version only to detect recoverable dnodes. > In order to avoid same garbage cp_version, we needed to truncate the next > dnode during checkpoint, resulting in additional discard or data write. > If we can distinguish this

Re: [f2fs-dev] [PATCH 1/4] f2fs: assign return value in f2fs_gc

2016-09-22 Thread Chao Yu
On 2016/9/22 11:54, Jaegeuk Kim wrote: > This patch adds a return value of write_checkpoint for f2fs_gc. > > Signed-off-by: Jaegeuk Kim Please add this in all patches of this serials. Reviewed-by: Chao Yu

[PATCH 1/3] f2fs: adjust display format of segment bit

2016-09-22 Thread Chao Yu
: 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 e7bb153..6426855 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -954,7 +954,7 @@ static int segment_bits_seq_show(struct seq_file *seq, void *offset

[PATCH 3/3] f2fs: fix potential deadlock when hitting checkpoint error

2016-09-22 Thread Chao Yu
ode when wait that page being writebacked. So giving a chance to do committing in sync_node_pages for fixing. Signed-off-by: Chao Yu --- fs/f2fs/node.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 55c22a9..c2d953e 100644

[PATCH 2/3] f2fs: support checkpoint error injection

2016-09-22 Thread Chao Yu
This patch adds to support checkpoint error injection in f2fs for testing fatal error tolerance. Signed-off-by: Chao Yu --- fs/f2fs/f2fs.h | 7 +++ fs/f2fs/super.c | 1 + 2 files changed, 8 insertions(+) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index e216bc0..3c513fe 100644 --- a/fs

[PATCH] f2fs: support configuring fault injection per superblock

2016-09-23 Thread Chao Yu
From: Chao Yu Previously, we only support global fault injection configuration, so that when we configure type/rate of fault injection through sysfs, mount option, it will influence all f2fs partition which is being used. It is not make sence, since it will be not convenient if developer want

Re: [PATCH 2/3] f2fs: support checkpoint error injection

2016-09-23 Thread Chao Yu
urs missing dentry blocks in a valid checkpoint. Yes, that's right. How about triggering checkpoint error in f2fs_stop_checkpoint? >From 7bedfe9a0e97c4deead1c7cdbfc24187f5080268 Mon Sep 17 00:00:00 2001 From: Chao Yu Date: Fri, 23 Sep 2016 06:59:04 +0800 Subject: [PATCH] f2fs: support

Re: [PATCH] f2fs: remove dirty inode pages in error path

2016-09-23 Thread Chao Yu
On 2016/9/24 5:11, Jaegeuk Kim wrote: > When getting EIO while handling orphan inodes, we can get some dirty node > pages. Then, f2fs_write_node_pages() called by iput(node_inode) will try > to flush node pages. But in this case, we should prevent to do that, since > we will try again from the star

Re: [PATCH 2/3] f2fs: support checkpoint error injection

2016-09-23 Thread Chao Yu
On 2016/9/24 8:52, Jaegeuk Kim wrote: > On Sat, Sep 24, 2016 at 08:46:54AM +0800, Chao Yu wrote: >> Hi Jaegeuk, >> >> On 2016/9/24 7:53, Jaegeuk Kim wrote: >>> Hi Chao, >>> >>> The basic rule is to stop every operations once CP_ERROR_FLAG is set. >

Re: [f2fs-dev] [PATCH 1/2] f2fs: use crc and cp version to determine roll-forward recovery

2016-09-23 Thread Chao Yu
On 2016/9/21 8:45, Jaegeuk Kim wrote: > @@ -259,40 +290,26 @@ static inline void fill_node_footer_blkaddr(struct page > *page, block_t blkaddr) > { > struct f2fs_checkpoint *ckpt = F2FS_CKPT(F2FS_P_SB(page)); > struct f2fs_node *rn = F2FS_NODE(page); > + size_t crc_offset = le32_t

Re: [PATCH] f2fs: remove dirty inode pages in error path

2016-09-25 Thread Chao Yu
On 2016/9/25 1:47, Jaegeuk Kim wrote: > On Sat, Sep 24, 2016 at 09:02:02AM +0800, Chao Yu wrote: >> On 2016/9/24 5:11, Jaegeuk Kim wrote: >>> When getting EIO while handling orphan inodes, we can get some dirty node >>> pages. Then, f2fs_write_node_pages() called b

Re: [PATCH 2/3] f2fs: support checkpoint error injection

2016-09-25 Thread Chao Yu
On 2016/9/25 2:10, Jaegeuk Kim wrote: > On Sat, Sep 24, 2016 at 11:32:08AM +0800, Chao Yu wrote: >> On 2016/9/24 8:52, Jaegeuk Kim wrote: >>> On Sat, Sep 24, 2016 at 08:46:54AM +0800, Chao Yu wrote: >>>> Hi Jaegeuk, >>>> >>>> On 2016/9/24 7

[PATCH 2/2] f2fs: fix to recover old fault injection config in ->remount_fs

2016-09-26 Thread Chao Yu
In ->remount_fs, we didn't recover original fault injection config if we encounter error, fix it. Signed-off-by: Chao Yu --- fs/f2fs/super.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index aa35e60..6132b4c 100644 --- a/fs/f2fs/super.c

[PATCH v2] f2fs: support checkpoint error injection

2016-09-26 Thread Chao Yu
This patch adds to support checkpoint error injection in f2fs for testing fatal error tolerance, it will be useful that it can simulate abnormal power off by f2fs itself instead of calling godown ioctl by running apps. Signed-off-by: Chao Yu --- fs/f2fs/f2fs.h| 1 + fs/f2fs/gc.c | 5

[PATCH 1/2] f2fs: do fault injection initialization in default_options

2016-09-26 Thread Chao Yu
Do fault injection initialization in default_options to keep consistent with other default option configurating. Signed-off-by: Chao Yu --- fs/f2fs/super.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 4d5911b..aa35e60 100644

[PATCH 1/2] f2fs: fix to commit bio cache after flushing node pages

2016-09-26 Thread Chao Yu
From: Chao Yu In sync_node_pages, we won't check and commit last merged pages in private bio cache of f2fs, as these pages were taged as writeback, someone who is waiting for writebacking of the page will be blocked until the cache was committed by someone else. We need to commit node typ

[PATCH 2/2] f2fs: remove redundant io plug

2016-09-26 Thread Chao Yu
From: Chao Yu Signed-off-by: Chao Yu --- fs/f2fs/checkpoint.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index a655d75..de8693c 100644 --- a/fs/f2fs/checkpoint.c +++ b/fs/f2fs/checkpoint.c @@ -267,7 +267,6 @@ static int

Re: [PATCH 1/2] f2fs: fix to commit bio cache after flushing node pages

2016-09-26 Thread Chao Yu
Hi Jaegeuk, On 2016/9/27 2:33, Jaegeuk Kim wrote: > Hi Chao, > > On Tue, Sep 27, 2016 at 12:09:52AM +0800, Chao Yu wrote: >> From: Chao Yu >> >> In sync_node_pages, we won't check and commit last merged pages in private >> bio cache of f2fs, as these page

Re: [PATCH 1/2] f2fs: fix to commit bio cache after flushing node pages

2016-09-26 Thread Chao Yu
On 2016/9/27 9:39, Jaegeuk Kim wrote: > On Tue, Sep 27, 2016 at 08:57:41AM +0800, Chao Yu wrote: >> Hi Jaegeuk, >> >> On 2016/9/27 2:33, Jaegeuk Kim wrote: >>> Hi Chao, >>> >>> On Tue, Sep 27, 2016 at 12:09:52AM +0800, Chao Yu wrote: >>>>

Re: [f2fs-dev] [PATCH v2] f2fs: introduce get_checkpoint_version for cleanup

2016-09-27 Thread Chao Yu
On 2016/9/27 10:05, Tiezhu Yang wrote: > There exists almost same codes when get the value of pre_version > and cur_version in function validate_checkpoint, this patch adds > get_checkpoint_version to clean up redundant codes. > > Signed-off-by: Tiezhu Yang > --- > fs/f2fs/checkpoint.c | 63 > +

Re: [f2fs-dev] [PATCH] f2fs: check free_sections for defragmentation

2016-09-07 Thread Chao Yu
Hi Jaegeuk, On 2016/9/2 4:46, Jaegeuk Kim wrote: > Fix wrong condition check for defragmentation of a file. > > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/file.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c > index 37c24be..a8aa6fd 10

Re: [f2fs-dev] [PATCH] f2fs: merge WRITE bio into previous WRITE_SYNC

2016-09-07 Thread Chao Yu
On 2016/9/3 2:36, Jaegeuk Kim wrote: > On Fri, Sep 02, 2016 at 03:33:33PM +0800, Chao Yu wrote: >> Hi Jaegeuk, >> >> On 2016/8/27 8:53, Jaegeuk Kim wrote: >>> This can avoid bio splits due to different op_flags. >> >> I thought about this, but I think t

Re: [PATCH] MAINTAINERS: update my maintainership status of f2fs

2016-09-07 Thread Chao Yu
Sorry, +Cc f2fs & kernel mailing list. On 2016/9/8 10:27, Chao Yu wrote: > Update my maintainership of f2fs to maintainer instead of reviewer. > > Signed-off-by: Chao Yu > --- > MAINTAINERS | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [f2fs-dev] [PATCH] f2fs: check free_sections for defragmentation

2016-09-08 Thread Chao Yu
: [PATCH] f2fs: check free_sections for defragmentation > > Fix wrong condition check for defragmentation of a file. > > Signed-off-by: Jaegeuk Kim Reviewed-by: Chao Yu

Re: [f2fs-dev] [PATCH] f2fs: merge WRITE bio into previous WRITE_SYNC

2016-09-08 Thread Chao Yu
On 2016/9/8 8:26, Jaegeuk Kim wrote: > On Wed, Sep 07, 2016 at 10:12:17PM +0800, Chao Yu wrote: >> On 2016/9/3 2:36, Jaegeuk Kim wrote: >>> On Fri, Sep 02, 2016 at 03:33:33PM +0800, Chao Yu wrote: >>>> Hi Jaegeuk, >>>> >>>> On 2016/8/27 8:53,

[PATCH v2] MAINTAINERS: update f2fs entry

2016-09-08 Thread Chao Yu
This patch includes below modifications: 1. change my maintainership from reviewer to maintainer. 2. remove maintainership of Changman Lee since he is not active about one and a half year. 3. change website of f2fs from wiki to kernel one. Signed-off-by: Chao Yu --- v2: gather more modification

[PATCH v3] f2fs: fix to set superblock dirty correctly

2016-08-30 Thread Chao Yu
kpoint and f2fs_write_node_page. Signed-off-by: Chao Yu --- fs/f2fs/checkpoint.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 727e97e..b80dd37 100644 --- a/fs/f2fs/checkpoint.c +++ b/fs/f2fs/checkpoint.c @@ -1154,6 +1154,16 @@

Re: [PATCH] f2fs: merge WRITE bio into previous WRITE_SYNC

2016-09-02 Thread Chao Yu
Hi Jaegeuk, On 2016/8/27 8:53, Jaegeuk Kim wrote: > This can avoid bio splits due to different op_flags. I thought about this, but I think this is not a good idea to increase merging ratio of pages in bio. It breaks the rule of SYNC/ASYNC IO defined by system which indicate degree of IO emergency

Re: [PATCH] f2fs: do not use discard_map for non-discard case

2016-08-05 Thread Chao Yu
Hi Jaegeuk, On 2016/8/5 3:04, Jaegeuk Kim wrote: > We don't need to keep discard_map, if f2fs has no discard mount option. In trim_fs path, we will still use discard_map though, right? Thanks, > > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/f2fs.h| 2 ++ > fs/f2fs/segment.c | 87 > +

[PATCH 1/2] f2fs: clean up bio cache trace

2016-08-06 Thread Chao Yu
From: Chao Yu Trace info related to bio cache operation is out of format, clean up it. Before: <...>-28308 [002] 4781.052703: f2fs_submit_write_bio: dev = (251,1), WRITEWRITE_SYNC ^H, DATA, sector = 271424, size = 126976 <...>-28308 [002]

[PATCH 2/2] Revert "f2fs: move i_size_write in f2fs_write_end"

2016-08-06 Thread Chao Yu
From: Chao Yu This reverts commit a2ee0a300344a6da76186129b078113354fe13d2. When testing with generic/032 of xfstest suit, failure message will be reported as below: generic/032 8s ... [failed, exit status 1] - output mismatch (see results/generic/032.out.bad) --- tests/generic/032.out

Re: [PATCH 2/3] f2fs: schedule in between two continous batch discards

2016-08-25 Thread Chao Yu
Hi Jaegeuk, On 2016/8/24 0:53, Jaegeuk Kim wrote: > Hi Chao, > > On Sun, Aug 21, 2016 at 11:21:30PM +0800, Chao Yu wrote: >> From: Chao Yu >> >> In batch discard approach of fstrim will grab/release gc_mutex lock >> repeatly, it makes contention of the lock

Re: [PATCH 5/6] f2fs: enable inline_dentry by default

2016-08-25 Thread Chao Yu
Hi Jaegeuk, On 2016/8/24 0:57, Jaegeuk Kim wrote: > Hi Chao, > > On Mon, Aug 22, 2016 at 09:49:13AM +0800, Chao Yu wrote: >> Hi Jaegeuk, >> >> On 2016/5/10 7:04, Jaegeuk Kim wrote: >>> On Mon, May 09, 2016 at 07:56:34PM +0800, Chao Yu wrote: >>>&g

Re: [PATCH 1/2] f2fs: fix to preallocate block only aligned to 4K

2016-08-25 Thread Chao Yu
Hi Jaegeuk, On 2016/8/24 7:19, Jaegeuk Kim wrote: > Hi Chao, > > There is a bug when ki_pos = 1024, and iov_iter_count(from) = 1024 in > xfstests. > Could you check the below patch to fix your one? Oh, you're right, thanks for fixing it. :) Thanks, > > --- > fs/f2fs/data.c | 11 +--

Re: [f2fs-dev] [PATCH] f2fs: fix a bug when using namehash to locate dentry bucket

2016-08-25 Thread Chao Yu
fname->disk_name. Because in such case, > fname->disk_name is empty. Your signiture is missing here. Anyway that's a good catch! Acked-by: Chao Yu > --- > fs/f2fs/dir.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/fs/f2fs/dir.c b/fs/

Re: [f2fs-dev] [PATCH -next] f2fs: fix non static symbol warning

2016-08-25 Thread Chao Yu
On 2016/8/23 23:23, Wei Yongjun wrote: > From: Wei Yongjun > > Fixes the following sparse warning: > > fs/f2fs/data.c:969:12: warning: > symbol 'f2fs_grab_bio' was not declared. Should it be static? > > Signed-off-by: Wei Yongjun Acked-by: Chao Yu

Re: [PATCH 2/3] f2fs: schedule in between two continous batch discards

2016-08-25 Thread Chao Yu
Hi Jaegeuk, On 2016/8/26 0:57, Jaegeuk Kim wrote: > Hi Chao, > > On Thu, Aug 25, 2016 at 05:22:29PM +0800, Chao Yu wrote: >> Hi Jaegeuk, >> >> On 2016/8/24 0:53, Jaegeuk Kim wrote: >>> Hi Chao, >>> >>> On Sun, Aug 21, 2016 at 11:21:30PM

[PATCH] f2fs: add noinline_dentry mount option

2016-08-25 Thread Chao Yu
This patch adds noinline_dentry mount option. Signed-off-by: Chao Yu --- Documentation/filesystems/f2fs.txt | 1 + fs/f2fs/super.c| 7 +++ 2 files changed, 8 insertions(+) diff --git a/Documentation/filesystems/f2fs.txt b/Documentation/filesystems/f2fs.txt index

[PATCH] f2fs: fix to set superblock dirty correctly

2016-08-26 Thread Chao Yu
From: Chao Yu tests/generic/251 of fstest suit complains us with below message: [ cut here ] invalid opcode: [#1] PREEMPT SMP CPU: 2 PID: 7698 Comm: fstrim Tainted: G O4.7.0+ #21 task: e9f4e000 task.stack: e7262000 EIP: 0060:[] EFLAGS: 00010202 CPU: 2

[PATCH 2/2] f2fs: fix to update node page under cp_rwsem

2016-08-26 Thread Chao Yu
From: Chao Yu Update node page under cp_rwsem in order to keep data consistency during writting checkpoint. Signed-off-by: Chao Yu --- fs/f2fs/inode.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index 9ac5efc..1057c73 100644 --- a

[PATCH 1/2] f2fs: do in batch synchronously readahead during GC

2016-08-26 Thread Chao Yu
From: Chao Yu In order to enhance performance, we try to readahead node page during GC, but before loading node page we should get block address of node page which is stored in NAT table, so synchronously read of single NAT page block our readahead flow. f2fs_submit_page_bio: dev = (251,0), ino

[PATCH] f2fs: trigger normal fsync for non-atomic_write file

2017-08-18 Thread Chao Yu
If file was not opened with atomic write mode, but user uses atomic write ioctl to fsync datas, in the flow, we should not fsync that file with atomic write mode. Fixes: 608514deba38 ("f2fs: set fsync mark only for the last dnode") Signed-off-by: Chao Yu --- fs/f2fs/file.c | 2

Re: [PATCH v2] f2fs: introduce cur_reserved_blocks in sysfs

2017-08-18 Thread Chao Yu
o extend reserved_blocks sysfs interface to be soft threshold, which allows user configure it exceeding current available user space. Signed-off-by: Yunlong Song Signed-off-by: Chao Yu --- Documentation/ABI/testing/sysfs-fs-f2fs | 3 ++- fs/f2fs/f2fs.h | 12

Re: [PATCH v4 1/1] f2fs: dax: implement direct access

2017-06-21 Thread Chao Yu
Hi Qiuyang As I tested with pmem, this patch will corrupt f2fs image with generic/051 of fstest suit. Could you please take a look at this issue? Thanks, On 2017/6/15 16:56, sunqiuyang wrote: > From: Qiuyang Sun > > This patch implements Direct Access (DAX) in F2FS. > > Signed-off-by: Qiuyan

Re: [PATCH] f2fs: return error number for quota_write

2017-10-15 Thread Chao Yu
Hi Jaegeuk, On 2017/10/13 7:15, Jaegeuk Kim wrote: > This patch returns an error number to quota_write in order for quota to handle > it correctly. We should return error number like __generic_file_write_iter, right? it needs to return written bytes if we have written one page or more, otherwise

Re: [f2fs-dev] [PATCH] f2fs: avoid stale fi->gdirty_list pointer

2017-10-15 Thread Chao Yu
On 2017/10/13 10:14, Jaegeuk Kim wrote: > When doing fault injection test, f2fs_evict_inode() didn't remove gdirty_list > which incurs a kernel panic due to wrong pointer access. > > Signed-off-by: Jaegeuk Kim Reviewed-by: Chao Yu Minor thing, how about reverting judgm

Re: [PATCH] f2fs: expose some sectors to user in inline data or dentry case

2017-10-15 Thread Chao Yu
On 2017/10/14 1:31, Jaegeuk Kim wrote: > If there's some data written through inline data or dentry, we need to shouw > st_blocks. This fixes reporting zero blocks even though there is small written > data. > > Signed-off-by: Jaegeuk Kim Reviewed-by: Chao Yu Thanks, >

Re: [f2fs-dev] [PATCH v2] f2fs: add bug_on when f2fs_gc even fails to get one victim

2017-10-15 Thread Chao Yu
CR4: 001406e0 Call Trace: f2fs_balance_fs+0x123/0x140 [f2fs] f2fs_create+0x130/0x240 [f2fs] path_openat+0xee7/0x1360 do_filp_open+0x7e/0xd0 do_sys_open+0x115/0x1f0 SyS_open+0x1e/0x20 do_syscall_64+0x6e/0x160 entry_SYSCALL64_slow_path+0x25/0x25 Thanks, > > On 2017/10/14 8:17, Chao Yu wro

Re: [f2fs-dev] [PATCH v2] f2fs: update dirty status for CURSEG as well

2017-10-15 Thread Chao Yu
ep the original order: 1. update sit info 2. allocate new segment 3. update dirty status of segment Thanks, > > On 2017/10/14 8:14, Chao Yu wrote: >> On 2017/10/13 21:21, Yunlong Song wrote: >>> Without this patch, it will cause all the free segments using up in some >>&

[PATCH v2 1/5] f2fs: trace f2fs_lookup

2017-10-17 Thread Chao Yu
This patch adds trace for f2fs_lookup. Signed-off-by: Chao Yu --- v2: - fix warning reported by 0-day project. - report error of d_splice_alias in trace_f2fs_lookup_end. fs/f2fs/namei.c | 49 +-- include/trace/events/f2fs.h | 56

Re: [f2fs-dev] [PATCH] f2fs: return error number for quota_write

2017-10-17 Thread Chao Yu
On 2017/10/17 7:04, Jaegeuk Kim wrote: > On 10/16, Chao Yu wrote: >> Hi Jaegeuk, >> >> On 2017/10/13 7:15, Jaegeuk Kim wrote: >>> This patch returns an error number to quota_write in order for quota to >>> handle >>> it cor

Re: [f2fs-dev] [PATCH] f2fs: avoid stale fi->gdirty_list pointer

2017-10-17 Thread Chao Yu
On 2017/10/17 7:06, Jaegeuk Kim wrote: > On 10/16, Chao Yu wrote: >> On 2017/10/13 10:14, Jaegeuk Kim wrote: >>> When doing fault injection test, f2fs_evict_inode() didn't remove >>> gdirty_list >>> which incurs a kernel panic due to wrong pointer a

Re: [f2fs-dev] [PATCH] f2fs: handle error case when adding xattr entry

2017-10-17 Thread Chao Yu
e); > - f2fs_put_page(page, 1); > > + f2fs_wait_on_page_writeback(ipage ? ipage : in_page, > + NODE, true); > /* no need to use xattr node block */ > if (hsize <= inline_size) { >

Re: [f2fs-dev] [PATCH] f2fs: use extra parenthesis around assignment/condition

2017-10-17 Thread Chao Yu
t.c:321:9: error: suggest parentheses around assignment used > as truth value [-Werror=parentheses] > while (nr_pages = pagevec_lookup_tag(&pvec, mapping, &index, > > This seems reasonable, so let's do that. > > Fixes: 4aba7297f4a5 ("f2fs: simplify page iteration

[PATCH] f2fs: fix to correct no_fggc_candidate

2017-10-17 Thread Chao Yu
From: Chao Yu There may be extreme case as below: For one section contains one segment, and there are total 100 segments with 10% over-privision ratio in f2fs partition, fggc_threshold will be rounded down to 460 instead of 460.8 as below caclulation: sbi->fggc_threshold = div_u64((

Re: [f2fs-dev] [PATCH] f2fs: handle error case when adding xattr entry

2017-10-17 Thread Chao Yu
On 2017/10/18 0:41, Jaegeuk Kim wrote: > On 10/17, Chao Yu wrote: >> On 2017/10/17 7:06, Jaegeuk Kim wrote: >>> This patch fixes recovering incomplete xattr entries remaining in inline >>> xattr >>> and xattr block, caused by any kind of errors. >>> &g

Re: [f2fs-dev] [PATCH] f2fs: return error number for quota_write

2017-10-17 Thread Chao Yu
On 2017/10/18 2:17, Jaegeuk Kim wrote: > On 10/17, Chao Yu wrote: >> >> >> On 2017/10/17 7:04, Jaegeuk Kim wrote: >>> On 10/16, Chao Yu wrote: >>>> Hi Jaegeuk, >>>> >>>> On 2017/10/13 7:15, Jaegeuk Kim wrote: >>>

Re: [f2fs-dev] [PATCH] f2fs: modify the procedure of scan free nid

2017-10-31 Thread Chao Yu
On 2017/10/31 21:37, Fan Li wrote: > In current version, we preserve 8 pages of nat blocks as free nids, > build bitmaps for it and use them to allocate nids until its number > drops below NAT_ENTRY_PER_BLOCK. > > After that, we have a problem, scan_free_nid_bits will scan the same > 8 pages tryin

Re: [PATCH] f2fs: don't bother with inode->i_version

2017-10-31 Thread Chao Yu
Signed-off-by: Jeff Layton Reviewed-by: Chao Yu Thanks, > --- > fs/f2fs/super.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c > index 933c3d529e65..b3359158e7be 100644 > --- a/fs/f2fs/super.c > +++ b/fs/f2fs/super.c > @@ -

Re: [f2fs-dev] [PATCH] f2fs: modify the procedure of scan free nid

2017-11-01 Thread Chao Yu
On 2017/11/1 18:03, Fan Li wrote: > > >> -Original Message----- >> From: Chao Yu [mailto:c...@kernel.org] >> Sent: Tuesday, October 31, 2017 10:32 PM >> To: Fan Li; 'Jaegeuk Kim' >> Cc: linux-kernel@vger.kernel.org; linux-f2fs-de...@lists.sou

[PATCH 2/4] f2fs: remove dead code in update_meta_page

2017-11-02 Thread Chao Yu
After commit a468f0ef516f ("f2fs: use crc and cp version to determine roll-forward recovery"), last caller of update_meta_page passing @src with NULL is gone, so remove related dead code there. Signed-off-by: Chao Yu --- fs/f2fs/segment.c | 6 +- 1 file changed, 1 insertion(+), 5

[PATCH 3/4] f2fs: fix summary info corruption

2017-11-02 Thread Chao Yu
etween __f2fs_replace_block and change_curseg. Signed-off-by: Chao Yu --- fs/f2fs/f2fs.h| 2 ++ fs/f2fs/segment.c | 28 +++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index e1d3a940d9f8..4109489afa14 100644 --- a/fs/f2fs/f2fs.h +++ b/f

[PATCH 1/4] f2fs: remove unneeded semicolon

2017-11-02 Thread Chao Yu
Signed-off-by: Chao Yu --- fs/f2fs/checkpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 78e1b2998bbd..98777c1ae70c 100644 --- a/fs/f2fs/checkpoint.c +++ b/fs/f2fs/checkpoint.c @@ -1016,7 +1016,7 @@ int

[PATCH 4/4] f2fs: avoid race in between GC and block exchange

2017-11-02 Thread Chao Yu
that. Signed-off-by: Chao Yu --- fs/f2fs/file.c | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 0e09b9f02dc5..21ae4faa7c58 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -1186,6 +1186,9 @@ static int

Re: [f2fs-dev] [PATCH] f2fs: modify the procedure of scan free nid

2017-11-02 Thread Chao Yu
On 2017/11/2 10:38, Fan Li wrote: > > >> -Original Message----- >> From: Chao Yu [mailto:c...@kernel.org] >> Sent: Wednesday, November 01, 2017 8:47 PM >> To: Fan Li; 'Jaegeuk Kim' >> Cc: linux-kernel@vger.kernel.org; linux-f2fs-de...@lists.sou

Re: [f2fs-dev] [PATCH] f2fs: save a multiplication for last_nid calculation

2017-11-02 Thread Chao Yu
On 2017/11/2 11:02, Fan Li wrote: > Use a slightly easier way to calculate last_nid. > > Signed-off-by: Fan li Reviewed-by: Chao Yu Thanks, > --- > fs/f2fs/node.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/f2fs/node.c b/fs/f2f

Re: [f2fs-dev] [PATCH 1/2] f2fs: add quota_ino feature infra

2017-11-02 Thread Chao Yu
On 2017/10/31 11:40, Jaegeuk Kim wrote: > This patch adds quota_ino feature infra to be used for quota files. > > Signed-off-by: Jaegeuk Kim Reviewed-by: Chao Yu > --- > fs/f2fs/f2fs.h | 6 ++ > fs/f2fs/sysfs.c | 7 +++ > include/linux/f2fs_fs.h

Re: [f2fs-dev] [PATCH 2/2] f2fs: support quota sys files

2017-11-02 Thread Chao Yu
) Why not just use F2FS_MAX_QUOTAS instead of F2FS_QUOTA_INO? since in patch 1/2 we have defined qf_ino array with upper-boundary F2FS_MAX_QUOTAS. __le32 qf_ino[F2FS_MAX_QUOTAS]; /* quota inode numbers */ Other part looks good to me. ;) Reviewed-by: Chao Yu Thanks, > +

Re: [PATCH 1/2] f2fs: add missing quota_initialize in f2fs_set_acl

2017-10-24 Thread Chao Yu
On 2017/10/24 6:14, Jaegeuk Kim wrote: > This patch adds to call quota_intialize in f2fs_set_acl. > > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/acl.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/fs/f2fs/acl.c b/fs/f2fs/acl.c > index 436b3a1464d9..f6471f9d707e 100644 > --- a/fs/

Re: [PATCH] f2fs: show # of dirty segments via sysfs

2017-10-24 Thread Chao Yu
On 2017/10/24 16:36, Jaegeuk Kim wrote: > This patch adds one sysfs entry to show # of dirty segments which can be > used for gc timing by user. > > Signed-off-by: Jaegeuk Kim Reviewed-by: Chao Yu Thanks, > --- > fs/f2fs/sysfs.c | 9 + > 1 file changed, 9 in

Re: [f2fs-dev] [PATCH 2/2] f2fs: stop all the operations by cp_error flag

2017-10-24 Thread Chao Yu
On 2017/10/24 6:14, Jaegeuk Kim wrote: > This patch replaces to use cp_error flag instead of RDONLY for quota off. > > Signed-off-by: Jaegeuk Kim Reviewed-by: Chao Yu Thanks, > --- > fs/f2fs/acl.c| 3 +++ > fs/f2fs/checkpoint.c | 1 - > fs/f

Re: [PATCH v2 6/6] f2fs: give up CP_TRIMMED_FLAG if it drops discards

2017-10-24 Thread Chao Yu
On 2017/10/24 20:46, Jaegeuk Kim wrote: > On 10/24, Chao Yu wrote: >> Hi Jaegeuk, >> >> On 2017/10/4 9:08, Chao Yu wrote: >>> From: Chao Yu >>> >>> In ->umount, once we drop remained discard entries, we should not >>> set CP_TRIMMED_

Re: [PATCH v2 6/6] f2fs: give up CP_TRIMMED_FLAG if it drops discards

2017-10-24 Thread Chao Yu
On 2017/10/25 13:45, Jaegeuk Kim wrote: > On 10/24, Chao Yu wrote: >> On 2017/10/24 20:46, Jaegeuk Kim wrote: >>> On 10/24, Chao Yu wrote: >>>> Hi Jaegeuk, >>>> >>>> On 2017/10/4 9:08, Chao Yu wrote: >>>>> From: Chao Yu >>

Re: [PATCH 1/2] f2fs: add missing quota_initialize in f2fs_set_acl

2017-10-24 Thread Chao Yu
On 2017/10/25 13:44, Jaegeuk Kim wrote: > On 10/24, Chao Yu wrote: >> On 2017/10/24 6:14, Jaegeuk Kim wrote: >>> This patch adds to call quota_intialize in f2fs_set_acl. >>> >>> Signed-off-by: Jaegeuk Kim >>> --- >>> fs/f2fs/acl.c | 4 &

[PATCH] f2fs: fix to keep backward compatibility of flexible inline xattr feature

2017-10-25 Thread Chao Yu
regular and symlink inode, it will be safe to reuse resevered space as they are all zero, but for directory, we need to keep the reservation for stablizing directory structure. Reported-by: Sheng Yong Signed-off-by: Chao Yu --- fs/f2fs/f2fs.h | 5 + fs/f2fs/inode.c | 15 --- fs

  1   2   3   4   5   6   7   8   9   10   >