Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / mdc / mdc_request.c
index fe74d9b..8eb065d 100644 (file)
@@ -188,7 +188,7 @@ static int mdc_getattr_common(struct obd_export *exp, unsigned int ea_size,
         CDEBUG(D_NET, "mode: %o\n", body->mode);
 
         offset = REPLY_REC_OFF + 1;
-        LASSERT_REPSWAB(req, offset);
+        lustre_set_rep_swabbed(req, offset);
         if (body->eadatasize != 0) {
                 /* reply indicates presence of eadata; check it's there... */
                 eadata = lustre_msg_buf(req->rq_repmsg, offset++,
@@ -499,7 +499,7 @@ int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req,
 
         md->body = lustre_msg_buf(req->rq_repmsg, offset, sizeof (*md->body));
         LASSERT (md->body != NULL);
-        LASSERT_REPSWABBED(req, offset);
+        LASSERT(lustre_rep_swabbed(req, offset));
         offset++;
 
         if (md->body->valid & OBD_MD_FLEASIZE) {
@@ -522,7 +522,7 @@ int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req,
                         CERROR ("incorrect message: lmm == 0\n");
                         GOTO(out, rc = -EPROTO);
                 }
-                LASSERT_REPSWABBED(req, offset);
+                LASSERT(lustre_rep_swabbed(req, offset));
 
                 rc = obd_unpackmd(dt_exp, &md->lsm, lmm, lmmsize);
                 if (rc < 0)
@@ -557,7 +557,7 @@ int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req,
                                 GOTO(out, rc = -EPROTO);
                         }
 
-                        LASSERT_REPSWABBED(req, offset);
+                        LASSERT(lustre_rep_swabbed(req, offset));
 
                         rc = obd_unpackmd(md_exp, (void *)&md->mea, lmv,
                                           lmvsize);
@@ -719,8 +719,7 @@ void mdc_commit_delayed(struct ptlrpc_request *req)
         list_del_init(&req->rq_mod_list);
         if (req->rq_sequence) {
                 list_for_each_entry_safe(cur, tmp, &mod->mod_replay_list,
-                                         rq_mod_list)
-                {
+                                         rq_mod_list) {
                         LASSERT(cur != LP_POISON);
                         LASSERT(cur->rq_type != LI_POISON);
                         DEBUG_REQ(D_HA, cur, "req balanced");
@@ -760,7 +759,7 @@ int mdc_set_open_replay_data(struct obd_export *exp,
         LASSERT(rec != NULL);
 
         /* Incoming message in my byte order (it's been swabbed). */
-        LASSERT_REPSWABBED(open_req, DLM_REPLY_REC_OFF);
+        LASSERT(lustre_rep_swabbed(open_req, DLM_REPLY_REC_OFF));
 
         /* Outgoing messages always in my byte order. */
         LASSERT(body != NULL);
@@ -800,7 +799,7 @@ int mdc_set_open_replay_data(struct obd_export *exp,
                 LBUG();
         }
 
-        DEBUG_REQ(D_HA, open_req, "Set up open replay data");
+        DEBUG_REQ(D_RPCTRACE, open_req, "Set up open replay data");
         RETURN(0);
 }
 
@@ -870,7 +869,7 @@ int mdc_close(struct obd_export *exp, struct md_op_data *op_data,
         mdc_put_rpc_lock(obd->u.cli.cl_close_lock, NULL);
 
         if (req->rq_repmsg == NULL) {
-                CDEBUG(D_HA, "request failed to send: %p, %d\n", req,
+                CDEBUG(D_RPCTRACE, "request failed to send: %p, %d\n", req,
                        req->rq_status);
                 if (rc == 0)
                         rc = req->rq_status ? req->rq_status : -EIO;
@@ -1055,14 +1054,10 @@ static int mdc_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
         int rc;
         ENTRY;
 
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-        MOD_INC_USE_COUNT;
-#else
         if (!try_module_get(THIS_MODULE)) {
                 CERROR("Can't get module. Is it alive?");
                 return -EINVAL;
         }
-#endif
         switch (cmd) {
         case OBD_IOC_CLIENT_RECOVER:
                 rc = ptlrpc_recover_import(imp, data->ioc_inlbuf1);
@@ -1095,11 +1090,7 @@ static int mdc_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
                 GOTO(out, rc = -ENOTTY);
         }
 out:
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-        MOD_DEC_USE_COUNT;
-#else
         module_put(THIS_MODULE);
-#endif
 
         return rc;
 }