Re: [PATCH 08/10] scsi/scsi_bus: Add scsi_device_get

2020-09-30 Thread Maxim Levitsky
On Wed, 2020-09-30 at 19:46 +0200, Paolo Bonzini wrote: > On 30/09/20 16:32, Maxim Levitsky wrote: > > > Compared to Maxim's patch, I am avoiding the extra argument > > > to do_scsi_device_find by moving the RCU_READ_LOCK_GUARD() > > > out of do_scsi_device_find itself. > > Which is a good id

Re: [PATCH 08/10] scsi/scsi_bus: Add scsi_device_get

2020-09-30 Thread Paolo Bonzini
On 30/09/20 16:32, Maxim Levitsky wrote: >> Compared to Maxim's patch, I am avoiding the extra argument >> to do_scsi_device_find by moving the RCU_READ_LOCK_GUARD() >> out of do_scsi_device_find itself. > Which is a good idea, although my mindset was like, I got a device, > lets jus

Re: [PATCH 08/10] scsi/scsi_bus: Add scsi_device_get

2020-09-30 Thread Maxim Levitsky
On Fri, 2020-09-25 at 13:26 -0400, Paolo Bonzini wrote: > From: Maxim Levitsky > > Add scsi_device_get which finds the scsi device > and takes a reference to it. > > Suggested-by: Stefan Hajnoczi > Signed-off-by: Maxim Levitsky > Message-Id: <20200913160259.32145-8-mlevi...@redhat.com> > Signe

[PATCH 08/10] scsi/scsi_bus: Add scsi_device_get

2020-09-25 Thread Paolo Bonzini
From: Maxim Levitsky Add scsi_device_get which finds the scsi device and takes a reference to it. Suggested-by: Stefan Hajnoczi Signed-off-by: Maxim Levitsky Message-Id: <20200913160259.32145-8-mlevi...@redhat.com> Signed-off-by: Paolo Bonzini --- Compared to Maxim's patch, I am avoid