Re: [PATCH] Allow auto-destruction of loop devices.

From: Jan Engelhardt
Date: Tue Oct 30 2007 - 16:05:56 EST



On Oct 30 2007 13:01, Andrew Morton wrote:
>On Sun, 28 Oct 2007 19:08:31 -0400
>David Woodhouse <dwmw2@xxxxxxxxxxxxx> wrote:
>
>> This allows a flag to be set on loop devices so that when they are
>> closed for the last time, they'll self-destruct.
>>
>
>Why do we want to do this?

Off the top of my head, lazy unmounting comes to mind.
Think of this:

mount foobar /mnt -o loop;
cd /mnt;
umount /mnt;

Currently, this leaves /dev/loop0 assigned, either chewing up loop
places or needlessy exposing objects meant to be rather not
accessible. (Think cryptoloop devices -- and pam_mount.) BTW, such a
flag would also really be useful for dm(-crypt).

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/