[f2fs-dev] [PATCH] fsck: check inline_dentry i_addr[0] same as inline_data

2017-11-02 Thread Yunlei He
<4>[ 30.222442s][pid:1,cpu4,init][] f2fs_evict_inode+0x850/0xa34 <4>[ 30.222442s][pid:1,cpu4,init][] evict+0xa0/0x168 <4>[ 30.222442s][pid:1,cpu4,init][] iput+0x188/0x220 <4>[ 30.222473s][pid:1,cpu4,init][] recover_orphan_inodes+0x2b4/0xa80 <4>[ 30.222473s][pid:1,cpu4,init][] f2fs_fill

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

2017-11-02 Thread Chao Yu
On 2017/11/3 11:37, Jaegeuk Kim wrote: > On 11/02, Chao Yu wrote: >> On 2017/10/31 11:40, Jaegeuk Kim wrote: >>> This patch supports hidden quota files in the system, which will be used for >>> Android. It requires up-to-date f2fs-tools later than v1.9.0. >>> >>> Signed-off-by: Jaegeuk Kim >>> ---

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

2017-11-02 Thread Jaegeuk Kim
On 11/02, Chao Yu wrote: > On 2017/10/31 11:40, Jaegeuk Kim wrote: > > This patch supports hidden quota files in the system, which will be used for > > Android. It requires up-to-date f2fs-tools later than v1.9.0. > > > > Signed-off-by: Jaegeuk Kim > > --- > > fs/f2fs/checkpoint.c | 9 +++- > >

Re: [f2fs-dev] [PATCH v2] f2fs: fix out-of-free problem caused by atomic write

2017-11-02 Thread Jaegeuk Kim
On 10/30, Yunlong Song wrote: > f2fs_balance_fs only actives once in the commit_inmem_pages, but there > are more than one page to commit, so all the other pages will miss the > check. This will lead to out-of-free problem when commit a very large > file. However, we cannot do f2fs_balance_fs for e

Re: [f2fs-dev] [PATCH v2] f2fs: fix out-of-free problem caused by atomic write

2017-11-02 Thread Yunlong Song
Because I found that it will still lead to out-of-free problem with out that check. I trace and find that it is possible that the committing date pages of the atomic file is bigger than the sbi->user_block_count - valid_user_blocks(sbi), so I add this check. On 2017/11/3 11:46, Jaegeuk Kim wro

Re: [f2fs-dev] [PATCH v2] f2fs: fix out-of-free problem caused by atomic write

2017-11-02 Thread Yunlong Song
ping... On 2017/10/30 21:04, Yunlong Song wrote: f2fs_balance_fs only actives once in the commit_inmem_pages, but there are more than one page to commit, so all the other pages will miss the check. This will lead to out-of-free problem when commit a very large file. However, we cannot do f2fs_ba

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

2017-11-02 Thread Yunlong Song
ping... On 2017/10/13 21:31, Yunlong Song wrote: This can help us to debug on some corner case. Signed-off-by: Yunlong Song Signed-off-by: Chao Yu --- fs/f2fs/gc.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 197ebf4..2b03202 10

Re: [f2fs-dev] [RFC PATCH v2 3/9] dump/fsck: introduce print_xattr_entry

2017-11-02 Thread Jaegeuk Kim
Hi Sheng, This triggers: mount.c:14:29: fatal error: linux/posix_acl.h: No such file or directory Thanks, On 11/02, Sheng Yong wrote: > This patch exports read_all_xattrs to allow dump/fsck to get all xattrs, > and introduces print_xattr_entry which tries to parse an xattr entry > accroding to

[f2fs-dev] [PATCH] mkfs.f2fs: set .so to cold files

2017-11-02 Thread Jaegeuk Kim
This patch adds .so in cold file extention list. Signed-off-by: Jaegeuk Kim --- mkfs/f2fs_format.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c index 2103f9d..2ba8dd3 100644 --- a/mkfs/f2fs_format.c +++ b/mkfs/f2fs_format.c @@ -62,6 +62,7 @@ const c

