Skip to content

Commit

Permalink
libzfs_dataset.c: Wire in snapshot exclusions via 'FQexclude_snapshot()'
Browse files Browse the repository at this point in the history
  • Loading branch information
TerraTech committed Feb 16, 2021
1 parent 3bb177e commit 7c49a5e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/libzfs/libzfs_dataset.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
#include <libzfs.h>
#include <libzutil.h>

#include <libzfs_FQ.h>

#include "zfs_namecheck.h"
#include "zfs_prop.h"
#include "libzfs_impl.h"
Expand Down Expand Up @@ -4235,8 +4237,16 @@ zfs_snapshot_nvl(libzfs_handle_t *hdl, nvlist_t *snaps, nvlist_t *props)
"cannot create snapshot '%s'"), snapname);
return (zfs_error(hdl, EZFS_INVALIDNAME, errbuf));
}

if (FQexclude_snapshot(hdl, snapname)) {
//FQdebug("skipping: %s\n", snapname);
fnvlist_remove_nvpair(snaps, elem);
}
}

if (nvlist_empty(snaps))
return (0);

/*
* get pool handle for prop validation. assumes all snaps are in the
* same pool, as does lzc_snapshot (below).
Expand Down

0 comments on commit 7c49a5e

Please sign in to comment.