From: Hannes Reinecke <hare@suse.de>
To: Christoph Hellwig <hch@lst.de>
Cc: James Bottomley <james.bottomley@hansenpartnership.com>,
linux-scsi@vger.kernel.org,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Bart van Assche <bart.vanassche@sandisk.com>
Subject: Re: [PATCH 16/20] scsi_dh_alua: Use workqueue for RTPG
Date: Sat, 25 Jul 2015 17:58:44 +0200 [thread overview]
Message-ID: <55B3B234.80100@suse.de> (raw)
In-Reply-To: <20150724152115.GC29434@lst.de>
On 07/24/2015 05:21 PM, Christoph Hellwig wrote:
>> + char work_q_name[264];
>
> create_workqueue and friends now accept printf-like format
> string, so there is no need for this temporary buffer.
>
>> + int error;
>> + struct completion init_complete;
>
> Please rename error to init_error and only assign to it before calling
> complete().
>
> Also I'm not sure what the real point of init_complete is, shouldn't
> we just have a mutex held in alua_initialize and alua_activate to
> synchronize the two against each other?
>
Hmm. I guess I could; I'll check here.
>> + rcu_read_lock();
>> + pg = rcu_dereference(h->pg);
>> + if (pg) {
>> + kref_get(&pg->kref);
>> + rcu_read_unlock();
>> + alua_rtpg_queue(pg, sdev, NULL);
>> + kref_put(&pg->kref, release_port_group);
>> + } else
>> + rcu_read_unlock();
>> +}
>
> How about:
>
> rcu_read_lock();
> pg = rcu_dereference(h->pg);
> if (!pg) {
> rcu_read_unlock();
> return;
> }
>
> kref_get(&pg->kref);
> rcu_read_unlock();
> alua_rtpg_queue(pg, sdev, NULL);
> kref_put(&pg->kref, release_port_group);
>
Ok.
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-07-25 15:58 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-08 9:05 [PATCHv2 00/20] asynchronous ALUA device handler Hannes Reinecke
2015-07-08 9:05 ` [PATCH 01/20] scsi_dh_alua: Disable ALUA handling for non-disk devices Hannes Reinecke
2015-07-08 9:06 ` [PATCH 02/20] scsi_dh_alua: Use vpd_pg83 information Hannes Reinecke
2015-07-08 9:06 ` [PATCH 03/20] scsi_dh_alua: improved logging Hannes Reinecke
2015-07-08 9:06 ` [PATCH 04/20] scsi_dh_alua: Improve error handling Hannes Reinecke
2015-07-24 14:48 ` Christoph Hellwig
2015-07-25 15:42 ` Hannes Reinecke
2015-07-08 9:06 ` [PATCH 05/20] scsi: remove scsi_show_sense_hdr() Hannes Reinecke
2015-07-08 9:06 ` [PATCH 06/20] scsi_dh_alua: use flag for RTPG extended header Hannes Reinecke
2015-07-08 9:06 ` [PATCH 07/20] scsi_dh_alua: Pass buffer as function argument Hannes Reinecke
2015-07-24 14:48 ` Christoph Hellwig
2015-07-08 9:06 ` [PATCH 08/20] scsi_dh_alua: Make stpg synchronous Hannes Reinecke
2015-07-24 14:51 ` Christoph Hellwig
2015-07-25 15:44 ` Hannes Reinecke
2015-07-08 9:06 ` [PATCH 09/20] scsi_dh_alua: switch to scsi_execute() Hannes Reinecke
2015-07-24 14:53 ` Christoph Hellwig
2015-07-25 15:44 ` Hannes Reinecke
2015-07-08 9:06 ` [PATCH 10/20] scsi_dh_alua: put sense buffer on stack Hannes Reinecke
2015-07-08 9:06 ` [PATCH 11/20] scsi_dh_alua: Use separate alua_port_group structure Hannes Reinecke
2015-07-24 14:58 ` Christoph Hellwig
2015-07-25 15:52 ` Hannes Reinecke
2015-07-08 9:06 ` [PATCH 12/20] scsi_dh_alua: allocate RTPG buffer separately Hannes Reinecke
2015-07-24 14:59 ` Christoph Hellwig
2015-07-08 9:06 ` [PATCH 13/20] scsi_dh_alua: simplify sense code handling Hannes Reinecke
2015-07-24 15:00 ` Christoph Hellwig
2015-07-08 9:06 ` [PATCH 14/20] scsi_dh_alua: parse target device id Hannes Reinecke
2015-07-24 15:07 ` Christoph Hellwig
2015-07-24 15:28 ` Martin K. Petersen
2015-07-25 16:00 ` Hannes Reinecke
2015-07-25 15:53 ` Hannes Reinecke
2015-07-08 9:06 ` [PATCH 15/20] revert "scsi_dh_alua: ALUA hander attach should succeed while TPG is transitioning" Hannes Reinecke
2015-07-08 9:06 ` [PATCH 16/20] scsi_dh_alua: Use workqueue for RTPG Hannes Reinecke
2015-07-24 15:21 ` Christoph Hellwig
2015-07-25 15:58 ` Hannes Reinecke [this message]
2015-07-08 9:06 ` [PATCH 17/20] scsi_dh_alua: Recheck state on unit attention Hannes Reinecke
2015-07-08 9:06 ` [PATCH 18/20] scsi_dh_alua: update all port states Hannes Reinecke
2015-07-08 9:06 ` [PATCH 19/20] scsi_dh_alua: Send TEST UNIT READY to poll for transitioning Hannes Reinecke
2015-07-08 9:06 ` [PATCH 20/20] scsi_dh_alua: Update version to 2.0 Hannes Reinecke
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=55B3B234.80100@suse.de \
--to=hare@suse.de \
--cc=bart.vanassche@sandisk.com \
--cc=hch@lst.de \
--cc=james.bottomley@hansenpartnership.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/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.