From 16158c53567e6a19e2827ea006cc24929d9a53ce Mon Sep 17 00:00:00 2001 From: yury Date: Mon, 24 Nov 2008 13:34:37 +0000 Subject: [PATCH] b=17631 r=shadow,panda - fixes long bulk unlink done synchronously in ptlrpcd thread which could cause asserion in umount time; --- lustre/ost/ost_handler.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index b50f84c..7e4c559 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -723,7 +723,7 @@ static int ost_brw_read(struct ptlrpc_request *req, struct obd_trans_info *oti) ost_bulk_timeout, desc); rc = l_wait_event(desc->bd_waitq, - !ptlrpc_bulk_active(desc) || + !ptlrpc_server_bulk_active(desc) || exp->exp_failed, &lwi); LASSERT(rc == 0 || rc == -ETIMEDOUT); /* Wait again if we changed deadline */ @@ -736,11 +736,11 @@ static int ost_brw_read(struct ptlrpc_request *req, struct obd_trans_info *oti) req->rq_deadline - start, cfs_time_current_sec() - req->rq_deadline); - ptlrpc_abort_bulk(desc); + ptlrpc_abort_bulk(req); } else if (exp->exp_failed) { DEBUG_REQ(D_ERROR, req, "Eviction on bulk PUT"); rc = -ENOTCONN; - ptlrpc_abort_bulk(desc); + ptlrpc_abort_bulk(req); } else if (!desc->bd_success || desc->bd_nob_transferred != desc->bd_nob) { DEBUG_REQ(D_ERROR, req, "%s bulk PUT %d(%d)", @@ -927,7 +927,7 @@ static int ost_brw_write(struct ptlrpc_request *req, struct obd_trans_info *oti) if (desc->bd_export->exp_failed) rc = -ENOTCONN; else - rc = ptlrpc_start_bulk_transfer (desc); + rc = ptlrpc_start_bulk_transfer(desc); if (rc == 0) { time_t start = cfs_time_current_sec(); do { @@ -938,7 +938,7 @@ static int ost_brw_write(struct ptlrpc_request *req, struct obd_trans_info *oti) lwi = LWI_TIMEOUT_INTERVAL(timeout, cfs_time_seconds(1), ost_bulk_timeout, desc); rc = l_wait_event(desc->bd_waitq, - !ptlrpc_bulk_active(desc) || + !ptlrpc_server_bulk_active(desc) || desc->bd_export->exp_failed, &lwi); LASSERT(rc == 0 || rc == -ETIMEDOUT); /* Wait again if we changed deadline */ @@ -951,11 +951,11 @@ static int ost_brw_write(struct ptlrpc_request *req, struct obd_trans_info *oti) req->rq_deadline - start, cfs_time_current_sec() - req->rq_deadline); - ptlrpc_abort_bulk(desc); + ptlrpc_abort_bulk(req); } else if (desc->bd_export->exp_failed) { DEBUG_REQ(D_ERROR, req, "Eviction on bulk GET"); rc = -ENOTCONN; - ptlrpc_abort_bulk(desc); + ptlrpc_abort_bulk(req); } else if (!desc->bd_success || desc->bd_nob_transferred != desc->bd_nob) { DEBUG_REQ(D_ERROR, req, "%s bulk GET %d(%d)", -- 1.8.3.1