[issue37339] os.path.ismount returns true on nested btrfs subvolumes
Eike Fokken
report at bugs.python.org
Thu May 7 09:10:10 EDT 2020
Eike Fokken <e.fokken+pythontracker at posteo.de> added the comment:
Ok,
this is my proposal for the documentation. I hope you like it.
Is this the correct place to post it or can I make a direct pull request?
old:
.. function:: ismount(path)
Return ``True`` if pathname *path* is a :dfn:`mount point`: a point in a file
system where a different file system has been mounted. The function checks
whether *path*'s parent, :file:`path/..`, is on a different device than *path*,
or whether :file:`path/..` and *path* point to the same i-node on the same
device --- this should detect mount points for all Unix and POSIX variants.
new:
.. function:: ismount(path)
Return ``True`` if pathname *path* is a :dfn:`mount point`: a point in a file
system where a different file system has been mounted. The function checks
whether *path*'s parent, :file:`path/..`, is on a different device than *path*,
or whether :file:`path/..` and *path* point to the same i-node on the same
device --- this should detect mount points for all Unix and POSIX variants.
Note that in Linux not all mountpoints as recognized by the kernel are found this way.
An example are bind-mounts.
Also some directories return ``True`` although Linux doesn't recognize them as mount points.
An example are nested subvolumes in the Btrfs filesystem
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37339>
_______________________________________
More information about the Python-bugs-list
mailing list