Re: [f2fs-dev] [PATCH v2] f2fs: export FS_NOCOW_FL flag to user

2019-01-04 Thread Jaegeuk Kim
This exports pin_file status to user. Signed-off-by: Jaegeuk Kim --- v2: - use F2FS_NOCOW_FL (aka FS_NOCOW_FL) fs/f2fs/f2fs.h | 3 ++- fs/f2fs/file.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 12fabd6735dd..9286ec381453 100644

Re: [f2fs-dev] [PATCH v2 01/12] fs-verity: add a documentation file

2019-01-04 Thread Daniel Colascione via Linux-f2fs-devel
On Sat, Dec 22, 2018 at 8:46 PM Theodore Y. Ts'o wrote: > > On Sat, Dec 22, 2018 at 08:10:07PM -0800, Matthew Wilcox wrote: > > Pretty much every file format has the ability to put arbitrary blocks > > of information into a file somewhere the tools which don't know about > > it will skip it. For

Re: [f2fs-dev] [PATCH 1/2] f2fs: wait on atomic writes to count F2FS_CP_WB_DATA

2019-01-04 Thread Jaegeuk Kim
On 01/04, Chao Yu wrote: > On 2019/1/4 12:20, Jaegeuk Kim wrote: > > Otherwise, we can get wrong counts incurring checkpoint hang. > > > > IO_W (CP: -24, Data: 24, Flush: ( 001), Discard: ( 00)) > > > > Cc: > > Signed-off-by: Jaegeuk Kim > > Good catch! ;) > > I can

Re: [f2fs-dev] [PATCH] f2fs: export pin_file flag to user

2019-01-04 Thread Jaegeuk Kim
On 01/04, Chao Yu wrote: > On 2019/1/4 12:19, Jaegeuk Kim wrote: > > This exports pin_file status to user. > > Semantics of pin_file flag is the same as nocow flag which is more widely > used in lsattr/chattr and vfs now. > > #define FS_NOCOW_FL 0x0080 /* Do not cow file

Re: [f2fs-dev] [PATCH v2] f2fs: fix sbi->extent_list corruption issue

2019-01-04 Thread Jaegeuk Kim
On 01/04, Sahitya Tummala wrote: > On Mon, Nov 26, 2018 at 10:17:20AM +0530, Sahitya Tummala wrote: > > When there is a failure in f2fs_fill_super() after/during > > the recovery of fsync'd nodes, it frees the current sbi and > > retries again. This time the mount is successful, but the files > >

[f2fs-dev] [PATCH] f2fs: no need to check return value of debugfs_create functions

2019-01-04 Thread Greg Kroah-Hartman
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Jaegeuk Kim Cc: Chao Yu Cc: linux-f2fs-devel@lists.sourceforge.net Signed-off-by: Greg Kroah-Hartman ---

[f2fs-dev] [PATCH] f2fs: check if file namelen exceeds max value

2019-01-04 Thread Sheng Yong
Dentry bitmap is not enough to detect incorrect dentries. So this patch also checks the namelen value of a dentry. Signed-off-by: Gong Chen Signed-off-by: Sheng Yong --- fs/f2fs/dir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index

[f2fs-dev] [PATCH v2 1/2] f2fs-dev: support multi-device direct IO

2019-01-04 Thread sunqiuyang
From: Qiuyang Sun Changelog v1 ==> v2: 1. Modify the definition of update_device_state(), and call it in direct write; 2. Move some local variables into branches where they are used. Signed-off-by: Qiuyang Sun --- fs/f2fs/data.c| 25 - fs/f2fs/f2fs.h| 3 +--

[f2fs-dev] [PATCH] f2fs: check inject_rate validity during configuring

2019-01-04 Thread Chao Yu
Type of inject_rate is unsigned int, let's check new value's validity during configuring. Signed-off-by: Chao Yu --- fs/f2fs/sysfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c index 0575edbe3ed6..02d4012a9183 100644 --- a/fs/f2fs/sysfs.c +++

Re: [f2fs-dev] [PATCH 2/2] f2fs: don't access node/meta inode mapping after iput

2019-01-04 Thread Chao Yu
On 2019/1/4 12:20, Jaegeuk Kim wrote: > This fixes wrong access of address spaces of node and meta inodes after iput. > > Fixes: 60aa4d5536ab ("f2fs: fix use-after-free issue when accessing > sbi->stat_info") > Signed-off-by: Jaegeuk Kim Reviewed-by: Chao Yu Thanks,

Re: [f2fs-dev] [PATCH 1/2] f2fs: wait on atomic writes to count F2FS_CP_WB_DATA

2019-01-04 Thread Chao Yu
On 2019/1/4 12:20, Jaegeuk Kim wrote: > Otherwise, we can get wrong counts incurring checkpoint hang. > > IO_W (CP: -24, Data: 24, Flush: ( 001), Discard: ( 00)) > > Cc: > Signed-off-by: Jaegeuk Kim Good catch! ;) I can understand this condition, but for other new

Re: [f2fs-dev] [PATCH] f2fs: export pin_file flag to user

2019-01-04 Thread Chao Yu
On 2019/1/4 12:19, Jaegeuk Kim wrote: > This exports pin_file status to user. Semantics of pin_file flag is the same as nocow flag which is more widely used in lsattr/chattr and vfs now. #define FS_NOCOW_FL 0x0080 /* Do not cow file */ lsattr/chattr no copy on write (C)

Re: [f2fs-dev] [PATCH v2] f2fs: fix sbi->extent_list corruption issue

2019-01-04 Thread Sahitya Tummala
On Mon, Nov 26, 2018 at 10:17:20AM +0530, Sahitya Tummala wrote: > When there is a failure in f2fs_fill_super() after/during > the recovery of fsync'd nodes, it frees the current sbi and > retries again. This time the mount is successful, but the files > that got recovered before retry, still