[PATCH v2] block: limit the extract size to align queue limit

Christoph Hellwig hch at infradead.org
Thu Nov 9 22:36:47 PST 2023


On Fri, Nov 10, 2023 at 01:19:49PM +0800, ed.tsai at mediatek.com wrote:
> +	if (bdev && blk_queue_pci_p2pdma(bdev->bd_disk->queue))
>  		extraction_flags |= ITER_ALLOW_P2PDMA;

As pointed out in reply to Ming, you really need to first figure out
if we can assume we have a valid bdev or not, and if not pass all the
relevant information separately.

> +	if (bdev && bio_op(bio) != REQ_OP_ZONE_APPEND) {
> +		unsigned int max = queue_max_bytes(bdev_get_queue(bdev));

The higher level code must not look at queue_max_bytes, that is only
used for splitting and might not even be initialized.



More information about the Linux-mediatek mailing list