From e7ac63b36f24f66bd3a73c20f9117c02ac73eeaf Mon Sep 17 00:00:00 2001 From: johann Date: Thu, 1 Oct 2009 12:15:01 +0000 Subject: [PATCH] Branch b1_8 b=20205 i=panda i=oleg i=vitaly don't call ost_rw_prolong_locks() for lockless i/o. --- lustre/ost/ost_handler.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index b95ed35..d10fb82 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -730,7 +730,11 @@ static int ost_brw_read(struct ptlrpc_request *req, struct obd_trans_info *oti) if (desc == NULL) GOTO(out_lock, rc = -ENOMEM); - ost_rw_prolong_locks(req, ioo, remote_nb, &body->oa, LCK_PW | LCK_PR); + if (!lustre_handle_is_used(&lockh)) + /* no needs to try to prolong lock if server is asked + * to handle locking (= OBD_BRW_SRVLOCK) */ + ost_rw_prolong_locks(req, ioo, remote_nb, &body->oa, + LCK_PW | LCK_PR); nob = 0; for (i = 0; i < npages; i++) { @@ -979,7 +983,10 @@ static int ost_brw_write(struct ptlrpc_request *req, struct obd_trans_info *oti) GOTO(out_lock, rc = -ETIMEDOUT); } - ost_rw_prolong_locks(req, ioo, remote_nb,&body->oa, LCK_PW); + if (!lustre_handle_is_used(&lockh)) + /* no needs to try to prolong lock if server is asked + * to handle locking (= OBD_BRW_SRVLOCK) */ + ost_rw_prolong_locks(req, ioo, remote_nb,&body->oa, LCK_PW); /* obd_preprw clobbers oa->valid, so save what we need */ if (body->oa.o_valid & OBD_MD_FLCKSUM) { -- 1.8.3.1