[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 01/10] qdev: add "check if address free" callback for buses
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH 01/10] qdev: add "check if address free" callback for buses |
Date: |
Thu, 1 Oct 2020 01:37:11 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 |
On 30/09/20 16:27, Maxim Levitsky wrote:
> My patch that switches the direction in scsi_device_find, is supposed to be
> completely equavalent,
> based on the following train of thought:
>
> If scsi_device_find finds an exact match it returns only it, as before.
>
> Otherwise scsi_device_find were to scan from end of the list to the start,
> and every time,
> it finds a device with same channel/id it would update the target_dev
> and return it when it reaches the end of the list.
>
> If I am not mistaken this means that it would return _first_ device in the
> list that matches the channel/id.
> This is exactly what new version of scsi_device_find does.
Oh! I missed that subtlety. Thanks, that makes sense.
Paolo
- [PATCH 00/10] Fix scsi devices plug/unplug races w.r.t virtio-scsi iothread, Paolo Bonzini, 2020/09/25
- [PATCH 01/10] qdev: add "check if address free" callback for buses, Paolo Bonzini, 2020/09/25
- [PATCH 02/10] scsi: switch to bus->check_address, Paolo Bonzini, 2020/09/25
- [PATCH 05/10] device-core: use RCU for list of children of a bus, Paolo Bonzini, 2020/09/25
- [PATCH 07/10] scsi/scsi-bus: scsi_device_find: don't return unrealized devices, Paolo Bonzini, 2020/09/25
- [PATCH 08/10] scsi/scsi_bus: Add scsi_device_get, Paolo Bonzini, 2020/09/25