[f2fs-dev] [PATCH] f2fs: calculate the f2fs_stat_info into base_mem

2017-03-17 Thread Kinglong Mee
The memory size of f2fs_stat_info also should be calculated. Signed-off-by: Kinglong Mee --- fs/f2fs/debug.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c index ee2d0a4..cf102d1 100644 --- a/fs/f2fs/debug.c +++

[f2fs-dev] [PATCH] f2fs: copy all valid xattr data includes the last zero

2017-03-17 Thread Kinglong Mee
It's better coping all valid xattr data includes the last zero. Signed-off-by: Kinglong Mee --- fs/f2fs/xattr.c | 4 ++-- fs/f2fs/xattr.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c index aff7619..41785c9

[f2fs-dev] [PATCH] f2fs: avoid stat_inc_atomic_write for non-atomic file

2017-03-17 Thread Kinglong Mee
After filemap_write_and_wait_range fail, the FI_ATOMIC_FILE flags is removed, so that f2fs should not increase the stat of atomic_write. Signed-off-by: Kinglong Mee --- fs/f2fs/file.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git

[f2fs-dev] [PATCH 1/2] sload.f2fs: let dir_buckets/dir_block_index supports dir_level

2017-03-17 Thread Kinglong Mee
The dir_level in the filesystem maybe larger than zero, supports it. Signed-off-by: Kinglong Mee --- fsck/dir.c | 38 ++ fsck/f2fs.h | 37 + fsck/fsck.c | 27 --- 3 files

[f2fs-dev] [PATCH 2/2] sload.f2fs: support sload files into directory includes inline dentry

2017-03-17 Thread Kinglong Mee
It seems the new created directory always includes inline dentries, let sload.f2fs supporting it. Signed-off-by: Kinglong Mee --- fsck/dir.c | 139 +--- fsck/f2fs.h | 4 +- 2 files changed, 117 insertions(+), 26

[f2fs-dev] [PATCH 1/2] fsck.f2fs: fix bad notice of missing device

2017-03-17 Thread Kinglong Mee
The following messages is better than before. Before, # fsck.f2fs -d 1 Error: Need argument for -d Now, # fsck.f2fs -d 1 Info: Debug level = 1 Error: Device not specified Signed-off-by: Kinglong Mee --- fsck/main.c | 11 --- 1 file changed, 8

Re: [f2fs-dev] [PATCH 2/2] f2fs: don't allow atomic writes for not regular files

2017-03-17 Thread Jaegeuk Kim
On 03/17, Chao Yu wrote: > On 2017/3/17 10:09, Jaegeuk Kim wrote: > > The atomic writes only supports regular files for database. > > > > Signed-off-by: Jaegeuk Kim > > --- > > fs/f2fs/file.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/fs/f2fs/file.c

[f2fs-dev] [PATCH] sload.f2fs: fix missing SSA updates

2017-03-17 Thread Kinglong Mee
If sload many larger files to disk, the SSA that doesn't cached will be missed. Mar 17 12:04:39 localhost kernel: [ cut here ] Mar 17 12:04:39 localhost kernel: kernel BUG at fs/f2fs/gc.c:899! Mar 17 12:04:39 localhost kernel: invalid opcode: [#1] SMP Mar 17 12:04:39

[f2fs-dev] [PATCH] f2fs: protect free nid operation with cp_rwsem

2017-03-17 Thread Chao Yu
- f2fs_balance_fs_bg - build_free_nids - __build_free_nids - scan_nat_page - add_free_nid - f2fs_create - f2fs_new_inode - alloc_nid - remove_free_nid This patch

[f2fs-dev] [PATCH] f2fs: add missing INMEM_REVOKE trace enum definition

2017-03-17 Thread Chao Yu
Signed-off-by: Chao Yu --- include/trace/events/f2fs.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h index d799ca7d8e71..16fcd192e257 100644 --- a/include/trace/events/f2fs.h +++ b/include/trace/events/f2fs.h @@

Re: [f2fs-dev] [PATCH v3] f2fs: cleanup the disk level filename updating

2017-03-17 Thread Chao Yu
On 2017/3/17 15:30, Kinglong Mee wrote: > On 3/17/2017 15:04, Chao Yu wrote: >> On 2017/3/10 16:28, Kinglong Mee wrote: >>> As discuss with Jaegeuk and Chao, >>> "Once checkpoint is done, f2fs doesn't need to update there-in filename at >>> all." >>> >>> The disk-level filename is used only one

[f2fs-dev] [PATCH RESEND] f2fs: don't allow volatile writes for non-regular file

2017-03-17 Thread Chao Yu
Now f2fs only supports volatile writes for journal db regular file. Signed-off-by: Chao Yu --- fs/f2fs/file.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index f64475a53ad8..f544a1648313 100644 --- a/fs/f2fs/file.c +++

Re: [f2fs-dev] [PATCH v3] f2fs: cleanup the disk level filename updating

2017-03-17 Thread Kinglong Mee
On 3/17/2017 15:04, Chao Yu wrote: > On 2017/3/10 16:28, Kinglong Mee wrote: >> As discuss with Jaegeuk and Chao, >> "Once checkpoint is done, f2fs doesn't need to update there-in filename at >> all." >> >> The disk-level filename is used only one case, >> 1. create a file A under a dir >> 2.

Re: [f2fs-dev] [PATCH v3] f2fs: cleanup the disk level filename updating

2017-03-17 Thread Chao Yu
On 2017/3/10 16:28, Kinglong Mee wrote: > As discuss with Jaegeuk and Chao, > "Once checkpoint is done, f2fs doesn't need to update there-in filename at > all." > > The disk-level filename is used only one case, > 1. create a file A under a dir > 2. sync A > 3. godown > 4. umount > 5. mount

Re: [f2fs-dev] [PATCH 1/2] f2fs: fix stale ATOMIC_WRITTEN_PAGE private pointer

2017-03-17 Thread Chao Yu
On 2017/3/17 10:09, Jaegeuk Kim wrote: > When I forced to enable atomic operations intentionally, I could hit the below > panic, since we didn't clear page->private in f2fs_invalidate_page called by > file truncation. > > The panic occurs due to NULL mapping having page->private. > > BUG: unable