Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double error message for incompatible filesystems #2671

Closed
ilovezfs opened this issue Sep 6, 2014 · 1 comment
Closed

Double error message for incompatible filesystems #2671

ilovezfs opened this issue Sep 6, 2014 · 1 comment

Comments

@ilovezfs
Copy link
Contributor

ilovezfs commented Sep 6, 2014

filesystem 'foo' (v6) is not supported by this implementation of ZFS (max v5).
cannot mount 'foo': Resource temporarily unavailable

This happens because ENOTSUP is converted to MOUNT_SYSERR in mount_zfs.c, and then MOUNT_SYSERR is converted to EAGAIN in libzfs_mount.c's do_mount, which then gets printed for the user as "Resource temporarily unavailable" by libzfs_mount.c's zfs_mount.

It is worth noting that do_mount never returns ENOTSUP and yet zfs_mount has handling for ENOTSUP anyway, though it can never be reached:

https://github.com/zfsonlinux/zfs/blob/master/lib/libzfs/libzfs_mount.c#L471-L482

If we do return ENOTSUP from do_mount, then we still get a double error message:

filesystem 'foo' (v6) is not supported by this implementation of ZFS (max v5).
cannot mount 'foo': Can't mount a version 6 file system on a version 5000 pool. Pool must be upgraded to mount this file system.

Any thoughts on how to avoid the double error message? Perhaps the entirety of https://github.com/zfsonlinux/zfs/blob/master/lib/libzfs/libzfs_mount.c#L459-L489 should be moved to mount_zfs.c

On a related note, it strikes me that in light of 287be44 the error message in libzfs_mount.c's zfs_mount() for ENOTSUP should probably not say "Pool must be upgraded to mount this file system" since that is not in fact a solution when the file system is version 6.

@behlendorf
Copy link
Contributor

Closing, we can live with a double warning in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants