Re: [f2fs-dev] [PATCH] fscrypto: use standard macros to compute length of fname ciphertext

2016-09-29 Thread Theodore Ts'o
On Thu, Sep 22, 2016 at 01:31:49PM -0700, Eric Biggers wrote: > Signed-off-by: Eric Biggers Thanks, applied. - Ted -- ___ Linux-f2fs-de

Re: [f2fs-dev] [PATCH] ext4: do not unnecessarily null-terminate encrypted symlink data

2016-09-29 Thread Theodore Ts'o
On Thu, Sep 22, 2016 at 01:31:47PM -0700, Eric Biggers wrote: > Null-terminating the fscrypt_symlink_data on read is unnecessary because > it is not string data --- it contains binary ciphertext. > > Signed-off-by: Eric Biggers Thanks, applied. - Ted ---

Re: [f2fs-dev] [PATCH 1/2] f2fs: use crc and cp version to determine roll-forward recovery

2016-09-29 Thread Chao Yu
On 2016/9/30 8:53, Jaegeuk Kim wrote: > On Thu, Sep 29, 2016 at 08:01:32PM +0800, Chao Yu wrote: >> On 2016/9/20 10:55, Jaegeuk Kim wrote: >>> Previously, we used cp_version only to detect recoverable dnodes. >>> In order to avoid same garbage cp_version, we needed to truncate the next >>> dnode du

Re: [f2fs-dev] [PATCH 1/2] f2fs: use crc and cp version to determine roll-forward recovery

2016-09-29 Thread Jaegeuk Kim
On Thu, Sep 29, 2016 at 08:01:32PM +0800, Chao Yu wrote: > On 2016/9/20 10:55, Jaegeuk Kim wrote: > > Previously, we used cp_version only to detect recoverable dnodes. > > In order to avoid same garbage cp_version, we needed to truncate the next > > dnode during checkpoint, resulting in additional

[f2fs-dev] [PATCH v4 RESEND] f2fs: introduce get_checkpoint_version for cleanup

2016-09-29 Thread Tiezhu Yang
There exists almost same codes when get the value of pre_version and cur_version in function validate_checkpoint, this patch adds get_checkpoint_version to clean up redundant codes. Signed-off-by: Tiezhu Yang --- fs/f2fs/checkpoint.c | 66 ++-- 1 f

Re: [f2fs-dev] [PATCH v4] f2fs: introduce get_checkpoint_version for cleanup

2016-09-29 Thread Tiezhu Yang
At 2016-09-30 07:47:58, "Tiezhu Yang" wrote: >There exists almost same codes when get the value of pre_version >and cur_version in function validate_checkpoint, this patch adds >get_checkpoint_version to clean up redundant codes. > >Signed-off-by: Tiezhu Yang >--- > fs/f2fs/checkpoint.c | 66

[f2fs-dev] [PATCH v4] f2fs: introduce get_checkpoint_version for cleanup

2016-09-29 Thread Tiezhu Yang
There exists almost same codes when get the value of pre_version and cur_version in function validate_checkpoint, this patch adds get_checkpoint_version to clean up redundant codes. Signed-off-by: Tiezhu Yang --- fs/f2fs/checkpoint.c | 66 ++-- 1 f

Re: [f2fs-dev] [PATCH 1/2] f2fs: fix to commit bio cache after flushing node pages

2016-09-29 Thread Jaegeuk Kim
On Thu, Sep 29, 2016 at 06:45:03PM +0800, Chao Yu wrote: > On 2016/9/29 4:19, Jaegeuk Kim wrote: > > On Tue, Sep 27, 2016 at 10:09:03AM +0800, Chao Yu wrote: > >> On 2016/9/27 9:39, Jaegeuk Kim wrote: > >>> On Tue, Sep 27, 2016 at 08:57:41AM +0800, Chao Yu wrote: > Hi Jaegeuk, > > On

Re: [f2fs-dev] [PATCH] fscrypto: lock inode while setting encryption policy

2016-09-29 Thread Richard Weinberger
On 28.09.2016 20:34, Eric Biggers wrote: > i_rwsem needs to be acquired while setting an encryption policy so that > concurrent calls to FS_IOC_SET_ENCRYPTION_POLICY are correctly > serialized (especially the ->get_context() + ->set_context() pair), and > so that new files cannot be created in the

Re: [f2fs-dev] [trivial PATCH] f2fs: remove dead variable

2016-09-29 Thread Chao Yu
On 2016/9/29 18:37, Sheng Yong wrote: > Signed-off-by: Sheng Yong Acked-by: Chao Yu -- ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.

