diff --git a/lib/libzfs/libzfs_dataset.c b/lib/libzfs/libzfs_dataset.c index 4a07c8d20bf5..4af845a345cb 100644 --- a/lib/libzfs/libzfs_dataset.c +++ b/lib/libzfs/libzfs_dataset.c @@ -63,6 +63,8 @@ #include #include +#include + #include "zfs_namecheck.h" #include "zfs_prop.h" #include "libzfs_impl.h" @@ -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).