Whamcloud - gitweb
- few renames in LMV module to make it more understandable and in same time shorter.
authoryury <yury>
Tue, 25 Apr 2006 12:58:58 +0000 (12:58 +0000)
committeryury <yury>
Tue, 25 Apr 2006 12:58:58 +0000 (12:58 +0000)
lustre/lmv/lmv_intent.c
lustre/lmv/lmv_internal.h
lustre/lmv/lmv_obd.c

index a1730a3..b41fc87 100644 (file)
@@ -175,7 +175,7 @@ repeat:
                 /* directory got splitted. time to update local object and
                  * repeat the request with proper MDS */
                 LASSERT(lu_fid_eq(pid, &rpid));
-                rc = lmv_get_mea_and_update_object(exp, &rpid);
+                rc = lmv_handle_split(exp, &rpid);
                 if (rc == 0) {
                         ptlrpc_req_finished(*reqp);
                         goto repeat;
@@ -223,7 +223,7 @@ repeat:
         
         cid = &body->fid1;
         obj = lmv_obj_grab(obd, cid);
-        if (!obj && (mea = lmv_splitted_dir_body(*reqp, 1))) {
+        if (!obj && (mea = lmv_get_mea(*reqp, 1))) {
                 /* wow! this is splitted dir, we'd like to handle it */
                 obj = lmv_obj_create(exp, &body->fid1, mea);
                 if (IS_ERR(obj))
@@ -356,7 +356,7 @@ int lmv_intent_getattr(struct obd_export *exp, struct lu_fid *pid,
         cid = &body->fid1;
         obj2 = lmv_obj_grab(obd, cid);
 
-        if (!obj2 && (mea = lmv_splitted_dir_body(*reqp, 1))) {
+        if (!obj2 && (mea = lmv_get_mea(*reqp, 1))) {
                 /* wow! this is splitted dir, we'd like to handle it. */
                 body = lustre_msg_buf((*reqp)->rq_repmsg, 1, sizeof(*body));
                 LASSERT(body != NULL);
@@ -602,7 +602,7 @@ repeat:
         rc = lmv_intent_remote(exp, lmm, lmmsize, it, flags, reqp,
                                cb_blocking, extra_lock_flags);
 
-        if (rc == 0 && (mea = lmv_splitted_dir_body(*reqp, 1))) {
+        if (rc == 0 && (mea = lmv_get_mea(*reqp, 1))) {
                 /* wow! this is splitted dir, we'd like to handle it */
                 body = lustre_msg_buf((*reqp)->rq_repmsg, 1, sizeof(*body));
                 LASSERT(body != NULL);
index ec6a2a8..8aa3a12 100644 (file)
@@ -124,13 +124,13 @@ int lmv_revalidate_slaves(struct obd_export *, struct ptlrpc_request **,
                          ldlm_blocking_callback cb_blocking,
                           int extra_lock_flags);
 
-int lmv_get_mea_and_update_object(struct obd_export *, struct lu_fid *);
+int lmv_handle_split(struct obd_export *, struct lu_fid *);
 int lmv_dirobj_blocking_ast(struct ldlm_lock *, struct ldlm_lock_desc *,
                            void *, int);
 int lmv_fld_lookup(struct obd_device *obd, struct lu_fid *fid);
 
 static inline struct lmv_stripe_md * 
-lmv_splitted_dir_body(struct ptlrpc_request *req, int offset)
+lmv_get_mea(struct ptlrpc_request *req, int offset)
 {
        struct mdt_body *body;
        struct lmv_stripe_md *mea;
index 5819a04..06692cf 100644 (file)
@@ -906,8 +906,9 @@ static int lmv_close(struct obd_export *exp, struct md_op_data *op_data,
         RETURN(rc);
 }
 
-int lmv_get_mea_and_update_object(struct obd_export *exp, 
-                                  struct lu_fid *fid)
+/* called in the case MDS returns -ERESTART on create on open, what means that
+ * directory is splitted and its LMV presentation object has to be updated. */
+int lmv_handle_split(struct obd_export *exp, struct lu_fid *fid)
 {
         struct obd_device *obd = exp->exp_obd;
         struct lmv_obd *lmv = &obd->u.lmv;
@@ -1004,11 +1005,9 @@ repeat:
                 
                 CDEBUG(D_OTHER, "created. "DFID3"\n", PFID3(&op_data->fid1));
         } else if (rc == -ERESTART) {
-                /*
-                 * directory got splitted. time to update local object and
-                 * repeat the request with proper MDS.
-                 */
-                rc = lmv_get_mea_and_update_object(exp, &op_data->fid1);
+                /* directory got splitted. time to update local object and
+                 * repeat the request with proper MDS. */
+                rc = lmv_handle_split(exp, &op_data->fid1);
                 if (rc == 0) {
                         ptlrpc_req_finished(*request);
                         goto repeat;
@@ -1250,7 +1249,7 @@ repeat:
         } else if (rc == -ERESTART) {
                 /* directory got splitted. time to update local object and
                  * repeat the request with proper MDS */
-                rc = lmv_get_mea_and_update_object(exp, &rid);
+                rc = lmv_handle_split(exp, &rid);
                 if (rc == 0) {
                         ptlrpc_req_finished(*request);
                         goto repeat;