mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
Remove code for zfs remap
The "zfs remap" command was disabled by
6e91a72fe3, because it has little utility
and introduced some tricky bugs. This commit removes the code for it,
the associated ZFS_IOC_REMAP ioctl, and tests.
Note that the ioctl and property will remain, but have no functionality.
This allows older software to fail gracefully if it attempts to use
these, and avoids a backwards incompatibility that would be introduced if
we renumbered the later ioctls/props.
Reviewed-by: Tom Caputi <tcaputi@datto.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matthew Ahrens <mahrens@delphix.com>
Closes #8944
This commit is contained in:
committed by
Brian Behlendorf
parent
53864800f6
commit
59ec30a329
@@ -4210,36 +4210,6 @@ zfs_snapshot_cb(zfs_handle_t *zhp, void *arg)
|
||||
return (rv);
|
||||
}
|
||||
|
||||
int
|
||||
zfs_remap_indirects(libzfs_handle_t *hdl, const char *fs)
|
||||
{
|
||||
int err;
|
||||
char errbuf[1024];
|
||||
|
||||
(void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN,
|
||||
"cannot remap dataset '%s'"), fs);
|
||||
|
||||
err = lzc_remap(fs);
|
||||
|
||||
if (err != 0) {
|
||||
switch (err) {
|
||||
case ENOTSUP:
|
||||
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
|
||||
"pool must be upgraded"));
|
||||
(void) zfs_error(hdl, EZFS_BADVERSION, errbuf);
|
||||
break;
|
||||
case EINVAL:
|
||||
(void) zfs_error(hdl, EZFS_BADTYPE, errbuf);
|
||||
break;
|
||||
default:
|
||||
(void) zfs_standard_error(hdl, err, errbuf);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return (err);
|
||||
}
|
||||
|
||||
/*
|
||||
* Creates snapshots. The keys in the snaps nvlist are the snapshots to be
|
||||
* created.
|
||||
|
||||
@@ -306,16 +306,6 @@ lzc_promote(const char *fsname, char *snapnamebuf, int snapnamelen)
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
lzc_remap(const char *fsname)
|
||||
{
|
||||
int error;
|
||||
nvlist_t *args = fnvlist_alloc();
|
||||
error = lzc_ioctl(ZFS_IOC_REMAP, fsname, args, NULL);
|
||||
nvlist_free(args);
|
||||
return (error);
|
||||
}
|
||||
|
||||
int
|
||||
lzc_rename(const char *source, const char *target)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user