osc_object_ast_clear, osc);
return 0;
}
-/**
- * Find any ldlm lock covers the osc object.
- * \retval 0 not found
- * \retval 1 find one
- * \retval < 0 error
- */
-static int osc_object_find_cbdata(const struct lu_env *env,
- struct cl_object *obj, ldlm_iterator_t iter,
- void *data)
-{
- struct ldlm_res_id res_id;
- struct obd_device *obd;
- int rc = 0;
-
- ostid_build_res_name(&cl2osc(obj)->oo_oinfo->loi_oi, &res_id);
- obd = obj->co_lu.lo_dev->ld_obd;
- rc = ldlm_resource_iterate(obd->obd_namespace, &res_id, iter, data);
- if (rc == LDLM_ITER_STOP)
- return 1;
-
- if (rc == LDLM_ITER_CONTINUE)
- return 0;
-
- return rc;
-}
static int osc_object_fiemap(const struct lu_env *env, struct cl_object *obj,
struct ll_fiemap_info_key *fmkey,
.coo_attr_update = osc_attr_update,
.coo_glimpse = osc_object_glimpse,
.coo_prune = osc_object_prune,
- .coo_find_cbdata = osc_object_find_cbdata,
.coo_fiemap = osc_object_fiemap,
.coo_req_attr_set = osc_req_attr_set
};