[RFC][PATCH 0/2] xfstests on ubifs
Eric Biggers
ebiggers3 at gmail.com
Mon Dec 19 11:25:20 PST 2016
On Mon, Dec 19, 2016 at 08:12:07PM +0100, Richard Weinberger wrote:
>
> > Note 2: since mkfs.ubifs doesn't support creating encryption-capable filesystems
> > yet (ubifs v5), to get the encryption tests to work I also had to hack
> > _scratch_mkfs_encrypted() to use ubirmvol/ubimkvol instead of mkfs. I assume
> > that the ubifs developers are planning to update mkfs.ubifs.
>
> You don't have to run mkfs.ubifs, just mount an empty UBI volume, UBIFS will auto-
> crate a encryption capable fs.
Yeah, that's what I ended up doing. I didn't include it in the official patch
since it was a complete hack, but here's what I did. Of course the real
solution would be to update mkfs.ubifs and then just use _scratch_mkfs:
diff --git a/common/encrypt b/common/encrypt
index f09104d..261a1f7 100644
--- a/common/encrypt
+++ b/common/encrypt
@@ -71,6 +71,11 @@ _scratch_mkfs_encrypted()
ext4|f2fs)
_scratch_mkfs -O encrypt
;;
+ ubifs)
+ local ubi=${SCRATCH_DEV%_0}
+ ubirmvol $ubi -N vol
+ ubimkvol $ubi -N vol -m
+ ;;
*)
_notrun "No encryption support for $FSTYP"
;;
More information about the linux-mtd
mailing list