Re: [PATCH 7/9] block: assign batch completion handler in blk_poll()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 13, 2021 at 10:54:14AM -0600, Jens Axboe wrote:
> If an io_batch is passed in to blk_poll(), we need to assign the batch
> handler associated with this queue. This allows callers to complete
> an io_batch handler on by calling it.

blk_poll() is gone now :)

> +	if (iob) {
> +		iob->complete = q->mq_ops->complete_batch;
> +		if (!iob->complete) {
> +			WARN_ON_ONCE(iob->req_list);
> +			iob = NULL;
> +		}
> +	}

Assigning first and checking later looks a little strange, even if it
makes no actual difference.  Why not:

	if (iob && q->mq_ops->complete_batch)
	 	iob->complete = q->mq_ops->complete_batch;
	else
		iob = NULL;

Also I'd expect this patch in the series right after the other block
patches.



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux