Re: Union mounts and file locks (was Re: [PATCH 14/39] union-mount: Union mounts documentation)

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

 



Valerie Aurora:
> Union mounts behaves this way with locks for the same reason as
> fchmod(), etc. on O_RDONLY file descriptors fails.  In-kernel copyup
> only happens before a file descriptor is open.  Once it is open, it is
> very difficult to switch the open file with the newly copied up file
> ("very difficult" meaning "Al Viro refuses to even discuss it").

Laugh, laugh, laugh.
But this is one of the major difference between "union in VFS" and
"union as FS". By the union implemented as FS, the file object will be a
virtual one in a virtual FS, and you can switch two real files on the
layers in the virtual object.


> However, fcntl(F_SETLK) on a file opened read-write will behave
> exactly as expected.  The question is how many applications call
> fcntl(F_SETLK) on a read-only file descriptor as the first lock
> operation on a file?  Of those applications, how many could easily be
> rewritten to open that file descriptor with write permissions?

I don't know.
If users never use such AP or never meet the problem, then there will be
no actual problem.


J. R. Okajima
--
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