IRC context from today:
didrocks | apw: I just tried t_name_to_handle_at.c from man name_to_handle_at
apw | didrocks, it seems to be returning ENOSUPP for me
apw | didrocks, well it failed, as expected
didrocks | apw: so, I guess this is expected that overlayfs doesn't support it
didrocks | hum, I wonder how I can detect if a file is a mount point (meaning, I guess, in that context, being overridden)
didrocks | apw: the systemd logic is to test a path, test the parent path, and check mount_id
didrocks | the fallback is using stat()
didrocks | and comparing st_dev
apw | which sounds ok ?
apw | oh perhaps not if the path is a file and the parent a directory
didrocks | apw: yeah, that exactly what happens here, path is file, parent a dir
apw | its not clear that name_to_handle_at would work any better if it did work of course
apw | this seems like an odd way to work out what is a mountpoint to me, then again it is systemd
didrocks | apw: just run a test, and I confirm that st_dev is different if path == file from parent == dir.
didrocks | apw: hum, yeah, seems tricky to even think of a workaround…
didrocks | the easiest way would be to take another file (if any) into the same dir, but doesn't seem efficient…
IRC context from today: to_handle_ at.c from man name_to_handle_at
didrocks | apw: I just tried t_name_
apw | didrocks, it seems to be returning ENOSUPP for me
apw | didrocks, well it failed, as expected
didrocks | apw: so, I guess this is expected that overlayfs doesn't support it
didrocks | hum, I wonder how I can detect if a file is a mount point (meaning, I guess, in that context, being overridden)
didrocks | apw: the systemd logic is to test a path, test the parent path, and check mount_id
didrocks | the fallback is using stat()
didrocks | and comparing st_dev
apw | which sounds ok ?
apw | oh perhaps not if the path is a file and the parent a directory
didrocks | apw: yeah, that exactly what happens here, path is file, parent a dir
apw | its not clear that name_to_handle_at would work any better if it did work of course
apw | this seems like an odd way to work out what is a mountpoint to me, then again it is systemd
didrocks | apw: just run a test, and I confirm that st_dev is different if path == file from parent == dir.
didrocks | apw: hum, yeah, seems tricky to even think of a workaround…
didrocks | the easiest way would be to take another file (if any) into the same dir, but doesn't seem efficient…