While we are cleaning a write lock, we don't need to check if
page cache pages under this lock are covered by another lock.
If a client needs to give up its lock, cleaning gigabytes of
page cache can take quite a long time.
Lustre-change: https://review.whamcloud.com/33090
Lustre-commit:
b9ebb17277c78101018a0cf4a63f6beb93b9baf0
Signed-off-by: Andrew Perepechko <c17827@cray.com>
Cray-bug-id: LUS-6352
Change-Id: I576130216ed4de4e352ea697bddb5ff83046443a
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Alexander Zarochentsev <c17826@cray.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@gmail.com>
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/35831
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
rc = 0;
}
- rc2 = osc_lock_discard_pages(env, obj, start, end, discard);
+ /*
+ * Do not try to match other locks with CLM_WRITE since we already
+ * know there're none
+ */
+ rc2 = osc_lock_discard_pages(env, obj, start, end,
+ mode == CLM_WRITE || discard);
if (rc == 0 && rc2 < 0)
rc = rc2;