]> granicus.if.org Git - zfs/commitdiff
Revert feature-zap-cursor-to-key feature upstream
authorBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 27 May 2010 21:12:59 +0000 (14:12 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 27 May 2010 21:12:59 +0000 (14:12 -0700)
We can drop this feature and we will pick up the lastest version
during the b141 update.

module/zfs/include/sys/zap.h
module/zfs/include/sys/zap_impl.h
module/zfs/zap.c
module/zfs/zap_micro.c

index e0775adc72ffd8ce2db4d07e4b35adf29bfae39d..967174be48a7eff36646453861127c98e5ec3193 100644 (file)
@@ -314,11 +314,6 @@ void zap_cursor_advance(zap_cursor_t *zc);
  */
 uint64_t zap_cursor_serialize(zap_cursor_t *zc);
 
-/*
- * Advance the cursor to the attribute having the key.
- */
-int zap_cursor_move_to_key(zap_cursor_t *zc, const char *name, matchtype_t mt);
-
 /*
  * Initialize a zap cursor pointing to the position recorded by
  * zap_cursor_serialize (in the "serialized" argument).  You can also
index 56ad29a0bbb4a2a843113b780f5fddd4cb06b384..c86bb16de268a488c6495790ba10e22aea497a72 100644 (file)
@@ -210,7 +210,6 @@ int fzap_add_cd(zap_name_t *zn,
     uint64_t integer_size, uint64_t num_integers,
     const void *val, uint32_t cd, dmu_tx_t *tx);
 void fzap_upgrade(zap_t *zap, dmu_tx_t *tx);
-int fzap_cursor_move_to_key(zap_cursor_t *zc, zap_name_t *zn);
 
 #ifdef __cplusplus
 }
index db9da0f02176b00a85589dbaf46c28b708f860ad..2dc2705b9dd3754f5e12ebf49c90d25ae019ff14 100644 (file)
@@ -1078,29 +1078,6 @@ zap_stats_ptrtbl(zap_t *zap, uint64_t *tbl, int len, zap_stats_t *zs)
        }
 }
 
-int fzap_cursor_move_to_key(zap_cursor_t *zc, zap_name_t *zn)
-{
-       int err;
-       zap_leaf_t *l;
-       zap_entry_handle_t zeh;
-
-       if (zn->zn_name_orij && strlen(zn->zn_name_orij) > ZAP_MAXNAMELEN)
-               return (E2BIG);
-
-       err = zap_deref_leaf(zc->zc_zap, zn->zn_hash, NULL, RW_READER, &l);
-       if (err != 0)
-               return (err);
-
-       err = zap_leaf_lookup(l, zn, &zeh);
-       if (err != 0)
-               return (err);
-
-       zc->zc_leaf = l;
-       zc->zc_hash = zeh.zeh_hash;
-       zc->zc_cd = zeh.zeh_cd;
-       return 0;
-}
-
 void
 fzap_get_stats(zap_t *zap, zap_stats_t *zs)
 {
index ad2df6d00fd52fc19b3bd984c0c655c06d66f404..528d31d5e2f7bffdce909ac2f217046ba1447eb6 100644 (file)
@@ -1043,45 +1043,6 @@ zap_cursor_advance(zap_cursor_t *zc)
        }
 }
 
-int zap_cursor_move_to_key(zap_cursor_t *zc, const char *name, matchtype_t mt)
-{
-       int err = 0;
-       mzap_ent_t *mze;
-       zap_name_t *zn;
-
-       if (zc->zc_zap == NULL) {
-               err = zap_lockdir(zc->zc_objset, zc->zc_zapobj, NULL,
-                               RW_READER, TRUE, FALSE, &zc->zc_zap);
-               if (err)
-                       return (err);
-       } else {
-               rw_enter(&zc->zc_zap->zap_rwlock, RW_READER);
-       }
-
-       zn = zap_name_alloc(zc->zc_zap, name, mt);
-       if (zn == NULL) {
-               rw_exit(&zc->zc_zap->zap_rwlock);
-               return (ENOTSUP);
-       }
-
-       if (!zc->zc_zap->zap_ismicro) {
-               err = fzap_cursor_move_to_key(zc, zn);
-       } else {
-               mze = mze_find(zn);
-               if (mze == NULL) {
-                       err = (ENOENT);
-                       goto out;
-               }
-               zc->zc_hash = mze->mze_hash;
-               zc->zc_cd = mze->mze_phys.mze_cd;
-       }
-
-out:
-       zap_name_free(zn);
-       rw_exit(&zc->zc_zap->zap_rwlock);
-       return (err);
-}
-
 int
 zap_get_stats(objset_t *os, uint64_t zapobj, zap_stats_t *zs)
 {