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 (roll

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. sync

[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 +++ b/fs/f2fs/file.c @@ -1594,6 +1594,

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 ca

[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 @@ -15,6 +15,7 @@ TRACE_

[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 l

[f2fs-dev] [PATCH v2] 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 l

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 b/fs/f2fs/file.c > > i

[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 insertions(+), 3 deletions(-)

[f2fs-dev] [PATCH 2/2] fsck.f2fs: check encrypted filename depends FADVISE_ENC_NAME_BIT

2017-03-17 Thread Kinglong Mee
An encrypted directory under an unencrypted directory, the filename isn't encrypted. Signed-off-by: Kinglong Mee --- fsck/dump.c | 4 ++-- fsck/fsck.c | 44 ++-- fsck/mount.c | 6 +++--- include/f2fs_fs.h | 2 ++ 4 files changed, 29 in

[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 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 changed, 43 insertions(+), 5

[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 a/fs/f2fs/file.c b/fs/f2fs/file.c i

[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 100644 --- a/fs/f2fs/xattr.

[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 +++ b/fs/f2fs/debug.c @@ -15

[f2fs-dev] [PATCH] f2fs: more reasonable mem_size calculating of ino_entry

2017-03-17 Thread Kinglong Mee
Signed-off-by: Kinglong Mee --- fs/f2fs/node.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index cc7ef45..2962e23 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -63,8 +63,8 @@ bool available_free_memory(struct f2fs_sb_info *sbi, int

[f2fs-dev] About the superblock and checkpoint

2017-03-17 Thread Kinglong Mee
When I make a filesystem on a disk partition (eg. /dev/sdd1), but I mount the filesystem from /dev/sdd by mistake, f2fs print the following WARNING. I don't think user want them. I have no idea to avoid or fix it? Should f2fs check both super block? or both checkpoint? Any comments are welcome.