[PATCH V2 05/13] block: only account passthrough IO from userspace
Christoph Hellwig
hch at lst.de
Wed Jan 26 08:37:28 PST 2022
On Wed, Jan 26, 2022 at 05:59:08PM +0800, Ming Lei wrote:
> nvme just sets part0 to rq->bio, which is fine since nvme doesn't
> support partial completion.
>
> The simplest way could be to assign bio->bi_bdev with q->disk->part0 in both
> bio_copy_user_iov() and bio_map_user_iov(), which should cover most of cases.
> Given user io is always on device instead of partition even though the
> command is sent via partition bdev.
This would be easiest, but it would also assign them when called from
the SG driver. And that means these I/Os could be in flight when
detaching a SCSI ULP. At least without the freeze in del_gendisk
(or the local one in case of the sd driver).
More information about the Linux-nvme
mailing list