From 0356a2376375020abb861423ce557767dadf593e Mon Sep 17 00:00:00 2001 From: Bobi Jam Date: Mon, 3 Oct 2011 12:44:37 +0800 Subject: [PATCH] LU-721 llite: Parallel writes to same file results in zero file Canceling lock may contain data being sent to OSTs. Change find_cbdata iterator to take that into account. Author: Vladimir Saveliev Signed-off-by: Bobi Jam Change-Id: I1b30fe13ee5303fe3b98e45ad969f5273c41d676 Reviewed-on: http://review.whamcloud.com/1460 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/llite/dcache.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lustre/llite/dcache.c b/lustre/llite/dcache.c index c969ffe..3396978 100644 --- a/lustre/llite/dcache.c +++ b/lustre/llite/dcache.c @@ -116,7 +116,9 @@ int ll_dcompare(struct dentry *parent, struct qstr *d_name, struct qstr *name) static inline int return_if_equal(struct ldlm_lock *lock, void *data) { - if (lock->l_flags & LDLM_FL_CANCELING) + if ((lock->l_flags & + (LDLM_FL_CANCELING | LDLM_FL_DISCARD_DATA)) == + (LDLM_FL_CANCELING | LDLM_FL_DISCARD_DATA)) return LDLM_ITER_CONTINUE; return LDLM_ITER_STOP; } -- 1.8.3.1