Skip to content
Snippets Groups Projects
Commit a00b7d1f authored by Danny Auble's avatar Danny Auble
Browse files

make sure all blocks are removed from all lists when freeing the block

parent 4ed88c0d
No related branches found
No related tags found
No related merge requests found
......@@ -1603,6 +1603,24 @@ static int _post_block_free(bg_record_t *bg_record, bool restore)
return SLURM_SUCCESS;
}
/* A bit of a sanity check to make sure blocks are being
removed out of all the lists.
*/
if (blocks_are_created) {
if (remove_from_bg_list(bg_lists->booted, bg_record)
== SLURM_SUCCESS)
error("block %s is being freed but hadn't been "
"removed from the booted block list yet.",
bg_record->bg_block_id);
if (remove_from_bg_list(bg_lists->job_running, bg_record)
== SLURM_SUCCESS) {
num_unused_cpus += bg_record->cpu_cnt;
error("block %s is being freed but hadn't been "
"removed from the running job block list yet.",
bg_record->bg_block_id);
}
}
if (restore)
return SLURM_SUCCESS;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment