Re: Union mounts and fchown/fchmod/utimensat

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

 



On Tue, Mar 30, 2010 at 07:16:18AM -0400, Theodore Tso wrote:
> Hmmm....   do we also need to worry about read-only fd's of directories, and interaction with the *at() system calls.   For example:
> 
> 	int renameat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath)
> 
> ... where olddirfd and newdirfd might be r/o file descriptors for directories participating in a Union mount?
> 
> This is just one example, of course.   There's also openat(), symlinkat(), etc.

Directories are always copied up in this version of union mounts, so
it doesn't matter whether you open a directory O_RDONLY or not, you'll
always have the topmost version and see all the effects of link(),
linkat(), rename(), renameat(), etc.  It's only with files that you
can get a stale copy if you open it O_RDONLY and it gets modified
through some other path.

Always copying up directories solves a lot of problems.  I managed to
eliminate several hundred lines of code with that change in the
design.

-VAL
--
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