Print this page
3888 zfs recv -F should destroy any snapshots created since the incremental source
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Peng Dai <peng.dai@delphix.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/dsl_destroy.c
          +++ new/usr/src/uts/common/fs/zfs/dsl_destroy.c
↓ open down ↓ 38 lines elided ↑ open up ↑
  39   39  #include <sys/zfs_ioctl.h>
  40   40  #include <sys/dsl_deleg.h>
  41   41  
  42   42  typedef struct dmu_snapshots_destroy_arg {
  43   43          nvlist_t *dsda_snaps;
  44   44          nvlist_t *dsda_successful_snaps;
  45   45          boolean_t dsda_defer;
  46   46          nvlist_t *dsda_errlist;
  47   47  } dmu_snapshots_destroy_arg_t;
  48   48  
  49      -/*
  50      - * ds must be owned.
  51      - */
  52      -static int
       49 +int
  53   50  dsl_destroy_snapshot_check_impl(dsl_dataset_t *ds, boolean_t defer)
  54   51  {
  55   52          if (!dsl_dataset_is_snapshot(ds))
  56   53                  return (SET_ERROR(EINVAL));
  57   54  
  58   55          if (dsl_dataset_long_held(ds))
  59   56                  return (SET_ERROR(EBUSY));
  60   57  
  61   58          /*
  62   59           * Only allow deferred destroy on pools that support it.
↓ open down ↓ 870 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX