Problem with losetup

Felix Blanke felixblanke at gmail.com
Tue Jan 25 05:04:27 EST 2011


Hi,

I've a problem with the losetup when it is patched with loop-aes.

If I'm using the unpatched losetup (from util-linux-ng) and looping a
device like

/dev/disk/by-id/ata-WDC_WD6400AAKS-22A7B2_WD-WCASY7780706-part3

it is using readlink to track down the link to e.g. /dev/sda3. But if
I'm using the patched losetup I don't see any readlink in the strace.
Because no readlink is used there is a problem with device names which
have more then 64 characters (the field "lo_name" is an array of 64
char). It is truncated like

/dev/loop0: [0010]:6229
(/dev/disk/by-id/ata-INTEL_SSDSA2M160G2GC_CVPO939201JX160AGN-par)
encryption=AES128

That does make trouble with e.g. btrfs, because mkfs.btrfs uses the
devicename provided by losetup to check if a device is mounted. That
can't work with an incomplete devicename.

Any thought on this problem?


Regards,
Felix



More information about the Linux-crypto mailing list