From: Rahul Deshmukh Date: Wed, 7 Apr 2010 17:18:18 +0000 (-0700) Subject: b=21966 can not mount mdt after umount X-Git-Tag: 1.10.0.40~7 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=3ec611d61138de3901944e4fdb50d8872fd472d5 b=21966 can not mount mdt after umount i=johann --- diff --git a/lustre/obdclass/lprocfs_status.c b/lustre/obdclass/lprocfs_status.c index 00ae233..e4b063e 100644 --- a/lustre/obdclass/lprocfs_status.c +++ b/lustre/obdclass/lprocfs_status.c @@ -831,7 +831,10 @@ int lprocfs_rd_import(char *page, char **start, off_t off, int count, cfs_atomic_read(&imp->imp_inval_count)); lprocfs_stats_collect(obd->obd_svc_stats, PTLRPC_REQWAIT_CNTR, &ret); - do_div(ret.lc_sum, ret.lc_count); + if (ret.lc_count != 0) + do_div(ret.lc_sum, ret.lc_count); + else + ret.lc_sum = 0; i += snprintf(page + i, count - i, " rpcs:\n" " inflight: %u\n" @@ -871,7 +874,7 @@ int lprocfs_rd_import(char *page, char **start, off_t off, int count, lprocfs_stats_collect(obd->obd_svc_stats, PTLRPC_LAST_CNTR + BRW_READ_BYTES + rw, &ret); - if (ret.lc_sum > 0) { + if (ret.lc_sum > 0 && ret.lc_count > 0) { do_div(ret.lc_sum, ret.lc_count); i += snprintf(page + i, count - i, " %s_data_averages:\n" @@ -882,7 +885,7 @@ int lprocfs_rd_import(char *page, char **start, off_t off, int count, k = (int)ret.lc_sum; j = opcode_offset(OST_READ + rw) + EXTRA_MAX_OPCODES; lprocfs_stats_collect(obd->obd_svc_stats, j, &ret); - if (ret.lc_sum > 0) { + if (ret.lc_sum > 0 && ret.lc_count != 0) { do_div(ret.lc_sum, ret.lc_count); i += snprintf(page + i, count - i, " %s_per_rpc: "LPU64"\n",