Re: [PATCH -next] ovl: respect underlying filesystem's get_unmapped_area()

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

 




在 2024/12/6 21:58, Matthew Wilcox 写道:
On Thu, Dec 05, 2024 at 10:30:38PM +0800, Jinjiang Tu wrote:
During our tests in containers, there is a read-only file (i.e., shared
Show your test.

I mmap an overlayfs file with PROT_READ, and call madvise(MADV_COLLAPSE), the code
is as follows:

	fd = open(path, O_RDONLY);
	addr = mmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, 0);
	ret = madvise(addr, size, MADV_COLLAPSE);

The addr isn't THP-aligned and ret is -1, errno is EINVAL.






[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