kern/174918: Unknown mount filesystem error messages are confusing

Garrett Cooper yanegomi at gmail.com
Thu Jan 3 01:00:00 UTC 2013


>Number:         174918
>Category:       kern
>Synopsis:       Unknown mount filesystem error messages are confusing
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 03 01:00:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Garrett Cooper
>Release:        9.1-PRERELEASE
>Organization:
EMC Isilon
>Environment:
FreeBSD forza.west.isilon.com 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #0 r+336aa21: Wed Dec 19 18:05:45 PST 2012     gcooper at forza.west.isilon.com:/usr/obj/usr/src/sys/FORZA  amd64
>Description:
Error messages printed out by mount(2) are unfortunately not helpful when trying to determine whether or not an unsupported (or non-existent) filesystem is invoked. Example:

$ sudo mount -t foobarfs foo $PWD
mount: foo: Operation not supported by device

The issue is with the following call in vfs_mount.c:

1079                 if (vfsp == NULL)
1080                         return (ENODEV);
1081                 if (jailed(td->td_ucred) && !(vfsp->vfc_flags & VFCF_JAIL))
1082                         return (EPERM);

and this call in vfs_init.c:

131         /* Try to load the respective module. */
132         *error = kern_kldload(td, fstype, &fileid);
133         if (*error)
134                 return (NULL);

It seems like the error should be either EINVAL or ENOENT, but doing the latter
in mount(2) would be bad form.
>How-To-Repeat:
mount -t foobarfs foo /
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list