ovlfs: cannot read latest data from read only fd

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

 



Hi:
We found that we cannot read the latest data from an opened file(eg: "testfile") in overlayfs
which was opened in read-only mode(this file was originally located in the lowerdir and
mapped in the mergedir, and then was copied to upperdir when someone added some data later).

	For example:

	lower: testfile(empty)
	upper: empty
	work: empty
	merge: empty
	
	mount -t overlay -o lowerdir=lower,upperdir=upper,workdir=work overlayfs merge

	1) fd1 = open("merge/testfile", O_RDONLY);
	2) fd2 = open("merge/testfile", O_WRONLY | O_APPEND);
           then we write some new data to fd2.
	3) read data form fd1.

	expect results: we read data which was written used by fd2.
	reality results: nothing.

We cannot read data from the copied file in the upperdir use fd1, so do we need to fix it?

Thanks,
zhangyi

--
To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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