From: Bobi Jam Date: Mon, 26 Sep 2011 03:18:02 +0000 (+0800) Subject: LU-721 Parallel writes to same file results in a file of zeroes X-Git-Tag: v1_8_7_WC1_RC1~3 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=0f7efbe4dcc8c78fcf73660ded113bcaa6d5ae68;p=fs%2Flustre-release.git LU-721 Parallel writes to same file results in a file of zeroes Canceling lock may contain data being sent to OSTs. Change find_cbdata iterator to take that into account. Change-Id: Ifdb21472780331cba452db68a52fd15bb6cbe35c Author: Vladimir Saveliev Signed-off-by: Bobi Jam Reviewed-on: http://review.whamcloud.com/1422 Reviewed-by: Oleg Drokin Tested-by: Hudson Reviewed-by: Johann Lombardi Tested-by: Maloo --- diff --git a/lustre/llite/dcache.c b/lustre/llite/dcache.c index 70059ec..916b0ed 100644 --- a/lustre/llite/dcache.c +++ b/lustre/llite/dcache.c @@ -113,7 +113,8 @@ 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; } diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index 4effcd6..c32da7f 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -830,13 +830,14 @@ test_23a() { # was test_23 local sleep=1 while [ "$WAIT" -lt "$MAX_WAIT" ]; do sleep $sleep + ps -ef | grep mount PID1=$(ps -ef | awk '{print $2}' | grep -w $MOUNT_PID) PID2=$(ps -ef | awk '{print $2}' | grep -w $MOUNT_LUSTRE_PID) echo PID1=$PID1 echo PID2=$PID2 [ -z "$PID1" -a -z "$PID2" ] && break - echo "waiting for mount to finish ... " WAIT=$(( WAIT + sleep)) + echo "waited $WAIT seconds for mount to finish ... " done if [ "$WAIT" -eq "$MAX_WAIT" ]; then error "MOUNT_PID $MOUNT_PID and \