Re: [PATCH V5 2/6] ublk: prepare for supporting to register request buffer automatically

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

 



On 5/19/25 10:54 PM, Ming Lei wrote:
> @@ -2014,6 +2064,14 @@ static int ublk_commit_and_fetch(const struct ublk_queue *ubq,
>  		return -EINVAL;
>  	}
>  
> +	if (ublk_support_auto_buf_reg(ubq)) {
> +		if (io->flags & UBLK_IO_FLAG_AUTO_BUF_REG) {
> +			WARN_ON_ONCE(io_buffer_unregister_bvec(cmd, 0,
> +						issue_flags));
> +			io->flags &= ~UBLK_IO_FLAG_AUTO_BUF_REG;
> +		}
> +	}
> +

Debug or WARN_ON_ONCE() statements with side effects is generally not a
good idea, imho. Would be cleaner to do:

	ret = io_buffer_unregister_bvec(cmd, 0, issue_flags);
	WARN_ON_ONCE(ret);

and ditto for the next patch that then updates it.

But pretty minor, not worth a respin. This series looks ready to me at
this point.

-- 
Jens Axboe




[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