From 93ebfcb8bd53b410287dadcdd25c9e1321d17bcc Mon Sep 17 00:00:00 2001 From: shadow Date: Wed, 27 May 2009 09:45:30 +0000 Subject: [PATCH] don't return error if have particaly created objects for file. Branch b1_8 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 ++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 6edda58..a4ff564 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -14,6 +14,13 @@ tbd Sun Microsystems, Inc. of Lustre filesystem with 4K stack may cause a stack overflow. For more information, please refer to bugzilla 17630. +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 : 18357 Description: implement async create (obd_async_create) method for osc, to avoid diff --git a/lustre/lov/lov_qos.c b/lustre/lov/lov_qos.c index 71323a0..8d5556e 100644 --- a/lustre/lov/lov_qos.c +++ b/lustre/lov/lov_qos.c @@ -498,12 +498,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 bc0bc4b..c957b7f 100644 --- a/lustre/lov/lov_request.c +++ b/lustre/lov/lov_request.c @@ -593,9 +593,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; } } @@ -603,11 +600,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 d3f46d7..ccdc288 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -980,11 +980,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 ==================" -- 1.8.3.1