All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
Cc: Nic Bellinger <nab@daterainc.com>,
	target-devel@vger.kernel.org, linux-scsi@vger.kernel.org,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH 3/6] target: use 'se_dev_entry' when allocating UAs
Date: Wed, 17 Jun 2015 08:20:23 +0200	[thread overview]
Message-ID: <558111A7.1060209@suse.de> (raw)
In-Reply-To: <1434521164.7916.182.camel@haakon3.risingtidesystems.com>

On 06/17/2015 08:06 AM, Nicholas A. Bellinger wrote:
> Hey Hannes,
> 
> Apologies for the delayed follow-up on these, one comment below.
> 
> On Thu, 2015-06-11 at 10:01 +0200, Hannes Reinecke wrote:
>> We need to use 'se_dev_entry' as argument when allocating
>> UAs, otherwise we'll never see any UAs for an implicit
>> ALUA state transition triggered from userspace.
>>
>> Signed-off-by: Hannes Reinecke <hare@suse.de>
>> ---
>>  drivers/target/target_core_alua.c      | 27 ++++++++++++++++++---------
>>  drivers/target/target_core_pr.c        | 31 +++++++++++++++++++++++++------
>>  drivers/target/target_core_transport.c | 18 ++++++++++++------
>>  drivers/target/target_core_ua.c        | 23 +++--------------------
>>  drivers/target/target_core_ua.h        |  2 +-
>>  5 files changed, 59 insertions(+), 42 deletions(-)
>>
> 
> <SNIP>
> 
>> diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c
>> index 436e30b..bb28a97 100644
>> --- a/drivers/target/target_core_pr.c
>> +++ b/drivers/target/target_core_pr.c
>> @@ -125,6 +125,25 @@ static struct t10_pr_registration *core_scsi3_locate_pr_reg(struct se_device *,
>>  					struct se_node_acl *, struct se_session *);
>>  static void core_scsi3_put_pr_reg(struct t10_pr_registration *);
>>  
>> +static void core_scsi3_pr_ua_allocate(struct se_node_acl *nacl,
>> +				      u32 unpacked_lun, u8 asc, u8 ascq)
>> +{
>> +	struct se_dev_entry *deve;
>> +
>> +	if (!nacl)
>> +		return;
>> +
>> +	rcu_read_lock();
>> +	deve = target_nacl_find_deve(nacl, unpacked_lun);
>> +	if (!deve) {
>> +		rcu_read_unlock();
>> +		return;
>> +	}
>> +
>> +	core_scsi3_ua_allocate(deve, asc, ascq);
>> +	rcu_read_unlock();
>> +}
>> +
> 
> This should be common for TCM_RESERVATION_CONFLICT case outside of PR
> code too.
> 
> Any objections for squashing the following into your original patch..?
> 
> Thank you,
> 
> --nab
> 
[ .. ]

None at all.
Do go ahead.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		               zSeries & Storage
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

  reply	other threads:[~2015-06-17  6:20 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-11  8:01 [PATCH 0/6] target: Update UA handling Hannes Reinecke
2015-06-11  8:01 ` [PATCH 1/6] target_core_alua: Correct UA handling when switching states Hannes Reinecke
2015-06-11  8:01 ` [PATCH 2/6] target: Remove 'ua_nacl' pointer from se_ua structure Hannes Reinecke
2015-06-11  8:01 ` [PATCH 3/6] target: use 'se_dev_entry' when allocating UAs Hannes Reinecke
2015-06-17  6:06   ` Nicholas A. Bellinger
2015-06-17  6:20     ` Hannes Reinecke [this message]
2015-06-11  8:01 ` [PATCH 4/6] target: Send UA on ALUA target port group change Hannes Reinecke
2015-06-19 13:05   ` Christoph Hellwig
2015-06-19 13:09     ` Hannes Reinecke
2015-06-19 13:13       ` Christoph Hellwig
2015-06-23  7:54     ` Nicholas A. Bellinger
2015-06-11  8:01 ` [PATCH 5/6] target: Send UA upon LUN RESET tmr completion Hannes Reinecke
2015-06-19 13:06   ` Christoph Hellwig
2015-06-19 13:07     ` Hannes Reinecke
2015-06-23  7:54     ` Nicholas A. Bellinger
2015-06-11  8:01 ` [PATCH 6/6] target: Send UA when changing LUN inventory Hannes Reinecke
2015-06-19 13:07   ` Christoph Hellwig
2015-06-19 13:10     ` Hannes Reinecke
2015-06-23  7:56     ` Nicholas A. Bellinger
2015-06-17  6:10 ` [PATCH 0/6] target: Update UA handling Nicholas A. Bellinger
2015-06-17  6:25   ` Hannes Reinecke
2015-06-17  7:01     ` Nicholas A. Bellinger

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=558111A7.1060209@suse.de \
    --to=hare@suse.de \
    --cc=hch@lst.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=nab@daterainc.com \
    --cc=nab@linux-iscsi.org \
    --cc=target-devel@vger.kernel.org \
    /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.