This is against 2.6.24-rc1 + recent git. I've integrated all of the fixes from mm, and included cleanups in a different order. This also includes some extra fput-time checking to ensure that we have balanced mount writer counts. These replace the patches in -mm mostly because the new fixes require some cleanups that are functionally independent from the r/o bind mount code itself. These fixes precent the rest of the set and require some by hand merging. If you're going to review one and only one patch, 17/27 (the one for "opend" files) is the most critical. --- 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 are 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 this script: http://sr71.net/~dave/linux/robind-test.sh 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 <[email protected]> - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- [PATCH 27/27] keep track of mnt_writer state of struct file
- From: Dave Hansen <[email protected]>
- [PATCH 25/27] r-o-bind-mounts-track-number-of-mount-writers-make-lockdep-happy-with-r-o-bind-mounts
- From: Dave Hansen <[email protected]>
- [PATCH 26/27] r-o-bind-mounts-honor-r-w-changes-at-do_remount-time
- From: Dave Hansen <[email protected]>
- [PATCH 22/27] r-o-bind-mounts-nfs-check-mnt-instead-of-superblock-directly
- From: Dave Hansen <[email protected]>
- [PATCH 24/27] r-o-bind-mounts-track-number-of-mount-writers
- From: Dave Hansen <[email protected]>
- [PATCH 23/27] r-o-bind-mounts-sys_mknodat-elevate-write-count-for-vfs_mknod-create
- From: Dave Hansen <[email protected]>
- [PATCH 19/27] r-o-bind-mounts-elevate-writer-count-for-chown-and-friends
- From: Dave Hansen <[email protected]>
- [PATCH 21/27] r-o-bind-mounts-make-access-use-mnt-check
- From: Dave Hansen <[email protected]>
- [PATCH 20/27] r-o-bind-mounts-elevate-writer-count-for-do_sys_truncate
- From: Dave Hansen <[email protected]>
- [PATCH 18/27] r-o-bind-mounts-elevate-write-count-over-calls-to-vfs_rename
- From: Dave Hansen <[email protected]>
- [PATCH 17/27] r-o-bind-mounts-elevate-write-count-opend-files
- From: Dave Hansen <[email protected]>
- [PATCH 16/27] r-o-bind-mounts-elevate-write-count-for-some-ioctls
- From: Dave Hansen <[email protected]>
- [PATCH 12/27] r-o-bind-mounts-elevate-write-count-for-do_sys_utime-and-touch_atime
- From: Dave Hansen <[email protected]>
- [PATCH 15/27] r-o-bind-mounts-elevate-write-count-for-link-and-symlink-calls
- From: Dave Hansen <[email protected]>
- [PATCH 11/27] r-o-bind-mounts-elevate-write-count-during-entire-ncp_ioctl
- From: Dave Hansen <[email protected]>
- [PATCH 14/27] r-o-bind-mounts-elevate-write-count-for-file_update_time
- From: Dave Hansen <[email protected]>
- [PATCH 13/27] r-o-bind-mounts-elevate-write-count-for-do_utimes
- From: Dave Hansen <[email protected]>
- [PATCH 07/27] r-o-bind-mounts-do_rmdir-elevate-write-count
- From: Dave Hansen <[email protected]>
- [PATCH 01/27] do namei_flags calculation inside open_namei()
- From: Dave Hansen <[email protected]>
- [PATCH 10/27] r-o-bind-mounts-elevate-mount-count-for-extended-attributes
- From: Dave Hansen <[email protected]>
- [PATCH 09/27] r-o-bind-mounts-elevate-mnt-writers-for-vfs_unlink-callers
- From: Dave Hansen <[email protected]>
- [PATCH 06/27] r-o-bind-mounts-stub-functions
- From: Dave Hansen <[email protected]>
- [PATCH 08/27] r-o-bind-mounts-elevate-mnt-writers-for-callers-of-vfs_mkdir
- From: Dave Hansen <[email protected]>
- [PATCH 05/27] rename open_namei() to open_pathname()
- From: Dave Hansen <[email protected]>
- [PATCH 04/27] kill filp_open()
- From: Dave Hansen <[email protected]>
- [PATCH 03/27] kill do_filp_open()
- From: Dave Hansen <[email protected]>
- [PATCH 02/27] make open_namei() return a filp
- From: Dave Hansen <[email protected]>
- [PATCH 27/27] keep track of mnt_writer state of struct file
- Prev by Date: [PATCH 08/27] r-o-bind-mounts-elevate-mnt-writers-for-callers-of-vfs_mkdir
- Next by Date: [PATCH 06/27] r-o-bind-mounts-stub-functions
- Previous by thread: Linux 2.6.16.56
- Next by thread: [PATCH 02/27] make open_namei() return a filp
- Index(es):