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 <h...@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
h...@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)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to