[PATCH 1/2] encrypt: rename _scratch_mkfs_encrypted to _scratch_check_encrypted

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



From: Xiubo Li <xiubli@xxxxxxxxxx>

For ceph we couldn't check the encryption feature by mkfs, we need
to mount it first and then check the 'get_encpolicy' ioctl cmd.

Signed-off-by: Xiubo Li <xiubli@xxxxxxxxxx>
---
 common/encrypt | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/common/encrypt b/common/encrypt
index 45ce0954..fd620c41 100644
--- a/common/encrypt
+++ b/common/encrypt
@@ -29,7 +29,7 @@ _require_scratch_encryption()
 	# Make a filesystem on the scratch device with the encryption feature
 	# enabled.  If this fails then probably the userspace tools (e.g.
 	# e2fsprogs or f2fs-tools) are too old to understand encryption.
-	if ! _scratch_mkfs_encrypted &>>$seqres.full; then
+	if ! _scratch_check_encrypted &>>$seqres.full; then
 		_notrun "$FSTYP userspace tools do not support encryption"
 	fi
 
@@ -143,7 +143,7 @@ _require_encryption_policy_support()
 	rm -r $dir
 }
 
-_scratch_mkfs_encrypted()
+_scratch_check_encrypted()
 {
 	case $FSTYP in
 	ext4|f2fs)
@@ -171,7 +171,7 @@ _scratch_mkfs_sized_encrypted()
 	esac
 }
 
-# Like _scratch_mkfs_encrypted(), but add -O stable_inodes if applicable for the
+# Like _scratch_check_encrypted(), but add -O stable_inodes if applicable for the
 # filesystem type.  This is necessary for using encryption policies that include
 # the inode number in the IVs, e.g. policies with the IV_INO_LBLK_64 flag set.
 _scratch_mkfs_stable_inodes_encrypted()
@@ -183,7 +183,7 @@ _scratch_mkfs_stable_inodes_encrypted()
 		fi
 		;;
 	*)
-		_scratch_mkfs_encrypted
+		_scratch_check_encrypted
 		;;
 	esac
 }
@@ -923,7 +923,7 @@ _verify_ciphertext_for_encryption_policy()
 			      FSCRYPT_POLICY_FLAG_IV_INO_LBLK_32) )); then
 		_scratch_mkfs_stable_inodes_encrypted &>> $seqres.full
 	else
-		_scratch_mkfs_encrypted &>> $seqres.full
+		_scratch_check_encrypted &>> $seqres.full
 	fi
 	_scratch_mount
 
-- 
2.31.1




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux