On Wed, Apr 24, 2019 at 10:07:18AM +0530, Chandan Rajendra wrote:
> +ifeq (y, $(firstword $(filter y,$(CONFIG_FS_ENCRYPTION)
> $(CONFIG_FS_VERITY
> +obj-y += post_read_process.o
> +endif
Please just add a new config option selected by the users.
Also I find the file name rather
With subpage sized blocks, ext4_block_write_begin() can have up to two
blocks to decrypt. Hence this commit invokes fscrypt_decrypt_page() for
each of those blocks.
Signed-off-by: Chandan Rajendra
---
fs/ext4/inode.c | 33 +++--
1 file changed, 23 insertions(+), 10
This patchset moves the "post read processing" code into a file of its
own (i.e. fs/post_read_process.c) and modifies the generic
do_mpage_readpge() to make use of the functionality provided.
"Post read processing" implements code to track the state machine that
needs to be executed after reading
To support decryption of sub-pagesized blocks this commit adds code to,
1. Track buffer head in "struct post_read_ctx".
2. Pass buffer head argument to all "post read" processing functions.
3. In the corresponding endio, loop across all the blocks mapped by the
page, decrypting each block in
For subpage-sized blocks, this commit now encrypts all blocks mapped by
a page range.
Signed-off-by: Chandan Rajendra
---
fs/crypto/crypto.c | 37 +
1 file changed, 25 insertions(+), 12 deletions(-)
diff --git a/fs/crypto/crypto.c b/fs/crypto/crypto.c
index
Now that we have the code to support encryption for subpage-sized
blocks, this commit removes the conditional check in filesystem mount
code.
The commit also changes the support statement in
Documentation/filesystems/fscrypt.rst to reflect the fact that
encryption of filesystems with blocksize
For subpage-sized blocks, the initial logical block number mapped by a
page can be different from page->index. Hence this commit adds code to
compute the first logical block mapped by the page and also the page
range to be encrypted.
Signed-off-by: Chandan Rajendra
---
fs/ext4/page-io.c | 9
For subpage-sized blocks, this commit adds code to encrypt all zeroed
out blocks mapped by a page.
Signed-off-by: Chandan Rajendra
---
fs/crypto/bio.c | 40 ++--
1 file changed, 18 insertions(+), 22 deletions(-)
diff --git a/fs/crypto/bio.c b/fs/crypto/bio.c
__ext4_block_zero_page_range decrypts the entire page. This commit
decrypts the block to be partially zeroed instead of the whole page.
Signed-off-by: Chandan Rajendra
---
fs/ext4/inode.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
Ext4 and F2FS store verity metadata beyond i_size. This commit adds a
call back pointer to "struct fsverity_operations" which helps in
determining the the real file size limit upto which data can be read
from the file.
This call back will be required in order to get do_mpage_readpage()
to read
The post read processing code is used by both Ext4 and F2FS. Hence to
remove duplicity, this commit moves the code into
include/linux/post_read_process.h and fs/post_read_process.c.
The corresponding decrypt and verity "work" functions have been moved
inside fscrypt and fsverity sources. With
Now that do_mpage_readpage() is "post read process" aware, this commit
gets ext4_readpage[s] to use mpage_readpage[s] and deletes ext4's
readpage.c since the associated functionality is not required anymore.
Signed-off-by: Chandan Rajendra
---
fs/ext4/Makefile | 2 +-
fs/ext4/inode.c|
This commit adds code to make do_mpage_readpage() to be "post read
processing" aware i.e. for files requiring decryption/verification,
do_mpage_readpage() now allocates a context structure and assigns the
corresponding pointer to bio->bi_private. At endio time, a non-zero
bio->bi_private indicates
Ext4 and F2FS store verity metadata in data extents (beyond
inode->i_size) associated with a file. But other filesystems might
choose alternative means to store verity metadata. Hence this commit
adds a callback function pointer to 'struct fsverity_operations' to help
in deciding if verity
For block size < page size, apart from handling bios, post read
processing needs to handle buffer heads. Hence this commit removes the
term "bio" from the identifiers associated with post read processing.
Signed-off-by: Chandan Rajendra
---
fs/crypto/bio.c | 6 ++--
On an error return from fscrypt_decrypt_page(), ext4_block_write_begin()
can return with the page's buffer_head marked with BH_Uptodate
flag. This commit clears the BH_Uptodate flag in such cases.
Signed-off-by: Chandan Rajendra
---
fs/ext4/inode.c | 8 ++--
1 file changed, 6 insertions(+),
On 2019/4/23 13:08, Chengguang Xu wrote:
> We have already checked flag IOCB_DIRECT in the sanity
> check of flag IOCB_NOWAIT, so don't have to check it
> again here.
>
> Signed-off-by: Chengguang Xu
Reviewed-by: Chao Yu
Thanks,
___
This extends the checkpoint option to allow checkpoint=disable:%u
This allows you to specify what percent of the drive you are willing
to lose access to while mounting with checkpoint=disable. If the amount
lost would be higher, the mount will return -EAGAIN.
Currently, we need to run garbage
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git
dev-test
head: 2f7ea3581030c1a146db350dc5d3bf068861145b
commit: 93ed4e0804b3b5e9dc7e2cfe522b0a407ab7198c [15/41] f2fs: add tracepoint
for f2fs_filemap_fault()
reproduce:
# apt-get install sparse
git
On 04/23, Jaegeuk Kim wrote:
> On 04/22, Chao Yu wrote:
> > Previously, f2fs_checkpoint.checksum_offset points fixed position of
> > f2fs_checkpoint structure:
> >
> > "#define CP_CHKSUM_OFFSET 4092"
> >
> > It is unnecessary, and it breaks the consecutiveness of nat and sit
> > bitmap stored
On 04/22, Chao Yu wrote:
> Previously, f2fs_checkpoint.checksum_offset points fixed position of
> f2fs_checkpoint structure:
>
> "#define CP_CHKSUM_OFFSET 4092"
>
> It is unnecessary, and it breaks the consecutiveness of nat and sit
> bitmap stored across checkpoint park block and payload
2019-04-23 4:55 GMT+02:00, Chao Yu :
> On 2019/4/22 18:05, Hagbard Celine wrote:
>> 2019-04-22 11:26 GMT+02:00, Chao Yu :
>>> On 2019/4/22 17:05, Hagbard Celine wrote:
2019-04-22 9:37 GMT+02:00, Chao Yu :
> On 2019/4/22 15:11, Hagbard Celine wrote:
>> With this patch the one problem
2019-04-23 13:59 GMT+02:00, Hagbard Celine :
> 2019-04-23 4:55 GMT+02:00, Chao Yu :
>> On 2019/4/22 18:05, Hagbard Celine wrote:
>>> 2019-04-22 11:26 GMT+02:00, Chao Yu :
On 2019/4/22 17:05, Hagbard Celine wrote:
> 2019-04-22 9:37 GMT+02:00, Chao Yu :
>> On 2019/4/22 15:11, Hagbard
2019-04-23 4:55 GMT+02:00, Chao Yu :
> On 2019/4/22 18:05, Hagbard Celine wrote:
>> 2019-04-22 11:26 GMT+02:00, Chao Yu :
>>> On 2019/4/22 17:05, Hagbard Celine wrote:
2019-04-22 9:37 GMT+02:00, Chao Yu :
> On 2019/4/22 15:11, Hagbard Celine wrote:
>> With this patch the one problem
24 matches
Mail list logo