From 29aa337d2d5067fdebeca55aba7b3b4c4b13e8e5 Mon Sep 17 00:00:00 2001 From: vitaly Date: Wed, 1 Aug 2007 19:43:59 +0000 Subject: [PATCH] Branch HEAD b= i=green i=shadow handling of zero connect flags in self export for ELC code --- lustre/ldlm/ldlm_request.c | 5 ++--- lustre/mdc/mdc_reint.c | 10 +++++----- lustre/osc/osc_request.c | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/lustre/ldlm/ldlm_request.c b/lustre/ldlm/ldlm_request.c index c781b30..bf7d244 100644 --- a/lustre/ldlm/ldlm_request.c +++ b/lustre/ldlm/ldlm_request.c @@ -517,11 +517,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, 0); - else + } else { ldlm_lock_list_put(cancels, l_bl_ast, count); + } RETURN(req); } diff --git a/lustre/mdc/mdc_reint.c b/lustre/mdc/mdc_reint.c index f14c7f6..6f8fc77 100644 --- a/lustre/mdc/mdc_reint.c +++ b/lustre/mdc/mdc_reint.c @@ -138,7 +138,7 @@ int mdc_setattr(struct obd_export *exp, struct md_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 + 5, 0); else ldlm_lock_list_put(&cancels, l_bl_ast, count); @@ -217,7 +217,7 @@ int mdc_create(struct obd_export *exp, struct md_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 + 4, 0); else ldlm_lock_list_put(&cancels, l_bl_ast, count); @@ -298,7 +298,7 @@ int mdc_unlink(struct obd_export *exp, struct md_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, 0); else ldlm_lock_list_put(&cancels, l_bl_ast, count); @@ -354,7 +354,7 @@ int mdc_link(struct obd_export *exp, struct md_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 + 4, 0); else ldlm_lock_list_put(&cancels, l_bl_ast, count); @@ -419,7 +419,7 @@ int mdc_rename(struct obd_export *exp, struct md_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 + 5, 0); else ldlm_lock_list_put(&cancels, l_bl_ast, count); diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 88c46c5..16b78f9 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -629,7 +629,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, 0); else ldlm_lock_list_put(&cancels, l_bl_ast, count); -- 1.8.3.1