[Bug libc/23281] FTW_MOUNT must not rely on st_dev to check whether a file is in the same mountpoint
fabian@ritter-vogt.de
sourceware-bugzilla@sourceware.org
Wed Jun 13 20:11:00 GMT 2018
https://sourceware.org/bugzilla/show_bug.cgi?id=23281
--- Comment #2 from Fabian Vogt <fabian@ritter-vogt.de> ---
(In reply to Florian Weimer from comment #1)
> I think this is just another case where overlayfs is simply not
> POSIX-conforming.
This seems to be a topic that comes up regularly with overlayfs - apparently it
was a conscious decision (and explicitly documented) that it behaves that way.
Not sure what can be done at this point.
> Hypothetically, what could we do about this in glibc?
>
> Is there any other way to test whether the two files are on the same
> mountpoint? kcmp does not appear to offer this.
A rather ugly way is to read in /proc/self/mountinfo and compare paths...
The way find handles -xdev is that it only compares st_dev of directories and
not files. Which shouldn't be a behaviour change except for bind-mounted files.
Those are fortunately rather rare.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list