From 59ec30a3290d865b98e3805df6c82b6b4f88aab0 Mon Sep 17 00:00:00 2001 From: Matthew Ahrens Date: Mon, 24 Jun 2019 16:44:01 -0700 Subject: Remove code for zfs remap The "zfs remap" command was disabled by 6e91a72fe3ff8bb282490773bd687632f3e8c79d, 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 Reviewed-by: Brian Behlendorf Signed-off-by: Matthew Ahrens Closes #8944 --- lib/libzfs/libzfs_dataset.c | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'lib/libzfs/libzfs_dataset.c') diff --git a/lib/libzfs/libzfs_dataset.c b/lib/libzfs/libzfs_dataset.c index 1128275c0..c1aff4725 100644 --- a/lib/libzfs/libzfs_dataset.c +++ b/lib/libzfs/libzfs_dataset.c @@ -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. -- cgit v1.2.3