Re: [f2fs-dev] [PATCH 3/5] f2fs-tools: Improve zoned model check

2019-03-20 Thread Chao Yu
On 2019/3/18 14:39, Damien Le Moal wrote: > Return an error if an unknown zoned model is reported for a device. > > Signed-off-by: Damien Le Moal Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net

Re: [f2fs-dev] [PATCH 2/5] f2fs-tools: Add f2fs_io to .gitignore

2019-03-20 Thread Chao Yu
On 2019/3/18 14:39, Damien Le Moal wrote: > GIT ignore compiled executable tools/f2fs_io/f2fs_io. > > Signed-off-by: Damien Le Moal Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.

Re: [f2fs-dev] [PATCH 1/5] f2fs-tools: Fix various compilation warnings

2019-03-20 Thread Chao Yu
On 2019/3/18 14:39, Damien Le Moal wrote: > Avoid various compilation warnings due to strncpy: > > libf2fs.c:590:33: warning: ‘snprintf’ output may be truncated before > the last format character [-Wformat-truncation=] > snprintf(rootdev, ret, "/dev/%s", buf); > > ../include/f2fs_fs.h:1384:2: w

[f2fs-dev] [PATCH v2 5/5] fscrypt: fix race where ->lookup() marks plaintext dentry as ciphertext

2019-03-20 Thread Eric Biggers
From: Eric Biggers ->lookup() in an encrypted directory begins as follows: 1. fscrypt_prepare_lookup(): a. Try to load the directory's encryption key. b. If the key is unavailable, mark the dentry as a ciphertext name via d_flags. 2. fscrypt_setup_filename(): a. Try to load th

[f2fs-dev] [PATCH v2 4/5] fscrypt: only set dentry_operations on ciphertext dentries

2019-03-20 Thread Eric Biggers
From: Eric Biggers Plaintext dentries are always valid, so only set fscrypt_d_ops on ciphertext dentries. Besides marginally improved performance, this allows overlayfs to use an fscrypt-encrypted upperdir, provided that all the following are true: (1) The fscrypt encryption key is placed i

[f2fs-dev] [PATCH v2 0/5] fscrypt: d_revalidate fixes and cleanups

2019-03-20 Thread Eric Biggers
From: Eric Biggers This patch series improves dentry revalidation in fscrypt. To recap, fscrypt (aka ext4/f2fs/ubifs encryption) encrypts both file contents and file names in individual directory trees. A single filesystem can contain many encrypted directory trees using many different encrypti

[f2fs-dev] [PATCH v2 1/5] fscrypt: clean up and improve dentry revalidation

2019-03-20 Thread Eric Biggers
From: Eric Biggers Make various improvements to fscrypt dentry revalidation: - Don't try to handle the case where the per-directory key is removed, as this can't happen without the inode (and dentries) being evicted. - Flag ciphertext dentries rather than plaintext dentries, since it's ciph

[f2fs-dev] [PATCH v2 2/5] fscrypt: fix race allowing rename() and link() of ciphertext dentries

2019-03-20 Thread Eric Biggers
From: Eric Biggers Close some race conditions where fscrypt allowed rename() and link() on ciphertext dentries that had been looked up just prior to the key being concurrently added. It's better to return -ENOKEY in this case. This avoids doing the nonsensical thing of encrypting the names a se

[f2fs-dev] [PATCH v2 3/5] fs, fscrypt: clear DCACHE_ENCRYPTED_NAME when unaliasing directory

2019-03-20 Thread Eric Biggers
From: Eric Biggers Make __d_move() clear DCACHE_ENCRYPTED_NAME on the source dentry. This is needed for when d_splice_alias() moves a directory's encrypted alias to its decrypted alias as a result of the encryption key being added. Otherwise, the decrypted alias will incorrectly be invalidated