~ubuntu-branches/ubuntu/quantal/zfs-fuse/quantal

« back to all changes in this revision

Viewing changes to src/lib/libzpool/dsl_deleg.c

  • Committer: Bazaar Package Importer
  • Author(s): Mike Hommey, Mike Hommey, Seth Heeren
  • Date: 2010-06-30 18:03:52 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20100630180352-d3jq25ytbcl23q3y
Tags: 0.6.9-1
* New upstream release.

[ Mike Hommey ]
* debian/control:
  - Build depend on libssl-dev and libattr1-dev, now required to build.
  - Build depend on docbook-xml to avoid xsltproc I/O error loading
    docbook DTD.
  - Add suggestions for a NFS server and kpartx.
* debian/man/*, debian/copyright, debian/rules: Remove manual pages, they
  are now shipped upstream.
* debian/copyright: Change download link.
* src/SConstruct:
  - Add an optim option to the build system.
  - Add support for DESTDIR.
  - Force debug=1 to mean optim, no strip, no debug.
  - Use -ffunction-sections, -fdata-sections, and --gc-sections flags to
    reduce the binary sizes.
* src/lib/libumem/SConscript: Cleanup src/lib/libumem when cleaning up
  build directory.
* src/cmd/*/SConscript: Don't link zfs, zpool and zdb against libssl.
* src/lib/libumem/SConscript: Only build static libumem.
* src/lib/libumem/sol_compat.h:
  - Add atomic cas support for sparc.
  - Use atomic functions from libsolcompat in libumem on unsupported
    platforms.
* debian/rules:
  - Set optimization level in build system according to DEB_BUILD_OPTIONS.
  - Build with debug=1 to have unstripped binaries ; dh_strip will do the
    right thing.
  - Don't depend on the local location of the docbook XSLT stylesheets.
    Use the catalogged url in place of the full path.
  - Don't clean src/.sconsign.dblite and src/path.pyc.
  - Set all destination directories when installing with scons.
  - Install bash completion and zfsrc files.
  - Don't use scons cache when building.
* debian/prerm: Remove /var/lib/zfs/zpool.cache in prerm.
* debian/dirs: Create /etc/bash_completion.d.
* debian/watch: Fix watch file.
* debian/rules, debian/control, debian/compat: Switch to dh.
* debian/README.Debian: Update README.Debian.
* debian/zfs-fuse.man.xml: Update zfs-fuse manual page.
* debian/zfs-fuse.init: Start sharing datasets marked as such at daemon
  startup.
* debian/rules, debian/control: Use config.guess and config.sub from
  autotools-dev.

[ Seth Heeren ]
* debian/zfs-fuse.man.xml:
  Added notes on the precedence, zfsrc, commandline, initscript vs.
  /etc/default/zfs-fuse on some systems.
* debian/zfs-fuse.init, debian/zfs-fuse.default: Deprecating DAEMON_OPTS.
* debian/zfs-fuse.init:
  - Removing import -a -f.
  - Removing the now unnecessary 'sleep 2'.
  - Extended shutdown wait to allow for zfs-fuse daemon's own shutdown
    timeouts.
  - Re-ordered dubious PATH setting.
* debian/zfs-fuse.init: Move existing zpool.cache to new location if
  possible.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 * CDDL HEADER END
20
20
 */
21
21
/*
22
 
 * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 
22
 * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23
23
 * Use is subject to license terms.
24
24
 */
25
25
 
66
66
 * The ZAP OBJ is referred to as the jump object.
67
67
 */
68
68
 
69
 
/* #pragma ident        "%Z%%M% %I%     %E% SMI" */
70
 
 
71
69
#include <sys/dmu.h>
72
70
#include <sys/dmu_objset.h>
73
71
#include <sys/dmu_tx.h>
77
75
#include <sys/dsl_synctask.h>
78
76
#include <sys/dsl_deleg.h>
79
77
#include <sys/spa.h>
80
 
#include <sys/spa_impl.h>
81
 
#include <sys/zio_checksum.h> /* for the default checksum value */
82
78
#include <sys/zap.h>
83
79
#include <sys/fs/zfs.h>
84
80
#include <sys/cred.h>
540
536
        dsl_pool_t *dp;
541
537
        void *cookie;
542
538
        int     error;
543
 
        char    checkflag = ZFS_DELEG_LOCAL;
 
539
        char    checkflag;
544
540
        objset_t *mos;
545
541
        avl_tree_t permsets;
546
542
        perm_set_t *setnode;
563
559
                return (EPERM);
564
560
        }
565
561
 
 
562
        if (dsl_dataset_is_snapshot(ds)) {
 
563
                /*
 
564
                 * Snapshots are treated as descendents only,
 
565
                 * local permissions do not apply.
 
566
                 */
 
567
                checkflag = ZFS_DELEG_DESCENDENT;
 
568
        } else {
 
569
                checkflag = ZFS_DELEG_LOCAL;
 
570
        }
 
571
 
566
572
        avl_create(&permsets, perm_set_compare, sizeof (perm_set_t),
567
573
            offsetof(perm_set_t, p_node));
568
574
 
581
587
 
582
588
                        if (dsl_prop_get_dd(dd,
583
589
                            zfs_prop_to_name(ZFS_PROP_ZONED),
584
 
                            8, 1, &zoned, NULL) != 0)
 
590
                            8, 1, &zoned, NULL, B_FALSE) != 0)
585
591
                                break;
586
592
                        if (!zoned)
587
593
                                break;
731
737
boolean_t
732
738
dsl_delegation_on(objset_t *os)
733
739
{
734
 
        return (os->os->os_spa->spa_delegation);
 
740
        return (!!spa_delegation(os->os_spa));
735
741
}