Re: [f2fs-dev] [PATCH 1/2] add cotnfigure option --with-root-libdir

2018-08-29 Thread Theodore Y. Ts'o
On Wed, Aug 29, 2018 at 02:04:55PM -0700, Jaegeuk Kim wrote: > Thank you so much for kind explanation. This is really awesome especially for > newbies like me. This gives answers to me for all my own stupid questions like > why I need to investigate all the lib changes in order to determine

Re: [f2fs-dev] [PATCH v3] f2fs: avoid wrong decrypted data from disk

2018-08-29 Thread Jaegeuk Kim
1. Create a file in an encrypted directory 2. Do GC & drop caches 3. Read stale data before its bio for metapage was not issued yet Signed-off-by: Jaegeuk Kim --- Change log from v2: - make it globally consistent - should use f2fs_post_read_required() fs/f2fs/data.c| 18

Re: [f2fs-dev] [PATCH v2] f2fs: avoid wrong decrypted data from disk

2018-08-29 Thread Jaegeuk Kim
On 08/30, Chao Yu wrote: > On 2018/8/30 9:48, Jaegeuk Kim wrote: > > 1. Create a file in an encrypted directory > > 2. Do GC & drop caches > > 3. Read stale data before its bio for metapage was not issued yet > > > > Signed-off-by: Jaegeuk Kim > > --- > > Change log from v1: > > - move to bio

[f2fs-dev] [RFC PATCH RESEND 4/5] f2fs-tools: introduce sb checksum

2018-08-29 Thread Junling Zheng
This patch introduced crc for superblock. Reviewed-by: Chao Yu Signed-off-by: Junling Zheng --- fsck/mount.c | 23 +++ fsck/resize.c | 12 ++-- include/f2fs_fs.h | 16 +++- mkfs/f2fs_format.c | 3 +++ 4 files changed, 47 insertions(+), 7

[f2fs-dev] [RFC PATCH RESEND 2/5] f2fs-tools: rename CHECKSUM_OFFSET to CP_CHKSUM_OFFSET

2018-08-29 Thread Junling Zheng
This patch renamed CHECKSUM_OFFSET to CP_CHKSUM_OFFSET. Reviewed-by: Chao Yu Signed-off-by: Junling Zheng --- fsck/fsck.c| 4 ++-- fsck/mount.c | 4 ++-- fsck/resize.c | 8 include/f2fs_fs.h | 6 +++--- mkfs/f2fs_format.c | 14 +++--- 5 files changed,

[f2fs-dev] [RFC PATCH RESEND 5/5] fsck.f2fs: try to recover cp_payload from valid cp pack

2018-08-29 Thread Junling Zheng
From: Chao Yu If sb checksum is not enabled, and cp pack is valid due to no crc inconsistence, let's try to recover cp_payload based on cp_pack_start_sum in cp pack. Signed-off-by: Chao Yu --- fsck/f2fs.h | 5 + fsck/mount.c | 10 +++--- 2 files changed, 12 insertions(+), 3

[f2fs-dev] [RFC PATCH v3 3/5] f2fs-tools: unify the writeback of superblock

2018-08-29 Thread Junling Zheng
Introduce __write_superblock() to support updating specified one superblock or both, thus we can wrapper it in update_superblock() and f2fs_write_super_block to unify all places where sb needs to be updated. Signed-off-by: Junling Zheng --- v2 -> v3: - fix wrong condition of ASSERT in

[f2fs-dev] [RFC PATCH RESEND 1/5] f2fs: support superblock checksum

2018-08-29 Thread Junling Zheng
Now we support crc32 checksum for superblock. Reviewed-by: Chao Yu Signed-off-by: Junling Zheng --- fs/f2fs/f2fs.h | 2 ++ fs/f2fs/super.c | 29 + fs/f2fs/sysfs.c | 7 +++ include/linux/f2fs_fs.h | 3 ++- 4 files changed, 40

Re: [f2fs-dev] [PATCH v2] f2fs: avoid wrong decrypted data from disk

2018-08-29 Thread Chao Yu
On 2018/8/30 9:48, Jaegeuk Kim wrote: > 1. Create a file in an encrypted directory > 2. Do GC & drop caches > 3. Read stale data before its bio for metapage was not issued yet > > Signed-off-by: Jaegeuk Kim > --- > Change log from v1: > - move to bio != NULL > > fs/f2fs/data.c | 6 ++ > 1

Re: [f2fs-dev] [PATCH] fsck.f2fs: try to recover cp_payload from valid cp pack

2018-08-29 Thread Jaegeuk Kim
On 08/30, Junling Zheng wrote: > Hi, Jaegeuk > > On 2018/8/30 10:10, Jaegeuk Kim wrote: > > Hi Chao, > > > > Could you please add this into Junling's patch series? > > A little bit confusing between patches and reviews on them. > > > > I'll send an new version patch series with this patch as

Re: [f2fs-dev] [PATCH] fsck.f2fs: try to recover cp_payload from valid cp pack

2018-08-29 Thread Junling Zheng
Hi, Jaegeuk On 2018/8/30 10:10, Jaegeuk Kim wrote: > Hi Chao, > > Could you please add this into Junling's patch series? > A little bit confusing between patches and reviews on them. > I'll send an new version patch series with this patch as soon as possible :) > Thanks, > > On 08/28, Chao

Re: [f2fs-dev] [PATCH] fsck.f2fs: try to recover cp_payload from valid cp pack

2018-08-29 Thread Jaegeuk Kim
Hi Chao, Could you please add this into Junling's patch series? A little bit confusing between patches and reviews on them. Thanks, On 08/28, Chao Yu wrote: > If sb checksum is not enabled, and cp pack is valid due to no > crc inconsistence, let's try to recover cp_payload based on >

Re: [f2fs-dev] [PATCH v2] f2fs: avoid wrong decrypted data from disk

2018-08-29 Thread Jaegeuk Kim
1. Create a file in an encrypted directory 2. Do GC & drop caches 3. Read stale data before its bio for metapage was not issued yet Signed-off-by: Jaegeuk Kim --- Change log from v1: - move to bio != NULL fs/f2fs/data.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/fs/f2fs/data.c

Re: [f2fs-dev] [PATCH 1/2] add cotnfigure option --with-root-libdir

2018-08-29 Thread Jaegeuk Kim
Thank you so much for kind explanation. This is really awesome especially for newbies like me. This gives answers to me for all my own stupid questions like why I need to investigate all the lib changes in order to determine bumping current/revision/age numbers or not. I'd definitely like to

Re: [f2fs-dev] [PATCH] fsck.f2fs: detect and recover corrupted quota file

2018-08-29 Thread Chao Yu
Hi Sheng, On 2018/8/29 23:06, Sheng Yong wrote: > Hi, Chao > > On 2018/8/29 20:09, Chao Yu wrote: >> Once quota file is corrupted, kernel will set CP_QUOTA_NEED_FSCK_FLAG >> into checkpoint pack, this patch makes fsck supporting to detect the flag >> and try to rebuild corrupted quota file. >> >

Re: [f2fs-dev] [PATCH] fsck.f2fs: detect and recover corrupted quota file

2018-08-29 Thread Sheng Yong
Hi, Chao On 2018/8/29 20:09, Chao Yu wrote: Once quota file is corrupted, kernel will set CP_QUOTA_NEED_FSCK_FLAG into checkpoint pack, this patch makes fsck supporting to detect the flag and try to rebuild corrupted quota file. Do we need to drop recovery data? Recovery data is never checked

Re: [f2fs-dev] [PATCH 1/5] ext2: cache NULL when both default_acl and acl are NULL

2018-08-29 Thread Jan Kara
On Tue 14-08-18 22:16:30, Chengguang Xu wrote: > default_acl and acl of newly created inode will be initiated > as ACL_NOT_CACHED in vfs function inode_init_always() and later > will be updated by calling xxx_init_acl() in specific filesystems. > Howerver, when default_acl and acl are NULL then

[f2fs-dev] [PATCH] fsck.f2fs: detect and recover corrupted quota file

2018-08-29 Thread Chao Yu
Once quota file is corrupted, kernel will set CP_QUOTA_NEED_FSCK_FLAG into checkpoint pack, this patch makes fsck supporting to detect the flag and try to rebuild corrupted quota file. Signed-off-by: Chao Yu --- fsck/fsck.c | 3 ++- fsck/mount.c | 6 -- include/f2fs_fs.h | 2 ++