If HSM is active and the max request count is decreased, account for
that when checking to see if more requests should be started.
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I4dcf9ea192f9b354a9933e08d2ced9ced7b3bc7c
Reviewed-on: http://review.whamcloud.com/19382
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Frank Zago <fzago@cray.com>
Reviewed-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
int i, empty_slot, found;
/* Are agents full? */
- if (atomic_read(&cdt->cdt_request_count) ==
+ if (atomic_read(&cdt->cdt_request_count) >=
cdt->cdt_max_requests)
break;
enum agent_req_status status;
/* still room for work ? */
- if (atomic_read(&cdt->cdt_request_count) ==
+ if (atomic_read(&cdt->cdt_request_count) >=
cdt->cdt_max_requests)
break;