Re: [PATCH 08/14] scsi: sd: Optimal I/O size should be a multiple of reported granularity

Bart Van Assche
2022-03-03T20:17:59Z

On 3/1/22 21:35, Martin K. Petersen wrote:
> + if (min_xfer_bytes && opt_xfer_bytes & (min_xfer_bytes - 1)) {
> + sd_first_printk(KERN_WARNING, sdkp,
> + "Optimal transfer size %u bytes not a " \
> + "multiple of preferred minimum block " \
> + "size (%u bytes)\n",
> + opt_xfer_bytes, min_xfer_bytes);
> + return false;
> + }

Hmm ... what guarantees that min_xfer_bytes is a power of two? Did I perhaps
overlook something?

Thanks,

Bart.