Re: [RFC PATCH 1/2] ovl: skip checking lower file's write permisson on truncate

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

 



 ---- 在 星期二, 2021-07-20 23:19:16 Miklos Szeredi <miklos@xxxxxxxxxx> 撰写 ----
 > On Tue, 20 Jul 2021 at 16:35, Miklos Szeredi <miklos@xxxxxxxxxx> wrote:
 > >
 > > On Sat, 24 Apr 2021 at 16:04, Chengguang Xu <cgxu519@xxxxxxxxxxxx> wrote:
 > > >
 > > > Lower files may be shared in overlayfs so strictly checking write
 > > > perssmion on lower file will cause interferes between different
 > > > overlayfs instances.
 > >
 > > How so?
 > >
 > > i_writecount on lower inode is not modified by overlayfs (at least not
 > > in this codepath).  Which means that there should be no interference
 > > between overlayfs instances sharing a lower directory tree.
 > 
 > I'm beginning to see what you are worrying about.
 > 
 > So on one instance a file on lower gets executed and on another
 > instance sharing the lower layer the file is truncated.  The truncate
 > is currently denied due to the negative i_writecount on the lower
 > file.  Also behavior is inconsistent between open(path, O_TRUNC) and
 > truncate(path) even though the two should be equivalent.

Yeah, that's it.
Thanks for applying the patch and supplementary description.

Thanks,
Chengguang




[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux