[Mesa-dev] [PATCH] tests/cache_test: allow crossing mount points
Juan A. Suarez Romero
jasuarez at igalia.com
Tue Mar 28 15:58:03 UTC 2017
On Tue, 2017-03-28 at 17:50 +0200, Nicolai Hähnle wrote:
> The crossing happens because I'm running it inside a docker container,
> > which uses internally an overlayfs. This means that some of those
> > subdirectories can be in one mountpoint and others in other mountpoint.
> > This seems to be how nftw() call handles this overlayfs.
>
> I still don't quite get it. My understanding is that overlayfs allows
> you to merge two directory trees, e.g. for setups where you have a
> read-only base, and a writable "overlay" which gets used during some
> operation and then thrown away.
>
> If ntfw fails to remove some files, then which ones are in the overlay
> and which ones in the "underlay"?
>
> Or... oh wait. Here's what the kernel docs say:
>
> This approach is 'hybrid' because the objects that appear in the
> filesystem do not all appear to belong to that filesystem. In many
> cases an object accessed in the union will be indistinguishable
> from accessing the corresponding object from the original filesystem.
> This is most obvious from the 'st_dev' field returned by stat(2).
>
> So it seems the issue is that the directories themselves are considered
> to belong to the overlayfs itself, while the created files of the cache
> belong to the "overlay" (temporary) filesystem? That's annoying, but
> there's nothing we can do about it. The patch is:
>
Yeah, seems so. It's a nasty bug, but as nftw() is only used in the
test, I think it is safe to remove the flag.
Thanks for reviewing it!
> Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
More information about the mesa-dev
mailing list