Whamcloud - gitweb
Branch b1_6
authorvitaly <vitaly>
Wed, 1 Aug 2007 18:34:18 +0000 (18:34 +0000)
committervitaly <vitaly>
Wed, 1 Aug 2007 18:34:18 +0000 (18:34 +0000)
b=12916
i=green
i=shadow

handling of zero connect flags in self export for ELC code

lustre/ldlm/ldlm_request.c
lustre/mdc/mdc_reint.c
lustre/osc/osc_request.c

index 9c73ecf..3bc0fdd 100644 (file)
@@ -509,11 +509,10 @@ struct ptlrpc_request *ldlm_prep_enqueue_req(struct obd_export *exp,
                  * will incrment @lock_count according to the lock handle amount
                  * actually written to the buffer. */
                 dlm->lock_count = LDLM_ENQUEUE_CANCEL_OFF;
-        }
-        if (req)
                 ldlm_cli_cancel_list(cancels, count, req, DLM_LOCKREQ_OFF);
-        else
+        } else {
                 ldlm_lock_list_put(cancels, l_bl_ast, count);
+        }
         RETURN(req);
 }
 
index bc8ef76..c7ed24b 100644 (file)
@@ -127,7 +127,7 @@ int mdc_setattr(struct obd_export *exp, struct mdc_op_data *op_data,
         }
         req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION,
                               MDS_REINT, bufcount, size, NULL);
-        if (req)
+        if (exp_connect_cancelset(exp) && req)
                 ldlm_cli_cancel_list(&cancels, count, req, REQ_REC_OFF + 3);
         else
                 ldlm_lock_list_put(&cancels, l_bl_ast, count);
@@ -186,7 +186,7 @@ int mdc_create(struct obd_export *exp, struct mdc_op_data *op_data,
         }
         req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION,
                               MDS_REINT, bufcount, size, NULL);
-        if (req)
+        if (exp_connect_cancelset(exp) && req)
                 ldlm_cli_cancel_list(&cancels, count, req, REQ_REC_OFF + 3);
         else
                 ldlm_lock_list_put(&cancels, l_bl_ast, count);
@@ -242,7 +242,7 @@ int mdc_unlink(struct obd_export *exp, struct mdc_op_data *op_data,
         }
         req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION,
                               MDS_REINT, bufcount, size, NULL);
-        if (req)
+        if (exp_connect_cancelset(exp) && req)
                 ldlm_cli_cancel_list(&cancels, count, req, REQ_REC_OFF + 2);
         else
                 ldlm_lock_list_put(&cancels, l_bl_ast, count);
@@ -286,7 +286,7 @@ int mdc_link(struct obd_export *exp, struct mdc_op_data *op_data,
         }
         req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION,
                               MDS_REINT, bufcount, size, NULL);
-        if (req)
+        if (exp_connect_cancelset(exp) && req)
                 ldlm_cli_cancel_list(&cancels, count, req, REQ_REC_OFF + 2);
         else
                 ldlm_lock_list_put(&cancels, l_bl_ast, count);
@@ -336,7 +336,7 @@ int mdc_rename(struct obd_export *exp, struct mdc_op_data *op_data,
         }
         req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION,
                               MDS_REINT, bufcount, size, NULL);
-        if (req)
+        if (exp_connect_cancelset(exp) && req)
                 ldlm_cli_cancel_list(&cancels, count, req, REQ_REC_OFF + 3);
         else
                 ldlm_lock_list_put(&cancels, l_bl_ast, count);
index 3b02c24..c8dd618 100644 (file)
@@ -601,7 +601,7 @@ static int osc_destroy(struct obd_export *exp, struct obdo *oa,
         }
         req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_OST_VERSION,
                               OST_DESTROY, bufcount, size, NULL);
-        if (req)
+        if (exp_connect_cancelset(exp) && req)
                 ldlm_cli_cancel_list(&cancels, count, req, REQ_REC_OFF + 1);
         else
                 ldlm_lock_list_put(&cancels, l_bl_ast, count);