[f2fs-dev] [PATCH AUTOSEL 4.14 87/95] f2fs: fix to data block override node segment by mistake

2019-05-06 Thread Sasha Levin
From: zhengliang [ Upstream commit a0770e13c8da83bdb64738c0209ab02dd3cfff8b ] v4: Rearrange the previous three versions. The following scenario could lead to data block override by mistake. TASK A| TASK kworker| TASK B

[f2fs-dev] [PATCH AUTOSEL 4.19 69/81] f2fs: fix to data block override node segment by mistake

2019-05-06 Thread Sasha Levin
From: zhengliang [ Upstream commit a0770e13c8da83bdb64738c0209ab02dd3cfff8b ] v4: Rearrange the previous three versions. The following scenario could lead to data block override by mistake. TASK A| TASK kworker| TASK B

Re: [f2fs-dev] [RFC PATCH 0/7] xfstests: verify fscrypt-encrypted contents and filenames

2019-05-06 Thread Eric Biggers
On Fri, Apr 26, 2019 at 01:41:46PM -0700, Eric Biggers wrote: > Hello, > > This series adds xfstests which verify that encrypted contents and > filenames on ext4 and f2fs are actually correct, i.e. that the > encryption uses the correct algorithms, keys, IVs, and padding amounts. > The new tests

Re: [f2fs-dev] [PATCH 06/13] fscrypt: support encrypting multiple filesystem blocks per page

2019-05-06 Thread Chandan Rajendra
On Thursday, May 2, 2019 4:15:08 AM IST Eric Biggers wrote: > From: Eric Biggers > > Rename fscrypt_encrypt_page() to fscrypt_encrypt_pagecache_blocks() and > redefine its behavior to encrypt all filesystem blocks from the given > region of the given page, rather than assuming that the region

Re: [f2fs-dev] [PATCH 08/13] fscrypt: introduce fscrypt_decrypt_block_inplace()

2019-05-06 Thread Chandan Rajendra
On Thursday, May 2, 2019 4:15:10 AM IST Eric Biggers wrote: > From: Eric Biggers > > fscrypt_decrypt_page() behaves very differently depending on whether the > filesystem set FS_CFLG_OWN_PAGES in its fscrypt_operations. This makes > the function difficult to understand and document. It also

Re: [f2fs-dev] [PATCH 09/13] fscrypt: support decrypting multiple filesystem blocks per page

2019-05-06 Thread Chandan Rajendra
On Thursday, May 2, 2019 4:15:11 AM IST Eric Biggers wrote: > From: Eric Biggers > > Rename fscrypt_decrypt_page() to fscrypt_decrypt_pagecache_blocks() and > redefine its behavior to decrypt all filesystem blocks in the given > region of the given page, rather than assuming that the region

Re: [f2fs-dev] [PATCH 05/13] fscrypt: introduce fscrypt_encrypt_block_inplace()

2019-05-06 Thread Chandan Rajendra
On Thursday, May 2, 2019 4:15:07 AM IST Eric Biggers wrote: > From: Eric Biggers > > fscrypt_encrypt_page() behaves very differently depending on whether the > filesystem set FS_CFLG_OWN_PAGES in its fscrypt_operations. This makes > the function difficult to understand and document. It also

Re: [f2fs-dev] [PATCH 07/13] fscrypt: handle blocksize < PAGE_SIZE in fscrypt_zeroout_range()

2019-05-06 Thread Chandan Rajendra
On Thursday, May 2, 2019 4:15:09 AM IST Eric Biggers wrote: > From: Eric Biggers > > Adjust fscrypt_zeroout_range() to encrypt a block at a time rather than > a page at a time, so that it works when blocksize < PAGE_SIZE. > > This isn't optimized for performance, but then again this function >

Re: [f2fs-dev] [PATCH 13/13] ext4: encrypt only up to last block in ext4_bio_write_page()

2019-05-06 Thread Chandan Rajendra
On Thursday, May 2, 2019 4:15:15 AM IST Eric Biggers wrote: > From: Eric Biggers > > As an optimization, don't encrypt blocks fully beyond i_size, since > those definitely won't need to be written out. Also add a comment. > > This is in preparation for allowing encryption on ext4 filesystems

Re: [f2fs-dev] [PATCH 04/13] fscrypt: clean up some BUG_ON()s in block encryption/decryption

2019-05-06 Thread Chandan Rajendra
On Thursday, May 2, 2019 4:15:06 AM IST Eric Biggers wrote: > From: Eric Biggers > > Replace some BUG_ON()s with WARN_ON_ONCE() and returning an error code, > and move the check for len divisible by FS_CRYPTO_BLOCK_SIZE into > fscrypt_crypt_block() so that it's done for both encryption and >

[f2fs-dev] [PATCH v4 2/2] sload.f2fs: introduce f2fs_sparse_initialize_meta()

2019-05-06 Thread Chao Yu
This patch fixes to initialize NAT/SIT/CP.payload region in sparse file mode for sload. Signed-off-by: Chao Yu --- - move initialize_meta() before do_umount(). fsck/fsck.h | 1 + fsck/main.c | 4 +++ fsck/mount.c | 70 3 files changed, 75

[f2fs-dev] [PATCH v3 2/2] f2fs-tools: introduce f2fs_update_sparse_file()

2019-05-06 Thread Chao Yu
This patch fixes to initialize NAT/SIT/CP.payload region in sparse file mode for fsck/sload/resize/defrag/dump tools. Signed-off-by: Chao Yu --- v3: - print message after variable assignment. - use DEFAULT_BLOCKS_PER_SEGMENT instead of get_sb(log_blocks_per_seg). fsck/fsck.h | 1 +