Re: [f2fs-dev] [PATCH v3] common/rc: generalize _get_filesize()

2019-10-15 Thread Dave Chinner
On Wed, Oct 16, 2019 at 10:48:03AM +0800, Chao Yu wrote: > There are some testcases use below command to get file size, generalize > it as global function _get_filesize() > > ls -l $1 | $AWK_PROG '{print $5}' > > And in addition, using more simple command "stat -c %s" instead. > > - adjust

Re: [f2fs-dev] [PATCH v2] common/rc: generalize _get_filesize()

2019-10-15 Thread Chao Yu
On 2019/10/16 2:17, Darrick J. Wong wrote: > On Tue, Oct 15, 2019 at 06:11:49PM +0800, Chao Yu wrote: >> There are some testcases use below command to get file size, generalize >> it as global function _get_filesize() >> >> ls -l $1 | $AWK_PROG '{print $5}' >> >> And in addition, using more simple

[f2fs-dev] [PATCH v3] common/rc: generalize _get_filesize()

2019-10-15 Thread Chao Yu
There are some testcases use below command to get file size, generalize it as global function _get_filesize() ls -l $1 | $AWK_PROG '{print $5}' And in addition, using more simple command "stat -c %s" instead. - adjust common/defrag, generic/275 and generic/315 to use it - remove unused

[f2fs-dev] [Bug 205203] New: ram_thresh default (DEF_RAM_THRESHOLD) is wrong (outdated) in f2fs document

2019-10-15 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205203 Bug ID: 205203 Summary: ram_thresh default (DEF_RAM_THRESHOLD) is wrong (outdated) in f2fs document Product: File System Version: 2.5 Kernel Version: all Hardware: All

Re: [f2fs-dev] [PATCH v2] common/rc: generalize _get_filesize()

2019-10-15 Thread Darrick J. Wong
On Tue, Oct 15, 2019 at 06:11:49PM +0800, Chao Yu wrote: > There are some testcases use below command to get file size, generalize > it as global function _get_filesize() > > ls -l $1 | $AWK_PROG '{print $5}' > > And in addition, using more simple command "stat -c %s" instead. > > - adjust

Re: [f2fs-dev] [PATCH v2 1/2] common/defrag: support f2fs

2019-10-15 Thread Chao Yu
Jaegeuk, do you have time to check these two patches which are trying to adjust defrag/casefold testcase for f2fs? On 2019/10/15 18:09, Chao Yu wrote: > F2FS supports defragment based on file granularity, adjust test suit > to support f2fs. > > Signed-off-by: Chao Yu > --- > v2: > - use local

[f2fs-dev] [PATCH v2] common/rc: generalize _get_filesize()

2019-10-15 Thread Chao Yu
There are some testcases use below command to get file size, generalize it as global function _get_filesize() ls -l $1 | $AWK_PROG '{print $5}' And in addition, using more simple command "stat -c %s" instead. - adjust common/defrag, generic/275 and generic/315 to use it - remove unused

[f2fs-dev] [PATCH v2 2/2] common/casefold: support f2fs

2019-10-15 Thread Chao Yu
Now, f2fs has ported casefold feature from ext4, let's enable the testcase. Signed-off-by: Chao Yu --- v2: - no changes. common/casefold | 9 + 1 file changed, 9 insertions(+) diff --git a/common/casefold b/common/casefold index 2a7ab3eb..9172d818 100644 --- a/common/casefold +++

[f2fs-dev] [PATCH v2 1/2] common/defrag: support f2fs

2019-10-15 Thread Chao Yu
F2FS supports defragment based on file granularity, adjust test suit to support f2fs. Signed-off-by: Chao Yu --- v2: - use local variable in function common/config | 2 ++ common/defrag | 11 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/common/config

Re: [f2fs-dev] [PATCH] common/rc: generalize _get_filesize()

2019-10-15 Thread Chao Yu
On 2019/10/2 19:02, Eryu Guan wrote: > On Fri, Sep 27, 2019 at 06:07:42PM +0800, Chao Yu wrote: >> There are some testcases use below command to get file size, generalize >> it as global function _get_filesize() >> >> ls -l $1 | $AWK_PROG '{print $5}' >> >> - adjust common/defrag, generic/275 and

Re: [f2fs-dev] [PATCH 1/2] common/defrag: support f2fs

2019-10-15 Thread Chao Yu
On 2019/10/2 18:59, Eryu Guan wrote: > On Fri, Sep 27, 2019 at 06:06:26PM +0800, Chao Yu wrote: >> F2FS supports defragment based on file granularity, adjust test suit >> to support f2fs. >> >> Signed-off-by: Chao Yu >> --- >> common/config | 2 ++ >> common/defrag | 11 ++- >> 2 files

Re: [PATCH] f2fs: fix to avoid memory leakage in f2fs_listxattr

2019-10-15 Thread Chao Yu
Hi Randall, On 2019/10/9 11:20, Randall Huang wrote: > In f2fs_listxattr, there is no boundary check before > memcpy e_name to buffer. > If the e_name_len is corrupted, > unexpected memory contents may be returned to the buffer. > > Signed-off-by: Randall Huang > --- > fs/f2fs/xattr.c | 14

Re: [f2fs-dev] [PATCH] tools/fibmap: fix build error

2019-10-15 Thread Chao Yu
On 2019/10/8 0:33, Jaegeuk Kim wrote: > fibmap.c:28:10: fatal error: 'sys/sysmacros.h' file not found > ^ > 1 error generated. > make[3]: *** [fibmap.o] Error 1 > make[3]: *** Waiting for unfinished jobs > > Fixes: ce64ea0815bf ("f2fs-tools: Add support for

Re: [f2fs-dev] [PATCH 1/2] f2fs_io: add helper functions for handling errors

2019-10-15 Thread Chao Yu
On 2019/10/5 6:43, Eric Biggers wrote: > From: Eric Biggers > > Add and use helper functions for: > > - Printing an error message (optionally with errno) and exiting. > - Allocating memory, exiting on error. > - Opening a file, exiting on error. > > Signed-off-by: Eric Biggers > --- >