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/sys/dsl_prop.h
+++ new/usr/src/uts/common/fs/zfs/sys/dsl_prop.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
↓ 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 #ifndef _SYS_DSL_PROP_H
26 27 #define _SYS_DSL_PROP_H
27 28
28 29 #include <sys/dmu.h>
29 30 #include <sys/dsl_pool.h>
30 31 #include <sys/zfs_context.h>
31 32 #include <sys/dsl_synctask.h>
32 33
33 34 #ifdef __cplusplus
34 35 extern "C" {
35 36 #endif
36 37
37 38 struct dsl_dataset;
38 39 struct dsl_dir;
39 40
40 41 /* The callback func may not call into the DMU or DSL! */
41 42 typedef void (dsl_prop_changed_cb_t)(void *arg, uint64_t newval);
42 43
43 44 typedef struct dsl_prop_cb_record {
44 45 list_node_t cbr_node; /* link on dd_prop_cbs */
45 46 struct dsl_dataset *cbr_ds;
46 47 const char *cbr_propname;
47 48 dsl_prop_changed_cb_t *cbr_func;
48 49 void *cbr_arg;
49 50 } dsl_prop_cb_record_t;
50 51
51 52 typedef struct dsl_props_arg {
52 53 nvlist_t *pa_props;
53 54 zprop_source_t pa_source;
54 55 } dsl_props_arg_t;
55 56
56 57 typedef struct dsl_prop_set_arg {
57 58 const char *psa_name;
58 59 zprop_source_t psa_source;
59 60 int psa_intsz;
60 61 int psa_numints;
61 62 const void *psa_value;
62 63
63 64 /*
64 65 * Used to handle the special requirements of the quota and reservation
65 66 * properties.
66 67 */
67 68 uint64_t psa_effective_value;
68 69 } dsl_prop_setarg_t;
69 70
70 71 int dsl_prop_register(struct dsl_dataset *ds, const char *propname,
71 72 dsl_prop_changed_cb_t *callback, void *cbarg);
72 73 int dsl_prop_unregister(struct dsl_dataset *ds, const char *propname,
73 74 dsl_prop_changed_cb_t *callback, void *cbarg);
74 75 int dsl_prop_numcb(struct dsl_dataset *ds);
75 76
76 77 int dsl_prop_get(const char *ddname, const char *propname,
77 78 int intsz, int numints, void *buf, char *setpoint);
78 79 int dsl_prop_get_integer(const char *ddname, const char *propname,
79 80 uint64_t *valuep, char *setpoint);
80 81 int dsl_prop_get_all(objset_t *os, nvlist_t **nvp);
81 82 int dsl_prop_get_received(objset_t *os, nvlist_t **nvp);
↓ open down ↓ |
49 lines elided |
↑ open up ↑ |
82 83 int dsl_prop_get_ds(struct dsl_dataset *ds, const char *propname,
83 84 int intsz, int numints, void *buf, char *setpoint);
84 85 int dsl_prop_get_dd(struct dsl_dir *dd, const char *propname,
85 86 int intsz, int numints, void *buf, char *setpoint,
86 87 boolean_t snapshot);
87 88
88 89 dsl_syncfunc_t dsl_props_set_sync;
89 90 int dsl_prop_set(const char *ddname, const char *propname,
90 91 zprop_source_t source, int intsz, int numints, const void *buf);
91 92 int dsl_props_set(const char *dsname, zprop_source_t source, nvlist_t *nvl);
92 -void dsl_dir_prop_set_uint64_sync(dsl_dir_t *dd, const char *name, uint64_t val,
93 - dmu_tx_t *tx);
94 93
95 94 void dsl_prop_setarg_init_uint64(dsl_prop_setarg_t *psa, const char *propname,
96 95 zprop_source_t source, uint64_t *value);
97 96 int dsl_prop_predict_sync(dsl_dir_t *dd, dsl_prop_setarg_t *psa);
98 97 #ifdef ZFS_DEBUG
99 98 void dsl_prop_check_prediction(dsl_dir_t *dd, dsl_prop_setarg_t *psa);
100 99 #define DSL_PROP_CHECK_PREDICTION(dd, psa) \
101 100 dsl_prop_check_prediction((dd), (psa))
102 101 #else
103 102 #define DSL_PROP_CHECK_PREDICTION(dd, psa) /* nothing */
104 103 #endif
105 104
106 105 /* flag first receive on or after SPA_VERSION_RECVD_PROPS */
107 106 boolean_t dsl_prop_get_hasrecvd(objset_t *os);
108 107 void dsl_prop_set_hasrecvd(objset_t *os);
109 108 void dsl_prop_unset_hasrecvd(objset_t *os);
110 109
111 110 void dsl_prop_nvlist_add_uint64(nvlist_t *nv, zfs_prop_t prop, uint64_t value);
112 111 void dsl_prop_nvlist_add_string(nvlist_t *nv,
113 112 zfs_prop_t prop, const char *value);
114 113
115 114 #ifdef __cplusplus
116 115 }
117 116 #endif
118 117
119 118 #endif /* _SYS_DSL_PROP_H */
↓ open down ↓ |
16 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX