diff --git a/src/plugins/burst_buffer/cray/burst_buffer_cray.c b/src/plugins/burst_buffer/cray/burst_buffer_cray.c index 0ade01f9917b4e50f956e804246cef61c5f26eb3..0b5c329a740a1c4352e9983b0026707dfbb6055b 100644 --- a/src/plugins/burst_buffer/cray/burst_buffer_cray.c +++ b/src/plugins/burst_buffer/cray/burst_buffer_cray.c @@ -700,15 +700,20 @@ static bb_job_t *_get_bb_job(struct job_record *job_ptr) * update that user's limit */ static void _apply_limits(void) { + bool update_pool_unfree = false; bb_alloc_t *bb_alloc; int i; + if (bb_state.bb_config.flags & BB_FLAG_EMULATE_CRAY) + update_pool_unfree = true; + for (i = 0; i < BB_HASH_SIZE; i++) { bb_alloc = bb_state.bb_ahash[i]; while (bb_alloc) { _set_assoc_mgr_ptrs(bb_alloc); bb_limit_add(bb_alloc->user_id, bb_alloc->size, - bb_alloc->pool, &bb_state, false); + bb_alloc->pool, &bb_state, + update_pool_unfree); bb_alloc = bb_alloc->next; } } @@ -1138,8 +1143,6 @@ static void _load_state(bool init_config) bb_state.bb_config.granularity = pools[i].granularity; bb_state.total_space = pools[i].quantity * pools[i].granularity; - if (bb_state.bb_config.flags & BB_FLAG_EMULATE_CRAY) - continue; bb_state.unfree_space = pools[i].quantity - pools[i].free; bb_state.unfree_space *= pools[i].granularity; @@ -1171,8 +1174,6 @@ static void _load_state(bool init_config) pool_ptr->total_space = pools[i].quantity * pools[i].granularity; pool_ptr->granularity = pools[i].granularity; - if (bb_state.bb_config.flags & BB_FLAG_EMULATE_CRAY) - continue; pool_ptr->unfree_space = pools[i].quantity - pools[i].free; pool_ptr->unfree_space *= pools[i].granularity; }