*
* CDDL HEADER END
*/
+
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2013, 2014 by Delphix. All rights reserved.
+ * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
+ * Copyright 2017 Nexenta Systems, Inc.
*/
/*
}
ASSERT(zn->zn_key_intlen == 1);
- if (zn->zn_matchtype == MT_FIRST) {
+ if (zn->zn_matchtype & MT_NORMALIZE) {
char *thisname = kmem_alloc(array_numints, KM_SLEEP);
boolean_t match;
ASSERT3U(zap_leaf_phys(l)->l_hdr.lh_magic, ==, ZAP_LEAF_MAGIC);
-again:
for (chunkp = LEAF_HASH_ENTPTR(l, zn->zn_hash);
*chunkp != CHAIN_END; chunkp = &le->le_next) {
uint16_t chunk = *chunkp;
/*
* NB: the entry chain is always sorted by cd on
* normalized zap objects, so this will find the
- * lowest-cd match for MT_FIRST.
+ * lowest-cd match for MT_NORMALIZE.
*/
- ASSERT(zn->zn_matchtype == MT_EXACT ||
+ ASSERT((zn->zn_matchtype == 0) ||
(zap_leaf_phys(l)->l_hdr.lh_flags & ZLF_ENTRIES_CDSORTED));
if (zap_leaf_array_match(l, zn, le->le_name_chunk,
le->le_name_numints)) {
}
}
- /*
- * NB: we could of course do this in one pass, but that would be
- * a pain. We'll see if MT_BEST is even used much.
- */
- if (zn->zn_matchtype == MT_BEST) {
- zn->zn_matchtype = MT_FIRST;
- goto again;
- }
-
return (SET_ERROR(ENOENT));
}
int
zap_entry_update(zap_entry_handle_t *zeh,
- uint8_t integer_size, uint64_t num_integers, const void *buf)
+ uint8_t integer_size, uint64_t num_integers, const void *buf)
{
int delta_chunks;
zap_leaf_t *l = zeh->zeh_leaf;
continue;
if (zn == NULL) {
- zn = zap_name_alloc(zap, name, MT_FIRST);
+ zn = zap_name_alloc(zap, name, MT_NORMALIZE);
allocdzn = B_TRUE;
}
if (zap_leaf_array_match(zeh->zeh_leaf, zn,