Re: [PATCH-v2 11/12] xen-scsiback: Convert to percpu_ida tag allocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2016-01-27 at 11:57 +0100, Juergen Gross wrote:
> On 27/01/16 07:28, Nicholas A. Bellinger wrote:
> > On Tue, 2016-01-26 at 10:45 +0100, Juergen Gross wrote:
> >> On 25/01/16 09:11, Nicholas A. Bellinger wrote:
> >>> From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>
> >>>
> >>> Cc: Juergen Gross <jgross@xxxxxxxx>
> >>> Cc: Hannes Reinecke <hare@xxxxxxx>
> >>> Cc: David Vrabel <david.vrabel@xxxxxxxxxx>
> >>> Signed-off-by: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>
> >>> ---
> >>>  drivers/xen/xen-scsiback.c | 163 ++++++++++++++++++++++++---------------------
> >>>  1 file changed, 87 insertions(+), 76 deletions(-)
> >>>
> >>> diff --git a/drivers/xen/xen-scsiback.c b/drivers/xen/xen-scsiback.c
> >>> index 594f8a7..640fb22 100644
> >>> --- a/drivers/xen/xen-scsiback.c
> >>> +++ b/drivers/xen/xen-scsiback.c
> >>> @@ -190,7 +190,6 @@ module_param_named(max_buffer_pages, scsiback_max_buffer_pages, int, 0644);
> >>>  MODULE_PARM_DESC(max_buffer_pages,
> >>>  "Maximum number of free pages to keep in backend buffer");
> >>>  
> >>> -static struct kmem_cache *scsiback_cachep;
> >>>  static DEFINE_SPINLOCK(free_pages_lock);
> >>>  static int free_pages_num;
> >>>  static LIST_HEAD(scsiback_free_pages);
> >>> @@ -322,7 +321,8 @@ static void scsiback_free_translation_entry(struct kref *kref)
> >>>  }
> >>>  
> >>>  static void scsiback_do_resp_with_sense(char *sense_buffer, int32_t result,
> >>> -			uint32_t resid, struct vscsibk_pend *pending_req)
> >>> +			uint32_t resid, struct vscsibk_pend *pending_req,
> >>> +			uint16_t rqid)
> >>>  {
> >>>  	struct vscsiif_response *ring_res;
> >>>  	struct vscsibk_info *info = pending_req->info;
> >>
> >> pending_req might be NULL now, so this will panic the system.
> >>
> > 
> > Thanks for the review.
> > 
> > Added the following to propagate up original *info into
> > scsiback_do_resp_with_sense() to address the early pending_req
> > failure case.
> > 
> > https://git.kernel.org/cgit/linux/kernel/git/nab/target-pending.git/commit/?h=queue-next&id=5873f22a9b7c7aa16ff9a85074a07b739f1d06a5
> 
> Hmm, wouldn't it make more sense to split scsiback_do_resp_with_sense()
> into two functions now? Something like:
> 

<SNIP>

> And then call scsiback_send_response() directly in case pending_req
> is NULL.
> 

That makes alot more sense.

Just updated the series in queue-next, and folded your change into the
original patch.

Thanks Juergen.

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux