Re: btrfs multiple mounts stacked on the same mount point

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

 



Anand Jain posted on Wed, 12 Feb 2014 11:37:35 +0800 as excerpted:

> On 02/12/14 04:57 AM, Duncan wrote:
>> Anand Jain posted on Tue, 11 Feb 2014 16:18:02 +0800 as excerpted:
>>
>>> per mount(2)
>>>
>>>    ---
>>>     multiple mounts can be stacked on the same mount point.
>>>    ---
>>>
>>> In this situation how could ioctl communicate (using mount point)
>>> with each FS stacked on the same mount point ?
>>>
>>> BTW I don't understand the need for multiple mounts on the same
>>> mount point ?
>>
>> That principle of over-mount obscuring what's beneath it should apply
>> to the ioctls as well.  They will always communicate with the top
>> mounted layers. [Since] an over-mount obscuring under-mounts is how
>> Linux normally works[,] not being able to access under-mounts is the
>> normal state of affairs. =:^)

> In the context of btrfs,
>   what is the critical need of this feature ?
>     OR
>   what is that it can't do without this feature ?

IMO btrfs shouldn't behave any different than any other filesystem in 
this regard, and in fact, I'd /guess/ that btrfs has little to do with it 
since that's surely handled at the general VFS layer, except perhaps 
btrfs might need to ensure that if multiple filesystems are mounted at 
the same mountpoint, the expected (that being top) one always gets the 
ioctls.  Anything underneath the top layer should be ignored, regardless 
of whether the given mountpoint is /home and it's / underneath, or 
whether it's two filesystems mounted on /home, such that the last one 
mounted always gets the ioctls.

BTW, another (general) reason over-mounts are sometimes used is to 
deliberately obscure what's underneath.  It's worth noting that anything 
with a file already open on the underlying filesystem still has access to 
that file after something else is mounted over top, and that fact is 
sometimes used to control access to certain files/filesystems, by 
starting whatever it is that needs to access them and letting them open 
the files they need, then over-mounting a different filesystem, often 
empty, so no other applications can access the under-mounted files.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman

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




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux