From: zam Date: Tue, 7 Jul 2009 09:43:43 +0000 (+0000) Subject: Branch HEAD X-Git-Tag: v1_9_220~50 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=65a3ea7ae327e1db678432e81e45d834e8932b4a;hp=c3e10ade1eec36d7ed4068922f2b915dae124aac Branch HEAD 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 b2ea15c..f0eee27 100644 --- a/lustre/lov/lov_request.c +++ b/lustre/lov/lov_request.c @@ -1325,18 +1325,18 @@ int lov_prep_punch_set(struct obd_export *exp, struct obd_info *oinfo, struct lov_request *req; obd_off rs, re; - 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; + 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);