struct obd_device *obd; /* pointer to LMV itself */
};
-int lmv_dirobj_blocking_ast(struct ldlm_lock *,
- struct ldlm_lock_desc *,
- void *, int);
+int lmv_setup_mgr(struct obd_device *obd);
+void lmv_cleanup_mgr(struct obd_device *obd);
+int lmv_check_connect(struct obd_device *obd);
void lmv_put_obj(struct lmv_obj *obj);
struct lmv_obj *lmv_get_obj(struct lmv_obj *obj);
-int lmv_setup_mgr(struct obd_device *obd);
-void lmv_cleanup_mgr(struct obd_device *obd);
-
struct lmv_obj *lmv_grab_obj(struct obd_device *obd,
struct ll_fid *fid);
int lmv_create_obj(struct obd_export *exp, struct ll_fid *fid,
struct mea *mea);
+int lmv_destroy_obj(struct obd_export *exp, struct ll_fid *fid);
+
int lmv_intent_lock(struct obd_export *, struct ll_uctxt *,
struct ll_fid *, const char *, int, void *, int,
struct ll_fid *, struct lookup_intent *, int,
struct ptlrpc_request **, ldlm_blocking_callback);
+
int lmv_intent_lookup(struct obd_export *, struct ll_uctxt *,
struct ll_fid *, const char *, int, void *, int,
struct ll_fid *, struct lookup_intent *, int,
struct ptlrpc_request **, ldlm_blocking_callback);
+
int lmv_intent_getattr(struct obd_export *, struct ll_uctxt *,
struct ll_fid *, const char *, int, void *, int,
struct ll_fid *, struct lookup_intent *, int,
struct ptlrpc_request **, ldlm_blocking_callback);
+
int lmv_intent_open(struct obd_export *, struct ll_uctxt *,
struct ll_fid *, const char *, int, void *, int,
struct ll_fid *, struct lookup_intent *, int,
struct ptlrpc_request **, ldlm_blocking_callback);
-int lmv_check_connect(struct obd_device *obd);
int lmv_revalidate_slaves(struct obd_export *, struct ptlrpc_request **,
struct ll_fid *, struct lookup_intent *, int,
ldlm_blocking_callback cb_blocking);
int lmv_get_mea_and_update_object(struct obd_export *, struct ll_fid *);
+int lmv_dirobj_blocking_ast(struct ldlm_lock *, struct ldlm_lock_desc *,
+ void *, int);
+
static inline struct mea *
is_body_of_splitted_dir(struct ptlrpc_request *req, int offset)
{
if (obj)
RETURN(obj);
- /* no such object yet, allocate and initialize them. */
+ /* no such object yet, allocate and initialize it. */
obj = __lmv_alloc_obj(obd, fid, mea);
if (!obj)
RETURN(NULL);
}
int
+lmv_destroy_obj(struct obd_export *exp, struct ll_fid *fid)
+{
+ struct obd_device *obd = exp->exp_obd;
+ struct lmv_obj *obj;
+ int rc = 0;
+ ENTRY;
+
+ spin_lock(&lmv_obj_list_lock);
+
+ obj = __lmv_grab_obj(obd, fid);
+ if (obj) {
+ list_del(&obj->list);
+ lmv_put_obj(obj);
+ lmv_put_obj(obj);
+ rc = 1;
+ }
+
+ spin_unlock(&lmv_obj_list_lock);
+ RETURN(rc);
+}
+
+int
lmv_setup_mgr(struct obd_device *obd)
{
CWARN("LMV object manager setup\n");