Print this page
2882 implement libzfs_core
2883 changing "canmount" property to "on" should not always remount dataset
2900 "zfs snapshot" should be able to create multiple, arbitrary snapshots at once
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Chris Siden <christopher.siden@delphix.com>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Reviewed by: Bill Pijewski <wdp@joyent.com>
Reviewed by: Dan Kruchinin <dan.kruchinin@gmail.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/zfs_ctldir.c
          +++ new/usr/src/uts/common/fs/zfs/zfs_ctldir.c
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
       23 + * Copyright (c) 2012 by Delphix. All rights reserved.
  23   24   */
  24   25  
  25   26  /*
  26   27   * ZFS control directory (a.k.a. ".zfs")
  27   28   *
  28   29   * This directory provides a common location for all ZFS meta-objects.
  29   30   * Currently, this is only the 'snapshot' directory, but this may expand in the
  30   31   * future.  The elements are built using the GFS primitives, as the hierarchy
  31   32   * does not actually exist on disk.
  32   33   *
↓ open down ↓ 709 lines elided ↑ open up ↑
 742  743  
 743  744          dmu_objset_name(zfsvfs->z_os, name);
 744  745  
 745  746          *vpp = NULL;
 746  747  
 747  748          err = zfs_secpolicy_snapshot_perms(name, cr);
 748  749          if (err)
 749  750                  return (err);
 750  751  
 751  752          if (err == 0) {
 752      -                err = dmu_objset_snapshot(name, dirname, NULL, NULL,
 753      -                    B_FALSE, B_FALSE, -1);
      753 +                err = dmu_objset_snapshot_one(name, dirname);
 754  754                  if (err)
 755  755                          return (err);
 756  756                  err = lookupnameat(dirname, seg, follow, NULL, vpp, dvp);
 757  757          }
 758  758  
 759  759          return (err);
 760  760  }
 761  761  
 762  762  /*
 763  763   * Lookup entry point for the 'snapshot' directory.  Try to open the
↓ open down ↓ 586 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX