tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Making forced unmounts work

On Thu, Dec 06, 2012 at 10:32:01AM +0000, Julian Yon wrote:
 > I think you could take some inspiration from Linux here: it has a very
 > handy umount -l which detaches the filesystem from the tree, but defers
 > the rest of the unmount/cleanup until the fs is no longer busy. This
 > can help in situations where you're not trying to physically remove
 > media but just need to reclaim the mount point, and therefore have no
 > immediate need for a umount -f. Because no process can open anything
 > new on the detached fs, if it eventually unwedges itself somehow it
 > won't get rewedged.

Yes, I've talked about supporting that elsewhere (maybe not on
tech-kern, or at least not recently) -- allowing it has basically no
downside, but it requires infrastructure we don't currently have.

(Most notably, if you umount -l a hanging nfs volume and then later
want to umount -f it, you need to be able to address the leftovers
somehow; currently because it isn't in the fs namespace any more and
it isn't associated with a device, there's no way to refer to it. I'm
not sure how, if at all, Linux copes with this case.)

Also it requires splitting the current struct mount into two parts,
the filesystem and the mounting of that filesystem; but that's
desirable in the long run for other reasons as well, such as
supporting plan9-type rebind mounts.

David A. Holland

Home | Main Index | Thread Index | Old Index