[f2fs-dev] [PATCH v5] dump/fsck: introduce print_xattr_entry

2017-11-02 Thread Sheng Yong
This patch exports read_all_xattrs to allow dump/fsck to get all xattrs, and introduces print_xattr_entry which tries to parse an xattr entry accroding to its xattr index. Signed-off-by: Sheng Yong --- v3->v5: Please ignore the previous [PATCH v3/v4] because of the bad indent (some configure of m

[f2fs-dev] [PATCH] f2fs-tools: fix warnings when building in android

2017-11-02 Thread Jaegeuk Kim
From: Jaegeuk Kim This patch tries to avoid all the warnings. Signed-off-by: Jaegeuk Kim --- fsck/dir.c | 28 +--- fsck/fsck.h| 4 ++-- fsck/node.c| 2 +- fsck/segment.c | 10 +- 4 files changed, 25 insertions(+), 19 deletions(-) diff --git a/fsck

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

2017-11-02 Thread Jaegeuk Kim
On 10/13, Yunlong Song wrote: > This can help us to debug on some corner case. > > Signed-off-by: Yunlong Song > Signed-off-by: Chao Yu > --- > fs/f2fs/gc.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c > index 197ebf4..2b03202 100644

[f2fs-dev] [PATCH v4] dump/fsck: introduce print_xattr_entry

2017-11-02 Thread Sheng Yong
This patch exports read_all_xattrs to allow dump/fsck to get all xattrs, and introduces print_xattr_entry which tries to parse an xattr entry accroding to its xattr index. Signed-off-by: Sheng Yong --- v3->v4: Please ignore the previous [PATCH v3] because of the bad indent. Sorry for the noise :

[f2fs-dev] [PATCH v3] dump/fsck: introduce print_xattr_entry

2017-11-02 Thread Sheng Yong
This patch exports read_all_xattrs to allow dump/fsck to get all xattrs, and introduces print_xattr_entry which tries to parse an xattr entry accroding to its xattr index. Signed-off-by: Sheng Yong --- v2->v3: check if is supported. If it is not, print ACL value in hex format. configure.ac |

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

2017-11-02 Thread Chao Yu
During block exchange in {insert,collapse,move}_range, page-block mapping is unstable due to mapping moving or recovery, so there should be no concurrent cache read operation rely on such mapping, nor cache write operation to mess up block exchange. So this patch let background GC be aware of that

Re: [f2fs-dev] [RFC PATCH v2 0/9] f2fs-tools: fix fix_on usage and introduce dump/print xattr

2017-11-02 Thread Chao Yu
On 2017/11/2 11:56, Sheng Yong wrote: > v1-v2: > [PATCH 3] print values of USER/SECRUITY xattr as hex instead of plain text. > [PATCH 4] replace xattr value if it already exists by setting parameter > `flags' as 0 of fsetxattr. > [PATCH 1/7] move message printing modification into a diffe

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

2017-11-02 Thread Chao Yu
On 2017/10/31 11:40, Jaegeuk Kim wrote: > This patch supports hidden quota files in the system, which will be used for > Android. It requires up-to-date f2fs-tools later than v1.9.0. > > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/checkpoint.c | 9 +++- > fs/f2fs/f2fs.h | 9 +++- > fs/f

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 | 6 +- > 3 files

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/f2fs/node.c > index 7834097..55ab33

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-ker...@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net >> Subject: Re: [f2fs-dev] [PATCH] f

[f2fs-dev] [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 deletions(-

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

2017-11-02 Thread Chao Yu
Sometimes, after running generic/270 of fstest, fsck reports summary info and actual position of block address in direct node becoming inconsistent. The root cause is race in between __f2fs_replace_block and change_curseg as below: Thread AThread B - __clone_blkadd

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

2017-11-02 Thread Chao Yu
During block exchange in {insert,collapse,move}_range, page-block mapping is unstable due to mapping moving or recovery, so there should be no concurrent cache read operation rely on such mapping, nor cache write operation to mess up block exchange. So this patch let background GC be aware of that

[f2fs-dev] [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 f2fs_sync_inode_m