Lack of visibility of mountpoint for mtp under /proc/#

Please refer to the discussion here for background that raised this question.

Does anyone know why there is an inconsistency (or oversight?) regarding the reporting of devices mounted via mtp, when examining the reports of each of

  • /proc/{processID}/mountinfo
  • /proc/{processID}/mounts
  • /proc/{processID}/mountstats ?

Surely, mounts, mountinfo, mountstats are not intended to provide the same information. There must be some difference between them. Otherwise, there were not all three of them, is not it?

Hopefully, the following links may shed some light on the subject.

https://man7.org/linux/man-pages/man7/mount_namespaces.7.html
https://man7.org/linux/man-pages/man5/proc_pid_mounts.5.html
https://man7.org/linux/man-pages/man5/proc_pid_mountinfo.5.html
https://www.man7.org/linux/man-pages/man5/proc_pid_mountstats.5.html

1 Like

Sorry, Eugene, and thank you for all those links.

I guess I should have been more specific in my question.

Why do none of those show any reference to the mtp://{mountpoint} path that I was hoping to locate for the process in question?

Anyway, as I pointed out in a subsequent posting on that other discussion, I identified some restrictions on how to get to that desired path.

No problem, Eric.

I've spent some time looking for information about how Linux mounts mtp-compatible devices. On the one hand these devices are shown in a file manager like familiar mounts. On the other hand, It looks like 'traditional' mounts are designed for mass storage devices only. And underlying implementation of 'mount' metaphor is different for devices which are being accessed via some protocol, say, mtp, sftp, etc. Ergo, that implementation may not support, say, /proc/{processID}/mountinfo which is inherent part of mass-storage mounts implementation.

IMHO, this is the reason why gio mount -l lists an mtp device and mount -l does not.

1 Like