Improve handling of filesystem versions

Change mount code to diagnose filesystem versions that
are not supported by the current implementation.

Change upgrade code to do likewise and refuse to upgrade
a pool if any filesystems on it are a version which is
not supported by the current implementation.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Dan Swartzendruber <dswartz@druber.com>
Closes: #2616
This commit is contained in:
Dan Swartzendruber
2014-08-29 15:12:21 -04:00
committed by Brian Behlendorf
parent bcd9624d0f
commit 287be44f53
3 changed files with 75 additions and 21 deletions
+1 -6
View File
@@ -679,12 +679,7 @@ zfs_sb_create(const char *osname, zfs_sb_t **zsbp)
error = zfs_get_zplprop(os, ZFS_PROP_VERSION, &zsb->z_version);
if (error) {
goto out;
} else if (zsb->z_version >
zfs_zpl_version_map(spa_version(dmu_objset_spa(os)))) {
(void) printk("Can't mount a version %lld file system "
"on a version %lld pool\n. Pool must be upgraded to mount "
"this file system.", (u_longlong_t)zsb->z_version,
(u_longlong_t)spa_version(dmu_objset_spa(os)));
} else if (zsb->z_version > ZPL_VERSION) {
error = SET_ERROR(ENOTSUP);
goto out;
}