Re: [f2fs-dev] [PATCH V4 5/8] f2fs: Use read_callbacks for decrypting file data

2019-08-19 Thread Gao Xiang
On Tue, Aug 20, 2019 at 01:12:36PM +0800, Gao Xiang wrote: > Hi Chandan, > > On Tue, Aug 20, 2019 at 10:35:29AM +0530, Chandan Rajendra wrote: > > On Friday, August 16, 2019 11:48 AM Chandan Rajendra wrote: > > > F2FS has a copy of "post read processing" code using which encrypted > > > file data

Re: [f2fs-dev] [PATCH V4 5/8] f2fs: Use read_callbacks for decrypting file data

2019-08-19 Thread Gao Xiang
Hi Chandan, On Tue, Aug 20, 2019 at 10:35:29AM +0530, Chandan Rajendra wrote: > On Friday, August 16, 2019 11:48 AM Chandan Rajendra wrote: > > F2FS has a copy of "post read processing" code using which encrypted > > file data is decrypted. This commit replaces it to make use of the > > generic

Re: [f2fs-dev] [PATCH V4 5/8] f2fs: Use read_callbacks for decrypting file data

2019-08-19 Thread Chandan Rajendra
On Friday, August 16, 2019 11:48 AM Chandan Rajendra wrote: > F2FS has a copy of "post read processing" code using which encrypted > file data is decrypted. This commit replaces it to make use of the > generic read_callbacks facility. > > Signed-off-by: Chandan Rajendra Hi Eric and Ted, Looks

Re: [f2fs-dev] [PATCH] fsck.f2fs: check only max extra_isize

2019-08-19 Thread Jaegeuk Kim
On 08/18, Chao Yu wrote: > On 2019-8-17 9:03, Jaegeuk Kim wrote: > > If we use later kernel having larger extra_isize, old fsck will delete > > entire old files. > > Would it be better to construct the length based on existed features? We can't judge the size for future fields. > > Thanks, >

Re: [PATCH] f2fs: fix to avoid data corruption by forbidding SSR overwrite

2019-08-19 Thread Jaegeuk Kim
On 08/19, Chao Yu wrote: > On 2019/8/16 11:03, Chao Yu wrote: > > There is one case can cause data corruption. > > > > - write 4k to fileA > > - fsync fileA, 4k data is writebacked to lbaA > > - write 4k to fileA > > - kworker flushs 4k to lbaB; dnode contain lbaB didn't be persisted yet > > -

Re: [PATCH v2] f2fs: allocate memory in batch in build_sit_info()

2019-08-19 Thread Jaegeuk Kim
On 07/26, Chao Yu wrote: > build_sit_info() allocate all bitmaps for each segment one by one, > it's quite low efficiency, this pach changes to allocate large > continuous memory at a time, and divide it and assign for each bitmaps > of segment. For large size image, it can expect improving its

[f2fs-dev] [PATCH v5] Add flags option to get xattr method paired to __vfs_getxattr

2019-08-19 Thread Mark Salyzyn via Linux-f2fs-devel
Replace arguments for get and set xattr methods, and __vfs_getxattr and __vfs_setaxtr functions with a reference to the following argument structure: struct xattr_gs_args { struct dentry *dentry; struct inode *inode; const char *name; union { void

Re: [f2fs-dev] [PATCH V4 5/8] f2fs: Use read_callbacks for decrypting file data

2019-08-19 Thread Chandan Rajendra
On Sunday, August 18, 2019 7:15:42 PM IST Chao Yu wrote: > Hi Chandan, > > On 2019-8-16 14:18, Chandan Rajendra wrote: > > F2FS has a copy of "post read processing" code using which encrypted > > file data is decrypted. This commit replaces it to make use of the > > generic read_callbacks

[f2fs-dev] [PATCH 0/4] fsck: Check write pointers of zoned block devices

2019-08-19 Thread Shin'ichiro Kawasaki
On sudden f2fs shutdown, zoned block device status and f2fs meta data can be inconsistent. When f2fs shutdown happens during write operations, write pointers on the device go forward but the f2fs meta data does not reflect write pointer progress. This inconsistency will eventually cause "Unaligned

[f2fs-dev] [PATCH 2/4] libf2fs_zoned: Introduce f2fs_reset_zone() function

2019-08-19 Thread Shin'ichiro Kawasaki
To allow fsck to reset a zone with inconsistent write pointer, introduce a helper function f2fs_reset_zone(). Signed-off-by: Shin'ichiro Kawasaki --- include/f2fs_fs.h | 1 + lib/libf2fs_zoned.c | 24 2 files changed, 25 insertions(+) diff --git a/include/f2fs_fs.h

[f2fs-dev] [PATCH 3/4] fsck.f2fs: Check write pointer consistency with current segments

2019-08-19 Thread Shin'ichiro Kawasaki
On sudden f2fs shutdown, zoned block device status and f2fs current segment positions in meta data can be inconsistent. When f2fs shutdown happens before write operations completes, write pointers of zoned block devices can go further but f2fs meta data keeps current segments at positions before

[f2fs-dev] [PATCH 4/4] fsck.f2fs: Check write pointer consistency with valid blocks count

2019-08-19 Thread Shin'ichiro Kawasaki
When sudden f2fs shutdown happens on zoned block devices, write pointers can be inconsistent with valid blocks counts in meta data. The failure scenario is as follows: - Just before a sudden shutdown, a new segment in a new zone is selected for a current segment. Write commands were executed to

[f2fs-dev] [PATCH 1/4] libf2fs_zoned: Introduce f2fs_report_zones() helper function

2019-08-19 Thread Shin'ichiro Kawasaki
To prepare for write pointer consistency check by fsck, add f2fs_report_zones() helper function which calls REPORT ZONE command to get write pointer status. The function is added to lib/libf2fs_zoned which gathers zoned block device related functions. To check write pointer consistency with f2fs

Re: [PATCH] f2fs: fix to avoid data corruption by forbidding SSR overwrite

2019-08-19 Thread Chao Yu
On 2019/8/16 11:03, Chao Yu wrote: > There is one case can cause data corruption. > > - write 4k to fileA > - fsync fileA, 4k data is writebacked to lbaA > - write 4k to fileA > - kworker flushs 4k to lbaB; dnode contain lbaB didn't be persisted yet > - write 4k to fileB > - kworker flush 4k to