[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Question] About GET LBA STATUS(16) support in qemu scsi emulation l
From: |
Stefan Hajnoczi |
Subject: |
Re: [Question] About GET LBA STATUS(16) support in qemu scsi emulation layer |
Date: |
Tue, 10 Mar 2020 09:24:46 +0000 |
On Tue, Mar 10, 2020 at 06:18:00AM +0000, Lin Ma wrote:
> First of all, Thanks for your reply, Stefan.
>
> We know that the GET LBA STATUS works well under scsi lun passthrough due to
> the vm directly talks to the scsi target.
> I'm curious that if I use file backend image(say qcow2) + qemu scsi
> emulation, Does it make sense if I issue sg_get_lba_status in vm to get the
> lba status?
> If it doesn't make sense, That could explain why qemu scsi emulation layer
> lack of this support for a long time and no user complains.
It does make sense to implement GET LBA STATUS because QEMU emulates the
UNMAP command.
Be careful though because there is no asynchronous bdrv_block_status()
API yet. Internally the BlockDriver->bdrv_co_block_status() function is
already asynchronous because it runs in a coroutine. It will be
necessary to expose a new bdrv_aio_get_block_status() or similar API so
the device models (i.e. SCSI emulation code) can take advantage of that.
Stefan
signature.asc
Description: PGP signature