Re: [f2fs-dev] [PATCH v2] f2fs: replace a build-time warning with runtime WARN_ON

2016-11-02 Thread Chao Yu
Hi Arnd, Jaegeuk, It is trivial, but it's better keep commit *title*, commit log and code consistent. :) Thanks, On 2016/10/27 23:32, Arnd Bergmann wrote: > gcc is unsure about the use of last_ofs_in_node, which might happen > without a prior initialization: > > fs/f2fs//git/arm-soc/fs/f2fs/dat

Re: [f2fs-dev] [PATCH] f2fs: return directly if block has been removed from the victim

2016-11-02 Thread Chao Yu
On 2016/10/28 6:34, Jaegeuk Kim wrote: > On Wed, Oct 26, 2016 at 10:14:04AM +0800, heyunlei wrote: >> >> >> On 2016/10/26 9:09, Jaegeuk Kim wrote: >> Hi Kim, >>> Hi Yunlei, >>> >>> On Mon, Oct 24, 2016 at 11:37:28AM +0800, Yunlei He wrote: If one block has been to written to a new place, just

Re: [f2fs-dev] [PATCH 2/3] f2fs: use __set_page_dirty_nobuffers directly

2016-11-02 Thread Chao Yu
Hi Jaegeuk, On 2016/10/21 10:28, Jaegeuk Kim wrote: > This patch replaces the copied code with original generic function. Will we plan to do further enhance inside f2fs_set_page_dirty_nobuffers, if we don't it's better revert fe76b796fc5194cc3d57265002e3a748566d073f, as we don't need to wrap __se

[f2fs-dev] [PATCH v2] f2fs:return directly if block has been removed from the victim

2016-11-02 Thread Yunlei He
If one block has been to written to a new place, just return in move data process. This patch check it again with holding page lock. Signed-off-by: Yunlei He --- fs/f2fs/gc.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 9

Re: [f2fs-dev] [PATCH] f2fs: return directly if block has been removed from the victim

2016-11-02 Thread heyunlei
On 2016/11/2 15:19, Chao Yu wrote: > On 2016/10/28 6:34, Jaegeuk Kim wrote: >> On Wed, Oct 26, 2016 at 10:14:04AM +0800, heyunlei wrote: >>> >>> >>> On 2016/10/26 9:09, Jaegeuk Kim wrote: >>> Hi Kim, Hi Yunlei, On Mon, Oct 24, 2016 at 11:37:28AM +0800, Yunlei He wrote: > If one

Re: [f2fs-dev] [PATCH v2] f2fs:return directly if block has been removed from the victim

2016-11-02 Thread Chao Yu
On 2016/11/2 18:41, Yunlei He wrote: > If one block has been to written to a new place, just return > in move data process. This patch check it again with holding > page lock. > > Signed-off-by: Yunlei He > --- > fs/f2fs/gc.c | 16 > 1 file changed, 12 insertions(+), 4 deletions

[f2fs-dev] [PATCH] f2fs: update inode updating status correctly

2016-11-02 Thread Chao Yu
We should record updating status of inode only for living inode, for those unlinked inode it needs to clear ino cache, otherwise after the ino of unlinked inode was been reused, it will cause unneeded node page writing during ->fsync. Signed-off-by: Chao Yu --- fs/f2fs/inode.c | 13 +

[f2fs-dev] [PATCH v2] f2fs: record inode updating status correctly

2016-11-02 Thread Chao Yu
We should record updating status of inode only for living inode, for those unlinked inode it needs to clear its ino cache, otherwise after the ino was been reused, it will cause unneeded node page writing during ->fsync. Signed-off-by: Chao Yu --- fs/f2fs/inode.c | 13 + 1 file chang

Re: [f2fs-dev] [PATCH v2] f2fs: replace a build-time warning with runtime WARN_ON

2016-11-02 Thread Arnd Bergmann
On Wednesday 02 November 2016, Chao Yu wrote: > Hi Arnd, Jaegeuk, > > It is trivial, but it's better keep commit *title*, commit log and code > consistent. :) Sorry for my silly mistake, sent it again with a new subject now. Arnd -

[f2fs-dev] [PATCH] f2fs: hide a maybe-uninitialized warning

2016-11-02 Thread Arnd Bergmann
gcc is unsure about the use of last_ofs_in_node, which might happen without a prior initialization: fs/f2fs//git/arm-soc/fs/f2fs/data.c: In function ‘f2fs_map_blocks’: fs/f2fs/data.c:799:54: warning: ‘last_ofs_in_node’ may be used uninitialized in this function [-Wmaybe-uninitialized] if (prea

Re: [f2fs-dev] [PATCH] f2fs: hide a maybe-uninitialized warning

2016-11-02 Thread Jaegeuk Kim
Replaced with this. Thanks, Arnd & Chao, ;) On Wed, Nov 02, 2016 at 02:52:15PM +0100, Arnd Bergmann wrote: > gcc is unsure about the use of last_ofs_in_node, which might happen > without a prior initialization: > > fs/f2fs//git/arm-soc/fs/f2fs/data.c: In function ‘f2fs_map_blocks’: > fs/f2fs/data

Re: [f2fs-dev] [PATCH 2/3] f2fs: use __set_page_dirty_nobuffers directly

2016-11-02 Thread Jaegeuk Kim
On Wed, Nov 02, 2016 at 03:34:32PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > On 2016/10/21 10:28, Jaegeuk Kim wrote: > > This patch replaces the copied code with original generic function. > > Will we plan to do further enhance inside f2fs_set_page_dirty_nobuffers, if we > don't it's better revert

