Re: loopbackdevice as a module with kerneld

Theodore Ts'o (tytso@mit.edu)
Wed, 28 Feb 1996 23:49:46 -0500


Date: Wed, 28 Feb 1996 10:50:28 +0100 (MET)
From: Matthias Sattler <m_sattle@informatik.uni-kl.de>

I think the loopback device should have a usagecount of 1 when it is
configured, so that it can safely be loaded by kerneld. Imagine the
following scenario:

But if you do this, the loopback device will never get unloaded!

The loopbackdevice is a module and should be loaded by kerneld.
You do: losetup /dev/loop0 a_file (=> kerneld loads the module)
Then you wait > 1 min and want to mount it, but it is gone, because kerneld
has removed the module.

Well, when a file is associated with a loop device, then the usage count
should be incremented. When the file is disassociated with the loop
device, then the usage count should be decremented. That will cause the
right thing to happen automatically.

- Ted