From: wangdi Date: Thu, 28 Jun 2007 05:13:39 +0000 (+0000) Subject: Branch: b1_6 X-Git-Tag: v1_8_0_110~1499 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=7e0e4c805519a4db33f27f552445cf778d0798fb;p=fs%2Flustre-release.git Branch: b1_6 Checking whether lov_tgts is NULL in some lov funcations. b=12576 i=adilger i=shadow --- diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 82f4e7a..f11b074 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -391,6 +391,11 @@ Bugzilla : 12646 Description: sanity.sh test_77h fails with "test_77h file compare failed" Details : test_77h uses a file which was messed by other test case. +Severity : normal +Bugzilla : 12576 +Description: Not Check whether lov_tgts is NULL in some lov functions +Details : Checking whether lov_tgts is NULL in some functions. + -------------------------------------------------------------------------------- 2007-05-03 Cluster File Systems, Inc. diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c index f03b82a..765e328 100644 --- a/lustre/lov/lov_obd.c +++ b/lustre/lov/lov_obd.c @@ -1944,6 +1944,10 @@ static int lov_change_cbdata(struct obd_export *exp, struct lov_stripe_md submd; loi = lsm->lsm_oinfo[i]; + if (!lov->lov_tgts[loi->loi_ost_idx]) { + CDEBUG(D_HA, "lov idx %d NULL \n", loi->loi_ost_idx); + continue; + } submd.lsm_object_id = loi->loi_id; submd.lsm_stripe_count = 0; rc = obd_change_cbdata(lov->lov_tgts[loi->loi_ost_idx]->ltd_exp, @@ -2029,8 +2033,12 @@ static int lov_cancel_unused(struct obd_export *exp, int err; loi = lsm->lsm_oinfo[i]; - if (!lov->lov_tgts[loi->loi_ost_idx] || - !lov->lov_tgts[loi->loi_ost_idx]->ltd_active) + if (!lov->lov_tgts[loi->loi_ost_idx]) { + CDEBUG(D_HA, "lov idx %d NULL\n", loi->loi_ost_idx); + continue; + } + + if (!lov->lov_tgts[loi->loi_ost_idx]->ltd_active) CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx); submd.lsm_object_id = loi->loi_id; @@ -2066,8 +2074,12 @@ static int lov_join_lru(struct obd_export *exp, int rc = 0; loi = lsm->lsm_oinfo[i]; - if (!lov->lov_tgts[loi->loi_ost_idx] || - !lov->lov_tgts[loi->loi_ost_idx]->ltd_active) + if (!lov->lov_tgts[loi->loi_ost_idx]) { + CDEBUG(D_HA, "lov idx %d NULL\n", loi->loi_ost_idx); + continue; + } + + if (!lov->lov_tgts[loi->loi_ost_idx]->ltd_active) CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx); submd.lsm_object_id = loi->loi_id;