[f2fs-dev] [RFC PATCH v2 9/9] fsck.f2fs: format output message of FIX_MSG

2017-11-01 Thread Sheng Yong
This patch removes an extra '\n' at the end of the string in FIX_MSG. Signed-off-by: Sheng Yong --- fsck/fsck.c | 4 ++-- fsck/mount.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/fsck/fsck.c b/fsck/fsck.c index 77490d8..1905319 100644 ---

[f2fs-dev] [RFC PATCH v2 6/9] fsck.f2fs: introduce new option --dry-run

2017-11-01 Thread Sheng Yong
With --dry-run enabled, fsck.f2fs will do all checks and "fixes" except that all fixes will not be written to storage at last. Signed-off-by: Sheng Yong Reviewed-by: Chao Yu --- fsck/main.c | 14 +- include/f2fs_fs.h | 1 +

[f2fs-dev] [RFC PATCH v2 1/9] fsck.f2fs: do not set fix_on directly

2017-11-01 Thread Sheng Yong
Do not set fix_on if it is allowed by user. Signed-off-by: Sheng Yong --- fsck/main.c | 2 +- fsck/mount.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/fsck/main.c b/fsck/main.c index c9411eb..93037e1 100644 --- a/fsck/main.c +++ b/fsck/main.c @@

[f2fs-dev] [RFC PATCH v2 3/9] dump/fsck: introduce print_xattr_entry

2017-11-01 Thread Sheng Yong
This patch exports read_all_xattrs to allow dump/fsck to get all xattrs, and introduces print_xattr_entry which tries to parse an xattr entry accroding to its xattr index. Signed-off-by: Sheng Yong --- fsck/dump.c | 18 - fsck/fsck.h | 7 +++- fsck/mount.c |

[f2fs-dev] [RFC PATCH v2 2/9] fsck.f2fs: do not fix corrupted nat entries in build_nat_area_bitmap

2017-11-01 Thread Sheng Yong
Fixing corrupted data depends on c.fix_on. If it's not set, we should not force fixing corrupted data. So if nat entries are found invalid when building nat_area_bitmap, we should just set c.bug_on, and fix it later. Signed-off-by: Sheng Yong Reviewed-by: Chao Yu

[f2fs-dev] [RFC PATCH v2 5/9] dump.f2fs: do not dump encrypted files

2017-11-01 Thread Sheng Yong
If a file is encrypted, its content is cipher text on the storage. So there is no need to dump an encrypted file. Signed-off-by: Sheng Yong Reviewed-by: Chao Yu --- fsck/dump.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff

[f2fs-dev] [RFC PATCH v2 0/9] f2fs-tools: fix fix_on usage and introduce dump/print xattr

2017-11-01 Thread Sheng Yong
v1-v2: [PATCH 3] print values of USER/SECRUITY xattr as hex instead of plain text. [PATCH 4] replace xattr value if it already exists by setting parameter `flags' as 0 of fsetxattr. [PATCH 1/7] move message printing modification into a different patch. thanks, Sheng Sheng Yong (9):

[f2fs-dev] [RFC PATCH v2 8/9] f2fs-tools: remove unused list.h

2017-11-01 Thread Sheng Yong
Commit 7d96d138a378 ("fsck.f2fs: remove list.h") has already the usage of list.h. So let's remove list.h itself. Signed-off-by: Sheng Yong Reviewed-by: Chao Yu --- include/list.h | 88 -- 1 file

[f2fs-dev] [RFC PATCH v2 4/9] dump.f2fs: introduce dump_xattr

2017-11-01 Thread Sheng Yong
This patch introduces dump_xattr to create xattrs for dumped files. Signed-off-by: Sheng Yong --- fsck/dump.c | 63 ++--- 1 file changed, 60 insertions(+), 3 deletions(-) diff --git a/fsck/dump.c b/fsck/dump.c index

[f2fs-dev] [RFC PATCH v2 7/9] fsck.f2fs: introduce sanity_check_inode

2017-11-01 Thread Sheng Yong
f2fs_iget checks if i_mode is valid. If it is not, the file cannot be accessed as well as deleted. To make sure such files can be removed, fsck adds the same check, and removes incorrect inode blocks. Signed-off-by: Sheng Yong --- fsck/fsck.c | 21 + 1

[f2fs-dev] [PATCH] f2fs: save a multiplication for last_nid calculation

2017-11-01 Thread Fan Li
Use a slightly easier way to calculate last_nid. Signed-off-by: Fan li --- fs/f2fs/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 7834097..55ab330 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@

Re: [f2fs-dev] [PATCH] f2fs: modify the procedure of scan free nid

2017-11-01 Thread Fan Li
> -Original Message- > From: Chao Yu [mailto:c...@kernel.org] > Sent: Wednesday, November 01, 2017 8:47 PM > To: Fan Li; 'Jaegeuk Kim' > Cc: linux-ker...@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net > Subject: Re: [f2fs-dev] [PATCH] f2fs: modify the procedure of scan free nid

Re: [f2fs-dev] [PATCH] f2fs: modify the procedure of scan free nid

2017-11-01 Thread Chao Yu
On 2017/11/1 18:03, Fan Li wrote: > > >> -Original Message- >> From: Chao Yu [mailto:c...@kernel.org] >> Sent: Tuesday, October 31, 2017 10:32 PM >> To: Fan Li; 'Jaegeuk Kim' >> Cc: linux-ker...@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net >> Subject: Re: [f2fs-dev] [PATCH]

Re: [f2fs-dev] [PATCH] f2fs: modify the procedure of scan free nid

2017-11-01 Thread Fan Li
> -Original Message- > From: Chao Yu [mailto:c...@kernel.org] > Sent: Tuesday, October 31, 2017 10:32 PM > To: Fan Li; 'Jaegeuk Kim' > Cc: linux-ker...@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net > Subject: Re: [f2fs-dev] [PATCH] f2fs: modify the procedure of scan free nid >