[libvirt] [PATCH 2/2] qemu: Remove virHostdevIsSCSIDevice from qemuIsSharedHostdev

Ján Tomko jtomko at redhat.com
Fri Jan 11 13:09:50 UTC 2019


On Fri, Jan 11, 2019 at 07:44:38AM -0500, John Ferlan wrote:
>
>
>On 1/11/19 3:26 AM, Ján Tomko wrote:
>> On Thu, Jan 10, 2019 at 06:40:33PM -0500, John Ferlan wrote:
>>> It's essentially dead code. The only way hostdev->shareable
>>> can be true is during virDomainHostdevDefParseXML when the
>>> result of virHostdevIsSCSIDevice is true.
>>
>> While this might be true in our current codebase,
>> I don't think this function should rely on the callers
>> to only fill in hostdev->shareable for VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI
>> to guard its usage of the hostdev->source union.
>>
>> Jano
>>
>
>OK - I guess I was trying to be "compete" and partially considering that
>there's no reason this method wouldn't work for other hostdev types
>(PCI, USB, SCSI_HOST, MDEV) beyond of course the fact that for those
>types virDomainHostdevDefParseXML doesn't parse the readonly and
>shareable subelements.
>
>It's also not named qemuIsShareSCSIHostdev, but it does filter on SCSI.
>Still the first patch ends up being the fix and I separated them because
>I wasn't sure and figured I'd take another opinion on it!
>
>Should I "assume" patch1 is SFF...
>

Yes,

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190111/31267d62/attachment-0001.sig>


More information about the libvir-list mailing list