From c0e39c1bcacc77357958bc40e367a9f8a04336d7 Mon Sep 17 00:00:00 2001 From: johann Date: Thu, 1 Oct 2009 09:44:06 +0000 Subject: [PATCH] Branch HEAD 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 a2fd9b9..7f8f046 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -698,7 +698,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++) { @@ -956,7 +960,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