__u32 i;
__u32 idx;
int rc = 0;
+ int err = 0;
ENTRY;
if (rc) {
CERROR("%s: can't stat MDS #%d: rc = %d\n",
tgt->ltd_exp->exp_obd->obd_name, i, rc);
+ err = rc;
+ /* Try another MDT */
+ if (flags & OBD_STATFS_SUM)
+ continue;
GOTO(out_free_temp, rc);
}
* clients can be mounted as long as MDT0 is in
* service */
*osfs = *temp;
- break;
+ GOTO(out_free_temp, rc);
}
if (i == 0) {
osfs->os_granted += temp->os_granted;
}
}
-
- EXIT;
+ /* There is no stats from some MDTs, data incomplete */
+ if (err)
+ rc = err;
out_free_temp:
OBD_FREE(temp, sizeof(*temp));
- return rc;
+ RETURN(rc);
}
static int lmv_statfs_update(void *cookie, int rc)