*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * http://www.gnu.org/licenses/gpl-2.0.html
*
* GPL HEADER END
*/
LASSERT(lu_object_exists(lo));
LASSERT(obj->oo_db);
- LASSERT(osd_object_is_zap(obj->oo_db));
LASSERT(info);
OBD_SLAB_ALLOC_PTR_GFP(it, osd_zapit_cachep, GFP_NOFS);
if (unlikely((lma->lma_incompat & ~LMA_INCOMPAT_SUPP) ||
CFS_FAIL_CHECK(OBD_FAIL_OSD_LMA_INCOMPAT))) {
CWARN("%s: unsupported incompat LMA feature(s) %#x for "
- "oid = "LPX64"\n", osd->od_svname,
+ "oid = %#llx\n", osd->od_svname,
lma->lma_incompat & ~LMA_INCOMPAT_SUPP, oid);
GOTO(out, rc = -EOPNOTSUPP);
} else {
int rc;
ENTRY;
- LASSERT(osd_object_is_zap(obj->oo_db));
-
if (name[0] == '.') {
if (name[1] == 0) {
const struct lu_fid *f = lu_object_fid(&dt->do_lu);
else
object = obj->oo_db->db_object;
- dmu_tx_hold_bonus(oh->ot_tx, object);
- dmu_tx_hold_zap(oh->ot_tx, object, TRUE, (char *)key);
+ /* do not specify the key as then DMU is trying to look it up
+ * which is very expensive. usually the layers above lookup
+ * before insertion */
+ dmu_tx_hold_zap(oh->ot_tx, object, TRUE, NULL);
RETURN(0);
}
child = osd_obj(lo);
else
LU_OBJECT_DEBUG(D_ERROR, env, luch,
- "%s: object can't be located "DFID"\n",
+ "%s: object can't be located "DFID,
osd_dev(ludev)->od_svname, PFID(fid));
if (child == NULL) {
}
} else {
LU_OBJECT_DEBUG(D_ERROR, env, luch,
- "%s: lu_object does not exists "DFID"\n",
+ "%s: lu_object does not exists "DFID,
osd_dev(ludev)->od_svname, PFID(fid));
lu_object_put(env, luch);
child = ERR_PTR(-ENOENT);
rc = osd_fld_lookup(env, osd, seq, range);
if (rc != 0) {
if (rc != -ENOENT)
- CERROR("%s: Can not lookup fld for "LPX64"\n",
+ CERROR("%s: Can not lookup fld for %#llx\n",
osd_name(osd), seq);
RETURN(0);
}
ENTRY;
LASSERT(parent->oo_db);
- LASSERT(osd_object_is_zap(parent->oo_db));
LASSERT(dt_object_exists(dt));
LASSERT(osd_invariant(parent));
if (dt_object_exists(dt)) {
LASSERT(obj->oo_db);
- LASSERT(osd_object_is_zap(obj->oo_db));
dnode = obj->oo_db->db_object;
} else {
dnode = DMU_NEW_OBJECT;
}
- dmu_tx_hold_zap(oh->ot_tx, dnode, TRUE, (char *)key);
+
+ /* do not specify the key as then DMU is trying to look it up
+ * which is very expensive. usually the layers above lookup
+ * before deletion */
+ dmu_tx_hold_zap(oh->ot_tx, dnode, FALSE, NULL);
RETURN(0);
}
ENTRY;
LASSERT(zap_db);
- LASSERT(osd_object_is_zap(zap_db));
LASSERT(th != NULL);
oh = container_of0(th, struct osd_thandle, ot_super);
dmu_tx_hold_bonus(oh->ot_tx, obj->oo_db->db_object);
- /* It is not clear what API should be used for binary keys, so we pass
- * a null name which has the side effect of over-reserving space,
- * accounting for the worst case. See zap_count_write() */
+ /* do not specify the key as then DMU is trying to look it up
+ * which is very expensive. usually the layers above lookup
+ * before insertion */
dmu_tx_hold_zap(oh->ot_tx, obj->oo_db->db_object, TRUE, NULL);
RETURN(0);
LASSERT(obj->oo_db);
oh = container_of0(th, struct osd_thandle, ot_super);
- dmu_tx_hold_zap(oh->ot_tx, obj->oo_db->db_object, TRUE, NULL);
+
+ /* do not specify the key as then DMU is trying to look it up
+ * which is very expensive. usually the layers above lookup
+ * before deletion */
+ dmu_tx_hold_zap(oh->ot_tx, obj->oo_db->db_object, FALSE, NULL);
RETURN(0);
}
* XXX: we need a binary version of zap_cursor_move_to_key()
* to implement this API */
if (*((const __u64 *)key) != 0)
- CERROR("NOT IMPLEMETED YET (move to "LPX64")\n",
+ CERROR("NOT IMPLEMETED YET (move to %#llx)\n",
*((__u64 *)key));
zap_cursor_fini(it->ozi_zc);
if (unlikely(rc != 0))
break;
- /* dmu_prefetch() was exported in 0.6.2, if you use with
- * an older release, just comment it out - this is an
- * optimization */
- dmu_prefetch(dev->od_os, it->mit_prefetched_dnode, 0, 0);
+ osd_dmu_prefetch(dev->od_os, it->mit_prefetched_dnode,
+ 0, 0, 0, ZIO_PRIORITY_ASYNC_READ);
it->mit_prefetched++;
}