diff options
author | Hannes Reinecke <hare@suse.de> | 2015-06-11 10:01:27 +0200 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2015-06-22 23:55:27 -0700 |
commit | 3dd348fcaa407181585fcadc04b0cac6e31f9be0 (patch) | |
tree | 35b3f528414cc9986df44aecf70a0d28ebb4d35a /drivers/target/target_core_alua.c | |
parent | 1adff1b3a7f75a1c255b7fcab5676edf29d4a5d8 (diff) | |
download | op-kernel-dev-3dd348fcaa407181585fcadc04b0cac6e31f9be0.zip op-kernel-dev-3dd348fcaa407181585fcadc04b0cac6e31f9be0.tar.gz |
target: Send UA on ALUA target port group change
When the ALUA target port group changes an INQUIRY DATA CHANGE
UA needs to be sent.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_alua.c')
-rw-r--r-- | drivers/target/target_core_alua.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/target/target_core_alua.c b/drivers/target/target_core_alua.c index c56ae02..744f308 100644 --- a/drivers/target/target_core_alua.c +++ b/drivers/target/target_core_alua.c @@ -1880,12 +1880,19 @@ static void core_alua_put_tg_pt_gp_from_name( static void __target_attach_tg_pt_gp(struct se_lun *lun, struct t10_alua_tg_pt_gp *tg_pt_gp) { + struct se_dev_entry *se_deve; + assert_spin_locked(&lun->lun_tg_pt_gp_lock); spin_lock(&tg_pt_gp->tg_pt_gp_lock); lun->lun_tg_pt_gp = tg_pt_gp; list_add_tail(&lun->lun_tg_pt_gp_link, &tg_pt_gp->tg_pt_gp_lun_list); tg_pt_gp->tg_pt_gp_members++; + spin_lock(&lun->lun_deve_lock); + list_for_each_entry(se_deve, &lun->lun_deve_list, lun_link) + core_scsi3_ua_allocate(se_deve, 0x3f, + ASCQ_3FH_INQUIRY_DATA_HAS_CHANGED); + spin_unlock(&lun->lun_deve_lock); spin_unlock(&tg_pt_gp->tg_pt_gp_lock); } |