[f2fs-dev] [PATCH v2] f2fs: add missing CONFIG_F2FS_FS_COMPRESSION

2020-03-27 Thread Chao Yu
Compression sysfs node should not be shown if f2fs module disables compression feature. Signed-off-by: Chao Yu --- v2: - add missing CONFIG_F2FS_FS_COMPRESSION fs/f2fs/sysfs.c | 4 1 file changed, 4 insertions(+) diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c index 5f4fec83a6c6..e3bbbef9b4

[f2fs-dev] [PATCH 3/3] f2fs: fix to check f2fs_compressed_file() in f2fs_bmap()

2020-03-27 Thread Chao Yu
Otherwise, for compressed inode, returned physical block address may be wrong. Signed-off-by: Chao Yu --- fs/f2fs/data.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 24643680489b..f22f3ba10a48 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -359

[f2fs-dev] [PATCH 1/3] f2fs: fix to disable compression on directory

2020-03-27 Thread Chao Yu
It needs to call f2fs_disable_compressed_file() to disable compression on directory. Signed-off-by: Chao Yu --- fs/f2fs/f2fs.h | 10 ++ fs/f2fs/file.c | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 9274399d9505..4e80cbe130d9

[f2fs-dev] [PATCH 2/3] f2fs: keep inline_data when compression conversion

2020-03-27 Thread Chao Yu
We can keep compressed inode's data inline before inline conversion. Signed-off-by: Chao Yu --- fs/f2fs/file.c | 5 - 1 file changed, 5 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 6cb3c6cae7cd..21f7108ca2ba 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -1822,11 +18

Re: [f2fs-dev] [PATCH v9 01/11] block: Keyslot Manager for Inline Encryption

2020-03-27 Thread Christoph Hellwig
On Wed, Mar 25, 2020 at 11:22:13PM -0700, Eric Biggers wrote: > > +#ifdef CONFIG_BLK_INLINE_ENCRYPTION > > + /* Inline crypto capabilities */ > > + struct blk_keyslot_manager *ksm; > > +#endif > > I do still wonder whether the concept of inline crypto support should be more > separated from ke

Re: [f2fs-dev] [PATCH v9 02/11] block: Inline encryption support for blk-mq

2020-03-27 Thread Christoph Hellwig
On Thu, Mar 26, 2020 at 01:05:11PM -0700, Eric Biggers wrote: > > +{ > > + int i = 0; > > + unsigned int inc = bytes >> bc->bc_key->data_unit_size_bits; > > + > > + while (i < BLK_CRYPTO_DUN_ARRAY_SIZE) { > > + if (bc->bc_dun[i] + inc != next_dun[i]) > > + return f

Re: [f2fs-dev] [PATCH] f2fs: prevent meta updates while checkpoint is in progress

2020-03-27 Thread Jaegeuk Kim
Hi Sahitya, On 03/26, Sahitya Tummala wrote: > allocate_segment_for_resize() can cause metapage updates if > it requires to change the current node/data segments for resizing. > Stop these meta updates when there is a checkpoint already > in progress to prevent inconsistent CP data. Doesn't freez

Re: [f2fs-dev] [PATCH 3/3] f2fs: fix to check f2fs_compressed_file() in f2fs_bmap()

2020-03-27 Thread Jaegeuk Kim
On 03/27, Chao Yu wrote: > Otherwise, for compressed inode, returned physical block address > may be wrong. We can use bmap to check the allocated (non)compressed blocks. > > Signed-off-by: Chao Yu > --- > fs/f2fs/data.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fs/f2fs/data.