module/compress: small code cleanup in poller
Previously used while loop with a break to pull one entry off of the queued list. Clarrify comment and get rid of while/break. Signed-off-by: paul luse <paul.e.luse@intel.com> Change-Id: Ifdedf988072a4d79b4d84ed6fef2279d4883ee54 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472456 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
ccc1c72ca2
commit
fede944d8c
@ -681,8 +681,10 @@ comp_dev_poller(void *args)
|
||||
*/
|
||||
rte_comp_op_free(deq_ops[i]);
|
||||
|
||||
/* Check if there are any pending comp ops to process */
|
||||
while (!TAILQ_EMPTY(&comp_bdev->queued_comp_ops)) {
|
||||
/* Check if there are any pending comp ops to process, only pull one
|
||||
* at a time off as _compress_operation() may re-queue the op.
|
||||
*/
|
||||
if (!TAILQ_EMPTY(&comp_bdev->queued_comp_ops)) {
|
||||
op_to_resubmit = TAILQ_FIRST(&comp_bdev->queued_comp_ops);
|
||||
rc = _compress_operation(op_to_resubmit->backing_dev,
|
||||
op_to_resubmit->src_iovs,
|
||||
@ -695,7 +697,6 @@ comp_dev_poller(void *args)
|
||||
TAILQ_REMOVE(&comp_bdev->queued_comp_ops, op_to_resubmit, link);
|
||||
free(op_to_resubmit);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user