Re: [PATCH 1/2] nvmet_fc: add defer_req callback for deferment of cmd buffer return

2017-08-16 Thread Christoph Hellwig
On Thu, Aug 10, 2017 at 11:06:04AM +0200, Christoph Hellwig wrote: > > @@ -463,9 +472,9 @@ static struct nvmet_fc_fcp_iod * > > nvmet_fc_alloc_fcp_iod(struct nvmet_fc_tgt_queue *queue) > > { > > static struct nvmet_fc_fcp_iod *fod; > > This isn't new, but is this really supposed to be a

Re: [PATCH 1/2] nvmet_fc: add defer_req callback for deferment of cmd buffer return

2017-08-10 Thread Christoph Hellwig
> @@ -463,9 +472,9 @@ static struct nvmet_fc_fcp_iod * > nvmet_fc_alloc_fcp_iod(struct nvmet_fc_tgt_queue *queue) > { > static struct nvmet_fc_fcp_iod *fod; This isn't new, but is this really supposed to be a static variable, that is all instances of this code sharing it use the same?

Re: [PATCH 1/2] nvmet_fc: add defer_req callback for deferment of cmd buffer return

2017-08-10 Thread Christoph Hellwig
On Wed, Aug 02, 2017 at 10:16:17AM +0200, Johannes Thumshirn wrote: > On Tue, Aug 01, 2017 at 03:12:39PM -0700, James Smart wrote: > > @@ -463,9 +472,9 @@ static struct nvmet_fc_fcp_iod * > > nvmet_fc_alloc_fcp_iod(struct nvmet_fc_tgt_queue *queue) > > { > > static struct nvmet_fc_fcp_iod

Re: [PATCH 1/2] nvmet_fc: add defer_req callback for deferment of cmd buffer return

2017-08-02 Thread James Smart
On 8/2/2017 1:16 AM, Johannes Thumshirn wrote: + for (;;) { + deferfcp = list_first_entry_or_null(>pending_cmd_list, + struct nvmet_fc_defer_fcp_req, req_list); + if (!deferfcp) + break; while

Re: [PATCH 1/2] nvmet_fc: add defer_req callback for deferment of cmd buffer return

2017-08-02 Thread Johannes Thumshirn
On Tue, Aug 01, 2017 at 03:12:39PM -0700, James Smart wrote: > @@ -463,9 +472,9 @@ static struct nvmet_fc_fcp_iod * > nvmet_fc_alloc_fcp_iod(struct nvmet_fc_tgt_queue *queue) > { > static struct nvmet_fc_fcp_iod *fod; > - unsigned long flags; > > - spin_lock_irqsave(>qlock,

[PATCH 1/2] nvmet_fc: add defer_req callback for deferment of cmd buffer return

2017-08-01 Thread James Smart
At queue creation, the transport allocates a local job struct (struct nvmet_fc_fcp_iod) for each possible element of the queue. When a new CMD is received from the wire, a jobs struct is allocated from the queue and then used for the duration of the command. The job struct contains buffer space