X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Flov%2Flov_obd.c;h=dfecb74ec32cb1ad303613a72a6c2d4b32d6e2e2;hp=ff272686d48e94d8765c6448926c7dd14aa477f6;hb=9f59ef764e80542d82f3b78902615124ddac1020;hpb=fdbe952ae6488dbe2cd2c3fb884975ad86ad8e37 diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c index ff27268..dfecb74 100644 --- a/lustre/lov/lov_obd.c +++ b/lustre/lov/lov_obd.c @@ -1462,12 +1462,11 @@ static int lov_brw_check(struct lov_obd *lov, struct obdo *oa, for (i = 0; i < oa_bufs; i++) { int stripe = lov_stripe_number(lsm, pga[i].off); int ost = lsm->lsm_oinfo[stripe].loi_ost_idx; - struct ldlm_extent ext, subext; - ext.start = pga[i].off; - ext.end = pga[i].off + pga[i].count; + obd_off start, end; - if (!lov_stripe_intersects(lsm, i, ext.start, ext.end, - &subext.start, &subext.end)) + if (!lov_stripe_intersects(lsm, i, pga[i].off, + pga[i].off + pga[i].count, &start, + &end)) continue; if (lov->tgts[ost].active == 0) { @@ -2030,13 +2029,15 @@ static int lov_enqueue(struct obd_export *exp, struct lov_stripe_md *lsm, for (i = 0, loi = lsm->lsm_oinfo; i < lsm->lsm_stripe_count; i++, loi++, lov_lockhp++) { ldlm_policy_data_t sub_ext; + obd_off start, end; if (!lov_stripe_intersects(lsm, i, policy->l_extent.start, - policy->l_extent.end, - &sub_ext.l_extent.start, - &sub_ext.l_extent.end)) + policy->l_extent.end, &start, + &end)) continue; + sub_ext.l_extent.start = start; + sub_ext.l_extent.end = end; sub_ext.l_extent.gid = policy->l_extent.gid; if (lov->tgts[loi->loi_ost_idx].active == 0) { @@ -2173,14 +2174,16 @@ static int lov_match(struct obd_export *exp, struct lov_stripe_md *lsm, for (i = 0, loi = lsm->lsm_oinfo; i < lsm->lsm_stripe_count; i++, loi++, lov_lockhp++) { ldlm_policy_data_t sub_ext; + obd_off start, end; int lov_flags; if (!lov_stripe_intersects(lsm, i, policy->l_extent.start, - policy->l_extent.end, - &sub_ext.l_extent.start, - &sub_ext.l_extent.end)) + policy->l_extent.end, &start, &end)) continue; + sub_ext.l_extent.start = start; + sub_ext.l_extent.end = end; + if (lov->tgts[loi->loi_ost_idx].active == 0) { CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx); rc = -EIO;