From: zam Date: Thu, 25 Jun 2009 17:07:19 +0000 (+0000) Subject: Branch b1_8 X-Git-Tag: v1_8_2_01~1^2~290 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=60828019099932a38bd8ef80a755fada8f8997c7;p=fs%2Flustre-release.git Branch b1_8 b=19630 i=alexander.zarochentsev i=alexey.lyashkov fail truncate syscall if one ost is inactive. --- diff --git a/lustre/lov/lov_request.c b/lustre/lov/lov_request.c index c957b7f..ad56f04 100644 --- a/lustre/lov/lov_request.c +++ b/lustre/lov/lov_request.c @@ -1326,19 +1326,19 @@ int lov_prep_punch_set(struct obd_export *exp, struct obd_info *oinfo, struct lov_request *req; obd_off rs, re; - loi = oinfo->oi_md->lsm_oinfo[i]; - if (!lov->lov_tgts[loi->loi_ost_idx] || - !lov->lov_tgts[loi->loi_ost_idx]->ltd_active) { - CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx); - continue; - } - if (!lov_stripe_intersects(oinfo->oi_md, i, oinfo->oi_policy.l_extent.start, oinfo->oi_policy.l_extent.end, &rs, &re)) continue; + loi = oinfo->oi_md->lsm_oinfo[i]; + if (!lov->lov_tgts[loi->loi_ost_idx] || + !lov->lov_tgts[loi->loi_ost_idx]->ltd_active) { + CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx); + GOTO(out_set, rc = -EIO); + } + OBD_ALLOC(req, sizeof(*req)); if (req == NULL) GOTO(out_set, rc = -ENOMEM);