Hi All, I would like to know the mount target for a given directory. In kernel, is there an API to get the information? Ex: /system/bin -> /system /system/bin is a directory its mount partition is /system. Similarly, I would like to get the target for a given path(Parsing is not right as a target can be mounted to anywhere). Best Regards, Sandeep Kumar
On Wed, 04 Feb 2015 16:23:26 +0900, manty kuma said:
I would like to know the mount target for a given directory. In kernel, is there an API to get the information?
Explain what problem you're trying to solve. Your example: /system/bin is a directory its mount partition is /system. isn't very clear on what you mean. Do you mean "I did a mount /dev/foox4 /mnt/wombats and now I want to find /dev/foox4", or did you mean "given a pathname or inode, what filesystem is it on?" (Bonus points for explaining what your solution should do with bind mounts and overlayfs and other exotic stuff like that)
participants (2)
-
manty kuma -
Valdis.Kletnieks@vt.edu