<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
</head>
<body>
<div style="font-family:sans-serif"><div style="white-space:normal">
<p dir="auto">On 2 Dec 2020, at 17:26, Denys Vlasenko wrote:</p>

</div>
<div style="white-space:normal"><blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px"><blockquote style="border-left:2px solid #777; color:#999; margin:0 0 5px; padding-left:5px; border-left-color:#999"><p dir="auto">$ mount -o bind /dev/disk/by-path/pci-0000:13:00.0-scsi-0:0:3:0<br>
/some/mount/point<br>
mount: bad address '/dev/disk/by-path/pci-0000'<br>
$<br>
<br>
The problem stems from the following check in mount.c:<br>
<br>
// Might this be an NFS filesystem?<br>
if ((!mp->mnt_type || is_prefixed_with(mp->mnt_type, "nfs"))<br>
  && strchr(mp->mnt_fsname, ':') != NULL<br>
) {</p>
</blockquote><p dir="auto">Does this help?<br>
<br>
        // Might this be an NFS filesystem?<br>
        if ((!mp->mnt_type || is_prefixed_with(mp->mnt_type, "nfs"))<br>
         && strchr(mp->mnt_fsname, ':') != NULL<br>
+        && !(vfsflags & (MS_REMOUNT | MS_BIND | MS_MOVE))<br>
        ) {<br>
                if (!mp->mnt_type)<br>
                        mp->mnt_type = (char*)"nfs";</p>
</blockquote></div>
<div style="white-space:normal">

<p dir="auto">Sure this helps in this particular scenario — however for non-bind NFS<br>
detection should probably see that the part before <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">:</code> is a valid DNS name<br>
or IP address. A simple check for lack of <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">/</code> before <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">:</code> should suffice.</p>

<p dir="auto">-- <br>
Misha</p>
</div>
</div>
</body>
</html>