From 3368b30eba35bdc17a1bd903650b04486d4ab5de Mon Sep 17 00:00:00 2001 From: shadow Date: Wed, 27 May 2009 09:59:46 +0000 Subject: [PATCH] don't return error if have particaly created objects for file. Branch HEAD b=18382 i=rread i=deen --- lustre/ChangeLog | 7 +++++++ lustre/lov/lov_qos.c | 3 ++- lustre/lov/lov_request.c | 7 ------- lustre/tests/sanity.sh | 5 ++--- lustre/tests/test-framework.sh | 3 +-- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 23ec4eb..2ef29c2 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -13,6 +13,13 @@ tbd Sun Microsystems, Inc. removed cwd "./" (refer to Bugzilla 14399). * File join has been disabled in this release, refer to Bugzilla 16929. +Severity : normal +Bugzilla : 18382 +Descriptoin: don't return error if have particaly created objects for file. +Details : lov_update_create_set uses set->set_success as index for created objects, + so if some requests will be failed, they will have hole at end of + array and we can use qos_shrink_lsm for allocate correct lsm. + Severity : enhancement Bugzilla : 17671 Description: Update OFED support to 1.4.1 diff --git a/lustre/lov/lov_qos.c b/lustre/lov/lov_qos.c index add23ae..b00808b 100644 --- a/lustre/lov/lov_qos.c +++ b/lustre/lov/lov_qos.c @@ -509,12 +509,13 @@ int qos_remedy_create(struct lov_request_set *set, struct lov_request *req) continue; /* check if objects has been created on this ost */ for (stripe = 0; stripe < lsm->lsm_stripe_count; stripe++) { + /* we try send create to this ost but he is failed */ if (stripe == req->rq_stripe) continue; + /* already have object at this stripe */ if (ost_idx == lsm->lsm_oinfo[stripe]->loi_ost_idx) break; } - if (stripe >= lsm->lsm_stripe_count) { req->rq_idx = ost_idx; rc = obd_create(lov->lov_tgts[ost_idx]->ltd_exp, diff --git a/lustre/lov/lov_request.c b/lustre/lov/lov_request.c index d0580f3..8e119f8 100644 --- a/lustre/lov/lov_request.c +++ b/lustre/lov/lov_request.c @@ -566,9 +566,6 @@ static int create_done(struct obd_export *exp, struct lov_request_set *set, rc = qos_remedy_create(set, req); lov_update_create_set(set, req, rc); - - if (rc) - break; } } @@ -576,11 +573,7 @@ static int create_done(struct obd_export *exp, struct lov_request_set *set, if (set->set_success == 0) GOTO(cleanup, rc); - /* If there was an explicit stripe set, fail. Otherwise, we - * got some objects and that's not bad. */ if (set->set_count != set->set_success) { - if (*lsmp) - GOTO(cleanup, rc); set->set_count = set->set_success; qos_shrink_lsm(set); } diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 9c1365a..33024f1 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -1010,11 +1010,10 @@ test_27n() { reset_enospc rm -f $DIR/d27/f27n - $SETSTRIPE $DIR/d27 -c 1 -i -1 exhaust_precreations 0 0x80000215 - + $SETSTRIPE -c -1 $DIR/d27 touch $DIR/d27/f27n || error - + $GETSTRIPE $DIR/d27/f27n reset_enospc } run_test 27n "create file with some full OSTs ==================" diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index e5a54bb..4b70da0 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -1698,8 +1698,7 @@ check_config () { mgshost=$(echo $mgshost | awk -F: '{print $1}') if [ "$mgshost" != "$myMGS_host" ]; then - FAIL_ON_ERROR=true \ - error "Bad config file: lustre is mounted with mgs $mgshost, but mgs_HOST=$mgs_HOST, NETTYPE=$NETTYPE + log "Bad config file: lustre is mounted with mgs $mgshost, but mgs_HOST=$mgs_HOST, NETTYPE=$NETTYPE Please use correct config or set mds_HOST correctly!" fi -- 1.8.3.1