Re: Loop Encryption

Andrew E. Mileski (aem@netcom.ca)
Sat, 31 May 1997 17:59:17 -0400 (EDT)


> The last time I was working with the loop encryption I managed to really screw up my system. The kernel got into an internal loop, causing the process to go into an uninterruptable sleep. This then caused all kinds of problems and made me unable to unmount the filesystem. I don't remember, but I don't think it would sync either.
>
> I managed to do that by creating a file, pointing a loop device at it, mounting it encrypted, making a filesystem, then mounting another encrypted filesystem under that.
>
> "Don't do that." :)

Thanks to a hint from Andries Brouwer, I think I've squashed this bug :-)
Before I announce victory, I need to get a question answered:

What's the difference between BH_Locked and BH_Protected?

Using BH_Protected seems to work for the loop driver - buffers for the
requests it creates cannot be freed until the loop driver is finished
with them [or so I'm led to believe by the ramdisk driver].

While I'm here, two more questions:
Does calling schedule() set "current" to the next run-able process
if "current" is already run-able? If no, then how do you do this?

Is there a utility that does the ioctls on the ramdisk driver,
or do you have to re-invent the wheel?

--
Andrew E. Mileski   mailto:aem@netcom.ca
Linux Plug-and-Play Hardware Support http://www.redhat.com/linux-info/pnp/
XFree86 Matrox Team http://www.bf.rmit.edu.au/~ajv/xf86-matrox.html