mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
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:
committed by
Brian Behlendorf
parent
bcd9624d0f
commit
287be44f53
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user