|
From: | Lin Ma |
Subject: | Re: [Question] About GET LBA STATUS(16) support in qemu scsi emulation layer |
Date: | Tue, 10 Mar 2020 13:51:24 +0000 |
Due to no users complain about it so far, It seems not many people need it.
I'll spend some time reading some code of qemu block and diving into SCSI command manual, then try to implement it.
If anyone's willing to implement it before this, it will be appreciated.
Thanks for your valuable information,
Lin
From: Stefan Hajnoczi
Sent: Tuesday, March 10, 2020 5:24 PM To: Lin Ma Cc: address@hidden; address@hidden; address@hidden; Eric Blake; Jon Maloy; address@hidden Subject: Re: [Question] About GET LBA STATUS(16) support in qemu scsi emulation layer 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 |
[Prev in Thread] | Current Thread | [Next in Thread] |