Whamcloud - gitweb
LU-5556 target: limit bulk transfer time
[fs/lustre-release.git] / lustre / ofd / ofd_dev.c
index ac91062..85068c4 100644 (file)
@@ -1879,8 +1879,11 @@ static int ofd_rw_hpreq_lock_match(struct ptlrpc_request *req,
        if (!ostid_res_name_eq(&ioo->ioo_oid, &lock->l_resource->lr_name))
                RETURN(0);
 
+       /* a bulk write can only hold a reference on a PW extent lock */
        mode = LCK_PW;
        if (opc == OST_READ)
+               /* whereas a bulk read can be protected by either a PR or PW
+                * extent lock */
                mode |= LCK_PR;
 
        if (!(lock->l_granted_mode & mode))