On Fri, Aug 27, 2004 at 09:56:39AM +0100, Anton Altaparmakov wrote:
> If it is created on the fly, it should be "easy" to destroy on the fly
> using time-based expiry, i.e. a kernel daemon going over all of those
> beasts every X seconds (X = 5 perhaps?) and doing something like:
>
> for (each vfsmount) {
> lock_vfsmount(vfsmount);
> if (MOUNT_IS_BUSY(vfsmount)) {
> unlock_vfsmount(vfsmount);
> continue;
> }
> if (current_time() < (vfsmount->last_used_time +
> vfsmount->expire_after)) {
> unlock_vfsmount(vfsmount);
> continue;
> }
> destroy_locked_vfsmount(vfsmount);
> }
>
> Wouldn't that work?
That would work for a low number of them. But with Hans' "visions" we'd
have a damn lot of them at which point this isn't really scalable.