[PATCH 00/26] Mount writer count and read-only bind mounts

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

 



The largest change from last time is in patch 25/26.  It has
been reworked to use per-cpu lock instead of a per-node one.
See the patch for more details.

I would also appreciate any close review of patch 08/27.  It
touches a lot of code, and I'm a bit worried that a buglet or
two could have snuck in there.

Note that there are a few stragglers left using IS_RDONLY()
in reiser4 and in some other low-level filesystem code.  The
reiser4 asserts should be just fine left the way they are,
plus reiser4 needs quite a bit of work before merging anyway.
The ntfs usage appears to be internal, and not related to
user activity.

This patch survives running ltp as well as a home-grown set
of filesystem operations here:

	http://sr71.net/~dave/linux/robind-test.sh

---

Why do we need r/o bind mounts?

This feature allows a read-only view into a read-write filesystem.
In the process of doing that, it also provides infrastructure for
keeping track of the number of writers to any given mount.

This has a number of uses.  It allows chroots to have parts of
filesystems writable.  It will be useful for containers in the future
because users may have root inside a container, but should not
be allowed to write to somefilesystems.  This also replaces 
patches that vserver has had out of the tree for several years.

It allows security enhancement by making sure that parts of
your filesystem read-only (such as when you don't trust your
FTP server), when you don't want to have entire new filesystems
mounted, or when you want atime selectively updated.
I've been using the following script to test that the feature is
working as desired.  It takes a directory and makes a regular
bind and a r/o bind mount of it.  It then performs some normal
filesystem operations on the three directories, including ones
that are expected to fail, like creating a file on the r/o
mount.


Signed-off-by: Dave Hansen <haveblue@xxxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux