Whamcloud - gitweb
- in lmv remove not needed checks.
authoryury <yury>
Sat, 26 Aug 2006 08:34:58 +0000 (08:34 +0000)
committeryury <yury>
Sat, 26 Aug 2006 08:34:58 +0000 (08:34 +0000)
lustre/lmv/lmv_intent.c
lustre/lmv/lmv_obd.c

index 97edb0e..c314074 100644 (file)
@@ -80,7 +80,7 @@ int lmv_intent_remote(struct obd_export *exp, void *lmm,
          * oh, MDS reports that this is remote inode case i.e. we have to ask
          * for real attrs on another MDS.
          */
-        if (it->it_op & IT_LOOKUP/* || it->it_op & IT_CHDIR*/) {
+        if (it->it_op & IT_LOOKUP) {
                 /*
                  * unfortunately, we have to lie to MDC/MDS to retrieve
                  * attributes llite needs.
@@ -455,13 +455,14 @@ int lmv_lookup_slaves(struct obd_export *exp, struct ptlrpc_request **reqp)
          * attributes to be returned from the slaves it's important that lookup
          * is called in two cases:
 
-         *  - for first time (dcache has no such a resolving yet).
-         *  - ->d_revalidate() returned false.
+         *  - for first time (dcache has no such a resolving yet).  -
+         *  ->d_revalidate() returned false.
 
          * last case possible only if all the objs (master and all slaves aren't
          * valid */
 
-        body = lustre_msg_buf((*reqp)->rq_repmsg, DLM_REPLY_REC_OFF, sizeof(*body));
+        body = lustre_msg_buf((*reqp)->rq_repmsg,
+                              DLM_REPLY_REC_OFF, sizeof(*body));
         LASSERT(body != NULL);
         LASSERT((body->valid & OBD_MD_FLID) != 0);
 
@@ -681,7 +682,8 @@ repeat:
 
         if (rc == 0 && (mea = lmv_get_mea(*reqp, DLM_REPLY_REC_OFF))) {
                 /* wow! this is split dir, we'd like to handle it */
-                body = lustre_msg_buf((*reqp)->rq_repmsg, DLM_REPLY_REC_OFF, sizeof(*body));
+                body = lustre_msg_buf((*reqp)->rq_repmsg,
+                                      DLM_REPLY_REC_OFF, sizeof(*body));
                 LASSERT(body != NULL);
                 LASSERT((body->valid & OBD_MD_FLID) != 0);
 
index bfb29ef..669f335 100644 (file)
@@ -1205,7 +1205,6 @@ int lmv_create(struct obd_export *exp, struct md_op_data *op_data,
         struct obd_device *obd = exp->exp_obd;
         struct lmv_obd *lmv = &obd->u.lmv;
         struct obd_export *tgt_exp;
-        struct mdt_body *body;
         struct lmv_obj *obj;
         int rc, loop = 0;
         ENTRY;
@@ -1240,16 +1239,12 @@ repeat:
         if (rc == 0) {
                 if (*request == NULL)
                         RETURN(rc);
-
-                body = lustre_msg_buf((*request)->rq_repmsg, REQ_REC_OFF,
-                                      sizeof(*body));
-                if (body == NULL)
-                        RETURN(-ENOMEM);
-
                 CDEBUG(D_OTHER, "created. "DFID"\n", PFID(&op_data->fid1));
         } else if (rc == -ERESTART) {
-                /* directory got split. time to update local object and repeat
-                 * the request with proper MDS. */
+                /*
+                 * Directory got split. 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);
@@ -1364,7 +1359,8 @@ lmv_enqueue_remote(struct obd_export *exp, int lock_type,
         int rc = 0, pmode;
         ENTRY;
 
-        body = lustre_msg_buf(req->rq_repmsg, DLM_REPLY_REC_OFF, sizeof(*body));
+        body = lustre_msg_buf(req->rq_repmsg,
+                              DLM_REPLY_REC_OFF, sizeof(*body));
         LASSERT(body != NULL);
 
         if (!(body->valid & OBD_MD_MDS))
@@ -1696,7 +1692,6 @@ static int lmv_setattr(struct obd_export *exp, struct md_op_data *op_data,
         struct lmv_obd *lmv = &obd->u.lmv;
         struct ptlrpc_request *req;
         struct obd_export *tgt_exp;
-        struct mdt_body *body;
         struct lmv_obj *obj;
         int rc = 0, i;
         ENTRY;
@@ -1744,11 +1739,6 @@ static int lmv_setattr(struct obd_export *exp, struct md_op_data *op_data,
 
                 rc = md_setattr(tgt_exp, op_data, iattr, ea, ealen, ea2,
                                 ea2len, request);
-                if (rc == 0) {
-                        body = lustre_msg_buf((*request)->rq_repmsg, REQ_REC_OFF,
-                                              sizeof(*body));
-                        LASSERT(body != NULL);
-                }
         }
         RETURN(rc);
 }