Re: [f2fs-dev] [PATCH 1/2] f2fs: use crc and cp version to determine roll-forward recovery

2016-09-29 Thread Chao Yu
On 2016/9/20 10:55, Jaegeuk Kim wrote: > Previously, we used cp_version only to detect recoverable dnodes. > In order to avoid same garbage cp_version, we needed to truncate the next > dnode during checkpoint, resulting in additional discard or data write. > If we can distinguish this by using crc

Re: [f2fs-dev] [PATCH v3] f2fs: introduce get_checkpoint_version for cleanup

2016-09-29 Thread Chao Yu
On 2016/9/28 2:32, Tiezhu Yang wrote: > There exists almost same codes when get the value of pre_version > and cur_version in function validate_checkpoint, this patch adds > get_checkpoint_version to clean up redundant codes. > > Signed-off-by: Tiezhu Yang > --- > fs/f2fs/checkpoint.c | 68 > ++

[f2fs-dev] [PATCH 4/4] f2fs: unify the length of versions

2016-09-29 Thread Junling Zheng
Currently, versions in f2fs_configuration have one more byte, so versions in f2fs_super_block may not end with '\0', which will cause errors while printing it in print_raw_sb_info(). Unify the length of versions to fix it. Signed-off-by: Junling Zheng --- include/f2fs_fs.h | 6 +++--- lib/libf2f

[f2fs-dev] [PATCH 3/4] fsck.f2fs: fix a typo in check_sector_size

2016-09-29 Thread Junling Zheng
Signed-off-by: Junling Zheng --- fsck/mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsck/mount.c b/fsck/mount.c index a247dec..5f51009 100644 --- a/fsck/mount.c +++ b/fsck/mount.c @@ -1908,7 +1908,7 @@ static int check_sector_size(struct f2fs_super_block *sb)

[f2fs-dev] [PATCH 1/4] fsck.f2fs: free cp_page_1 in validate_checkpoint

2016-09-29 Thread Junling Zheng
Free cp_page_1 in validate_checkpoint to avoid memory leak. Signed-off-by: Junling Zheng --- fsck/mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsck/mount.c b/fsck/mount.c index 3be60bb..e390b26 100644 --- a/fsck/mount.c +++ b/fsck/mount.c @@ -494,7 +494,7 @@ void *

[f2fs-dev] [PATCH 2/4] fsck.f2fs: fix incorrect ERR_MSG in f2fs_do_mount

2016-09-29 Thread Junling Zheng
Signed-off-by: Junling Zheng --- fsck/mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsck/mount.c b/fsck/mount.c index e390b26..a247dec 100644 --- a/fsck/mount.c +++ b/fsck/mount.c @@ -1978,7 +1978,7 @@ int f2fs_do_mount(struct f2fs_sb_info *sbi) } i

[f2fs-dev] [PATCH 1/2] f2fs: fix to commit bio cache after flushing node pages

2016-09-29 Thread Chao Yu
In sync_node_pages, we won't check and commit last merged pages in private bio cache of f2fs, as these pages were taged as writeback, someone who is waiting for writebacking of the page will be blocked until the cache was committed by someone else. We need to commit node type bio cache to avoid po

[f2fs-dev] [PATCH 2/2] f2fs: don't submit irrelevant page

2016-09-29 Thread Chao Yu
While we call ->writepages, there are two cases: a. we didn't writeout any dirty pages, since they are writebacked by other thread concurrently. b. we writeout dirty pages, and have already submitted bio to block layer. In these cases, we don't need to do additional bio flushing unnecessarily, it

Re: [f2fs-dev] [PATCH 1/2] f2fs: fix to commit bio cache after flushing node pages

2016-09-29 Thread Chao Yu
On 2016/9/29 4:19, Jaegeuk Kim wrote: > On Tue, Sep 27, 2016 at 10:09:03AM +0800, Chao Yu wrote: >> On 2016/9/27 9:39, Jaegeuk Kim wrote: >>> On Tue, Sep 27, 2016 at 08:57:41AM +0800, Chao Yu wrote: Hi Jaegeuk, On 2016/9/27 2:33, Jaegeuk Kim wrote: > Hi Chao, > > On Tue,

[f2fs-dev] [trivial PATCH] f2fs: remove dead variable

2016-09-29 Thread Sheng Yong
Signed-off-by: Sheng Yong --- fs/f2fs/gc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index c9b8a67..93985c6 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -275,7 +275,7 @@ static int get_victim_by_default(struct f2fs_sb_info *sbi, {