aboutsummaryrefslogtreecommitdiffstats
path: root/include/sys/zap.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sys/zap.h')
-rw-r--r--include/sys/zap.h33
1 files changed, 20 insertions, 13 deletions
diff --git a/include/sys/zap.h b/include/sys/zap.h
index 092669c8b..aabfca7ba 100644
--- a/include/sys/zap.h
+++ b/include/sys/zap.h
@@ -86,18 +86,22 @@ extern "C" {
#endif
/*
- * The matchtype specifies which entry will be accessed.
- * MT_EXACT: only find an exact match (non-normalized)
- * MT_FIRST: find the "first" normalized (case and Unicode
- * form) match; the designated "first" match will not change as long
- * as the set of entries with this normalization doesn't change
- * MT_BEST: if there is an exact match, find that, otherwise find the
- * first normalized match
+ * Specifies matching criteria for ZAP lookups.
*/
typedef enum matchtype
{
+ /* Only find an exact match (non-normalized) */
MT_EXACT,
+ /*
+ * If there is an exact match, find that, otherwise find the
+ * first normalized match.
+ */
MT_BEST,
+ /*
+ * Find the "first" normalized (case and Unicode form) match;
+ * the designated "first" match will not change as long as the
+ * set of entries with this normalization doesn't change.
+ */
MT_FIRST
} matchtype_t;
@@ -174,16 +178,21 @@ int zap_destroy(objset_t *ds, uint64_t zapobj, dmu_tx_t *tx);
* call will fail and return EINVAL.
*
* If 'integer_size' is equal to or larger than the attribute's integer
- * size, the call will succeed and return 0. * When converting to a
- * larger integer size, the integers will be treated as unsigned (ie. no
- * sign-extension will be performed).
+ * size, the call will succeed and return 0.
+ *
+ * When converting to a larger integer size, the integers will be treated as
+ * unsigned (ie. no sign-extension will be performed).
*
* 'num_integers' is the length (in integers) of 'buf'.
*
* If the attribute is longer than the buffer, as many integers as will
* fit will be transferred to 'buf'. If the entire attribute was not
* transferred, the call will return EOVERFLOW.
- *
+ */
+int zap_lookup(objset_t *ds, uint64_t zapobj, const char *name,
+ uint64_t integer_size, uint64_t num_integers, void *buf);
+
+/*
* If rn_len is nonzero, realname will be set to the name of the found
* entry (which may be different from the requested name if matchtype is
* not MT_EXACT).
@@ -191,8 +200,6 @@ int zap_destroy(objset_t *ds, uint64_t zapobj, dmu_tx_t *tx);
* If normalization_conflictp is not NULL, it will be set if there is
* another name with the same case/unicode normalized form.
*/
-int zap_lookup(objset_t *ds, uint64_t zapobj, const char *name,
- uint64_t integer_size, uint64_t num_integers, void *buf);
int zap_lookup_norm(objset_t *ds, uint64_t zapobj, const char *name,
uint64_t integer_size, uint64_t num_integers, void *buf,
matchtype_t mt, char *realname, int rn_len,