Commit fede944d authored by paul luse's avatar paul luse Committed by Tomasz Zawadzki
Browse files

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: default avatarpaul luse <paul.e.luse@intel.com>
Change-Id: Ifdedf988072a4d79b4d84ed6fef2279d4883ee54
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472456


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent ccc1c72c
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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;