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

« back to all changes in this revision

Viewing changes to src/lib/libzfscommon/zpool_prop.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
 
74
74
        /* readonly number properties */
75
75
        register_number(ZPOOL_PROP_SIZE, "size", 0, PROP_READONLY,
76
76
            ZFS_TYPE_POOL, "<size>", "SIZE");
77
 
        register_number(ZPOOL_PROP_USED, "used", 0, PROP_READONLY,
78
 
            ZFS_TYPE_POOL, "<size>", "USED");
79
 
        register_number(ZPOOL_PROP_AVAILABLE, "available", 0, PROP_READONLY,
80
 
            ZFS_TYPE_POOL, "<size>", "AVAIL");
 
77
        register_number(ZPOOL_PROP_FREE, "free", 0, PROP_READONLY,
 
78
            ZFS_TYPE_POOL, "<size>", "FREE");
 
79
        register_number(ZPOOL_PROP_ALLOCATED, "allocated", 0, PROP_READONLY,
 
80
            ZFS_TYPE_POOL, "<size>", "ALLOC");
81
81
        register_number(ZPOOL_PROP_CAPACITY, "capacity", 0, PROP_READONLY,
82
82
            ZFS_TYPE_POOL, "<size>", "CAP");
83
83
        register_number(ZPOOL_PROP_GUID, "guid", 0, PROP_READONLY,
84
84
            ZFS_TYPE_POOL, "<guid>", "GUID");
85
85
        register_number(ZPOOL_PROP_HEALTH, "health", 0, PROP_READONLY,
86
86
            ZFS_TYPE_POOL, "<state>", "HEALTH");
 
87
        register_number(ZPOOL_PROP_DEDUPRATIO, "dedupratio", 0, PROP_READONLY,
 
88
            ZFS_TYPE_POOL, "<1.00x or higher if deduped>", "DEDUP");
87
89
 
88
90
        /* default number properties */
89
91
        register_number(ZPOOL_PROP_VERSION, "version", SPA_VERSION,
90
92
            PROP_DEFAULT, ZFS_TYPE_POOL, "<version>", "VERSION");
 
93
        register_number(ZPOOL_PROP_DEDUPDITTO, "dedupditto", 0,
 
94
            PROP_DEFAULT, ZFS_TYPE_POOL, "<threshold (min 100)>", "DEDUPDITTO");
91
95
 
92
96
        /* default index (boolean) properties */
93
97
        register_index(ZPOOL_PROP_DELEGATION, "delegation", 1, PROP_DEFAULT,
96
100
            ZFS_TYPE_POOL, "on | off", "REPLACE", boolean_table);
97
101
        register_index(ZPOOL_PROP_LISTSNAPS, "listsnapshots", 0, PROP_DEFAULT,
98
102
            ZFS_TYPE_POOL, "on | off", "LISTSNAPS", boolean_table);
 
103
        register_index(ZPOOL_PROP_AUTOEXPAND, "autoexpand", 0, PROP_DEFAULT,
 
104
            ZFS_TYPE_POOL, "on | off", "EXPAND", boolean_table);
99
105
 
100
106
        /* default index properties */
101
107
        register_index(ZPOOL_PROP_FAILUREMODE, "failmode",
164
170
        return (zprop_index_to_string(prop, index, string, ZFS_TYPE_POOL));
165
171
}
166
172
 
 
173
uint64_t
 
174
zpool_prop_random_value(zpool_prop_t prop, uint64_t seed)
 
175
{
 
176
        return (zprop_random_value(prop, seed, ZFS_TYPE_POOL));
 
177
}
 
178
 
167
179
#ifndef _KERNEL
168
180
 
169
181
const char *