My brain hurts. (Messing with mount.)

Denis Vlasenko vda at ilport.com.ua
Thu Mar 9 22:25:42 PST 2006


On Thursday 09 March 2006 19:33, Rob Landley wrote:
> On Thursday 09 March 2006 2:06 am, Denis Vlasenko wrote:
> > > > What will "mount file file" do? Will it also do a --bind mount?
> > >
> > > It'll complain that the target isn't a directory.
> > >
> > > For _any_ mount to make sense, the target must be a directory.  That's
> > > part of the definition of mount, everything gets mounted on a directory.
> >
> > No. mount --bind works on files too:
> 
> That's...
> 
> Why on _earth_ would they do that?  Is that intentional?  They introduced some 
> weird vfs-level way of doing a cross-mount hardlink?

Yes, it's not a side effect. Al Viro (IIRC) specifically wanted that
to be possible.

> Except that in this  
> case there must be an existing file, which you hide by doing the bind?

Quick googling for real-world use of this feature gives:

http://www.seanius.net/geek/amd64/cedega-hl2-amd64.html
http://www.sslug.dk/emailarkiv/bog/2002_04/msg00015.html

> I'm not worrying about supporting that right now.  If ever.

This functionality can always be added later.
--
vda


More information about the busybox mailing list