[lkml]   [2004]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH] Bind Mount Extensions 0.04


The following patch extends the 'noatime', 'nodiratime' and
last but not least the 'ro' (read only) mount option to the
vfs --bind mounts, allowing them to behave like any other
mount, by honoring those mount flags (which are silently
ignored by the current implementation)

an older version of this patch was included in 2.6.0-test6-mm2,
and it is currently used by several people, without any issues,
so I'd kindly request to consider it for inclusion into mainline.

if the size of the patch is an issue, I can break it down into
three parts, one preparing the existing structures, one adding
noatime/nodiratime and one doing the read only stuff.

the patch makes the following syscalls behave like expected

- open (read/write/trunc), create
- link, symlink, unlink
- mknod (reg/block/char/fifo), mkfifo
- mkdir, rmdir
- (f)chown, (f)chmod, utime
- access, truncate, mmap
- ioctl (gen/ext2/ext3/reiser)

the following cases where verified for --bind ro (test tool)
and showed no difference to a 'real' ro mounted filesystem:

- open()
- O_RDONLY: file, dir, symlink, broken, cdev, bdev, fifo, new
- O_WRONLY: file, dir, symlink, broken, cdev, bdev, fifo, new
- O_RDWR: file, dir, symlink, broken, cdev, bdev, fifo, new
- O_CREAT: file

- mkdir() dir, new, invalid
- mkfifo() fifo, new, invalid

- mknod()
- S_IFREG: file, new, invalid
- S_IFCHR: cdev, new, invalid
- S_IFBLK: bdev, new, invalid
- S_IFIFO: fifo, new, invalid

- chown() file, invalid - fchown() file
- chmod() file, invalid - fchmod() file

- link() file/file, file/invalid, invalid/file
- symlink() file/file, file/invalid, invalid/file

- rename() file/file, file/invalid, invalid/file
- rmdir() dir, new, invalid
- truncate() file, new invalid - ftruncate() file

- unlink() file, bdev, cdev, fifo, new, invalid

you can download them here, if you prefer that over
extracting them from emails ...


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:01    [W:0.033 / U:3.336 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site