]> git.proxmox.com Git - mirror_zfs.git/blobdiff - lib/libzfs/libzfs_dataset.c
OpenZFS 7614, 9064 - zfs device evacuation/removal
[mirror_zfs.git] / lib / libzfs / libzfs_dataset.c
index 65834b6d1710a2467d56e579d64be432f9daf575..3eb3aebbc6bc906a7532dc54fdf10f53577304c8 100644 (file)
@@ -4068,6 +4068,24 @@ 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 filesystem '%s' "), fs);
+
+       err = lzc_remap(fs);
+
+       if (err != 0) {
+               (void) zfs_standard_error(hdl, err, errbuf);
+       }
+
+       return (err);
+}
+
 /*
  * Creates snapshots.  The keys in the snaps nvlist are the snapshots to be
  * created.