Re: [f2fs-dev] [PATCH v2] f2fs:return directly if block has been removed from the victim

2016-11-02 Thread Jaegeuk Kim
On Wed, Nov 02, 2016 at 06:41:50PM +0800, Yunlei He wrote: > If one block has been to written to a new place, just return > in move data process. This patch check it again with holding > page lock. > > Signed-off-by: Yunlei He > --- > fs/f2fs/gc.c | 16 > 1 file changed, 12 inse

[f2fs-dev] [PATCH 1/2] resize.f2fs: add more information in debug messages

2016-11-02 Thread Jaegeuk Kim
Print more information. Signed-off-by: Jaegeuk Kim --- fsck/resize.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/fsck/resize.c b/fsck/resize.c index 56c..b8d3f39 100644 --- a/fsck/resize.c +++ b/fsck/resize.c @@ -171,7 +171,9 @@ static void migrat

[f2fs-dev] [PATCH 2/2] resize.f2fs: fix wrong offset calculation

2016-11-02 Thread Jaegeuk Kim
When we move whole main area into new expanded area, we do not change its segment numbers from sit and ssa. Signed-off-by: Jaegeuk Kim --- fsck/resize.c | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/fsck/resize.c b/fsck/resize.c index b8d3f39..6a64

[f2fs-dev] [PATCH v3] f2fs:return directly if block has been removed from the victim

2016-11-02 Thread Yunlei He
If one block has been to written to a new place, just return in move data process. This patch check it again with holding page lock. Signed-off-by: Yunlei He --- fs/f2fs/gc.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 9

[f2fs-dev] [PATCH 5/7] sload.f2fs: not support to find or add files in inline_dir directory

2016-11-02 Thread Jaegeuk Kim
Now, sload.f2fs doesn't support inline_dir. Signed-off-by: Jaegeuk Kim --- fsck/dir.c | 13 + 1 file changed, 13 insertions(+) diff --git a/fsck/dir.c b/fsck/dir.c index 18b79bd..2009855 100644 --- a/fsck/dir.c +++ b/fsck/dir.c @@ -185,6 +185,12 @@ static int f2fs_find_entry(struct

[f2fs-dev] [PATCH 4/7] resize.f2fs: get latest free segments

2016-11-02 Thread Jaegeuk Kim
The # of free segments can be changed by defragmentation. Signed-off-by: Jaegeuk Kim --- fsck/resize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsck/resize.c b/fsck/resize.c index 5dc73a8..4813de7 100644 --- a/fsck/resize.c +++ b/fsck/resize.c @@ -424,7 +424,7 @@ stati

[f2fs-dev] [PATCH 1/7] defrag.f2fs: return error for no space case

2016-11-02 Thread Jaegeuk Kim
This returns error instead of assertion for resize.f2fs. Signed-off-by: Jaegeuk Kim --- fsck/defrag.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fsck/defrag.c b/fsck/defrag.c index 079e7a7..bea0293 100644 --- a/fsck/defrag.c +++ b/fsck/defrag.c @@ -78,8 +78,8 @@ int

[f2fs-dev] [PATCH 3/7] f2fs-tools: fix end block addres when finding free block

2016-11-02 Thread Jaegeuk Kim
This patch fixes wrong end_blkaddr condition for free block allocation. Signed-off-by: Jaegeuk Kim --- fsck/mount.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fsck/mount.c b/fsck/mount.c index 47bb529..879dd52 100644 --- a/fsck/mount.c +++ b/fsck/mount.c @@ -1547,1

[f2fs-dev] [PATCH 7/7] resize.f2fs: fill zeros for expanded ssa area

2016-11-02 Thread Jaegeuk Kim
This will avoid wrong behavior after expanding volume. Signed-off-by: Jaegeuk Kim --- fsck/resize.c | 31 ++- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/fsck/resize.c b/fsck/resize.c index 4813de7..7691524 100644 --- a/fsck/resize.c +++ b/fsck/resi

[f2fs-dev] [PATCH 6/7] f2fs-tools: determine cp_addr by sbi->cur_cp

2016-11-02 Thread Jaegeuk Kim
We don't guarantee cp_addr is fixed by cp_ver due to sload. Signed-off-by: Jaegeuk Kim --- fsck/f2fs.h | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/fsck/f2fs.h b/fsck/f2fs.h index 39ff161..fbb878a 100644 --- a/fsck/f2fs.h +++ b/fsck/f2fs.h @@ -280,19 +280,10

[f2fs-dev] [PATCH 2/7] resize.f2fs: fix wrong end_blkaddr

2016-11-02 Thread Jaegeuk Kim
The end_blkaddr should add main area segments. Signed-off-by: Jaegeuk Kim --- fsck/resize.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fsck/resize.c b/fsck/resize.c index 6a645e3..5dc73a8 100644 --- a/fsck/resize.c +++ b/fsck/resize.c @@ -563,8 +563,8 @@ int f2fs_res

Re: [f2fs-dev] [PATCH 4/7] resize.f2fs: get latest free segments

2016-11-02 Thread heyunlei
Hi, Kim On 2016/11/3 13:28, Jaegeuk Kim wrote: > The # of free segments can be changed by defragmentation. > > Signed-off-by: Jaegeuk Kim > --- > fsck/resize.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fsck/resize.c b/fsck/resize.c > index 5dc73a8..4813de7 100644 >