@@ -153,6 +153,23 @@ _scratch_check_encrypted()
# erase the UBI volume; reformated automatically on next mount
$UBIUPDATEVOL_PROG ${SCRATCH_DEV} -t
;;
+ ceph)
+ # Try to mount the filesystem. We need to check whether the encryption
+ # is support or not via the ioctl cmd, such as 'set_encpolicy'.
+ if ! _try_scratch_mount &>>$seqres.full; then
+ _notrun "kernel is unaware of $FSTYP encryption feature," \
+ "or mkfs options are not compatible with encryption"
+ fi
+
+ mkdir $SCRATCH_MNT/tmpdir
+ if _set_encpolicy $SCRATCH_MNT/tmpdir 2>&1 >>$seqres.full | \
+ grep -Eq 'Inappropriate ioctl for device|Operation not supported'
+ then
+ _notrun "kernel does not support $FSTYP encryption"
+ fi
+ rmdir $SCRATCH_MNT/tmpdir
+ _scratch_unmount
+ ;;
*)
_notrun "No encryption support for $FSTYP"
;;