X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Futils%2Fobd.c;h=3f71f03db131204438c5f6595ff4852126edcd5c;hb=474f2670d63b66a77ee3acb72b18bc7b5afbec84;hp=ce86ae18188b7efd68961d2f8f1a0ed817ee886d;hpb=9045894fe0f5033334a39a35a6332dab4498e21e;p=fs%2Flustre-release.git diff --git a/lustre/utils/obd.c b/lustre/utils/obd.c index ce86ae1..3f71f03 100644 --- a/lustre/utils/obd.c +++ b/lustre/utils/obd.c @@ -3557,10 +3557,14 @@ static int llog_search_pool_cb(const char *record, void *data) if (lpd->lpd_cmd_type == LCFG_POOL_NEW || lpd->lpd_cmd_type == LCFG_POOL_DEL) { + /* In function mgs_pool_cmd(), a pool's pool_new/add + * record will be marked as "SKIP" if its pool_destroy/ + * remove record is logged later. That means the "SKIP" + * record won't be printed here and thus lpd_ost_num + * doesn't need to be decreased as well. + */ if (strstr(record, add_pool)) lpd->lpd_ost_num++; - if (strstr(record, rem_pool)) - lpd->lpd_ost_num--; } else if (lpd->lpd_ostname && lpd->lpd_ostname[0]) { if (strstr(record, lpd->lpd_ostname)) { lpd->lpd_pool_exists = true;