All of lore.kernel.org
 help / color / mirror / Atom feed
From: jthumshirn@suse.de (Johannes Thumshirn)
Subject: [PATCH 1/2] nvmet_fc: add defer_req callback for deferment of cmd buffer return
Date: Wed, 2 Aug 2017 10:16:17 +0200	[thread overview]
Message-ID: <20170802081617.GD4256@linux-x5ow.site> (raw)
In-Reply-To: <20170801221240.31723-2-jsmart2021@gmail.com>

On Tue, Aug 01, 2017@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(&queue->qlock, flags);
> +	/* Caller must hold queue->qlock */
+       lockped_assert_held(&queue->qlock); 
So we can check if the caller really holds the queue lock.

> +
>  	fod = list_first_entry_or_null(&queue->fod_list,
>  					struct nvmet_fc_fcp_iod, fcp_list);
>  	if (fod) {

[...]

> +	for (;;) {
> +		deferfcp = list_first_entry_or_null(&queue->pending_cmd_list,
> +				struct nvmet_fc_defer_fcp_req, req_list);
> +		if (!deferfcp)
> +			break;

        while ((deferfcp = list_first_entry_or_null(&queue->pending_cmd_list,
				struct nvmet_fc_defer_fcp_req,
				req_list)) != NULL) {
?

Other than that,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>

-- 
Johannes Thumshirn                                          Storage
jthumshirn at suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

WARNING: multiple messages have this Message-ID (diff)
From: Johannes Thumshirn <jthumshirn@suse.de>
To: James Smart <jsmart2021@gmail.com>
Cc: linux-nvme@lists.infradead.org,
	James Smart <james.smart@broadcom.com>,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH 1/2] nvmet_fc: add defer_req callback for deferment of cmd buffer return
Date: Wed, 2 Aug 2017 10:16:17 +0200	[thread overview]
Message-ID: <20170802081617.GD4256@linux-x5ow.site> (raw)
In-Reply-To: <20170801221240.31723-2-jsmart2021@gmail.com>

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(&queue->qlock, flags);
> +	/* Caller must hold queue->qlock */
+       lockped_assert_held(&queue->qlock); 
So we can check if the caller really holds the queue lock.

> +
>  	fod = list_first_entry_or_null(&queue->fod_list,
>  					struct nvmet_fc_fcp_iod, fcp_list);
>  	if (fod) {

[...]

> +	for (;;) {
> +		deferfcp = list_first_entry_or_null(&queue->pending_cmd_list,
> +				struct nvmet_fc_defer_fcp_req, req_list);
> +		if (!deferfcp)
> +			break;

        while ((deferfcp = list_first_entry_or_null(&queue->pending_cmd_list,
				struct nvmet_fc_defer_fcp_req,
				req_list)) != NULL) {
?

Other than that,
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

  reply	other threads:[~2017-08-02  8:16 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-01 22:12 [PATCH 0/2] nvmet_fc: work around overalloc of queue elements James Smart
2017-08-01 22:12 ` James Smart
2017-08-01 22:12 ` [PATCH 1/2] nvmet_fc: add defer_req callback for deferment of cmd buffer return James Smart
2017-08-01 22:12   ` James Smart
2017-08-02  8:16   ` Johannes Thumshirn [this message]
2017-08-02  8:16     ` Johannes Thumshirn
2017-08-02 14:29     ` James Smart
2017-08-02 14:29       ` James Smart
2017-08-10  9:04     ` Christoph Hellwig
2017-08-10  9:04       ` Christoph Hellwig
2017-08-10  9:06   ` Christoph Hellwig
2017-08-10  9:06     ` Christoph Hellwig
2017-08-16  7:53     ` Christoph Hellwig
2017-08-16  7:53       ` Christoph Hellwig
2017-08-01 22:12 ` [PATCH 2/2] lpfc: support nvmet_fc defer_rcv callback James Smart
2017-08-01 22:12   ` James Smart
2017-08-02  8:32   ` Johannes Thumshirn
2017-08-02  8:32     ` Johannes Thumshirn
2017-08-02  9:17     ` Johannes Thumshirn
2017-08-02  9:17       ` Johannes Thumshirn
2017-08-02 14:32     ` James Smart
2017-08-02 14:32       ` James Smart
2017-08-10  9:08   ` Christoph Hellwig
2017-08-10  9:08     ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170802081617.GD4256@linux-x5ow.site \
    --to=jthumshirn@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.