From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: target-devel <target-devel@vger.kernel.org>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Christoph Hellwig <hch@lst.de>, Hannes Reinecke <hare@suse.de>,
Sagi Grimberg <sagig@mellanox.com>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Nicholas Bellinger <nab@linux-iscsi.org>
Subject: [PATCH-v3 10/10] target: Drop left-over se_lun->lun_status
Date: Tue, 26 May 2015 06:40:30 +0000 [thread overview]
Message-ID: <1432622430-25253-11-git-send-email-nab@linux-iscsi.org> (raw)
In-Reply-To: <1432622430-25253-1-git-send-email-nab@linux-iscsi.org>
From: Nicholas Bellinger <nab@linux-iscsi.org>
Now that se_portal_group->tpg_lun_hlist is a RCU protected hlist,
go ahead and drop the left-over lun->lun_status usage.
Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
---
drivers/target/target_core_tpg.c | 6 ------
include/target/target_core_base.h | 8 --------
2 files changed, 14 deletions(-)
diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c
index f66c208..91f8ddb 100644
--- a/drivers/target/target_core_tpg.c
+++ b/drivers/target/target_core_tpg.c
@@ -98,8 +98,6 @@ void core_tpg_add_node_to_devs(
mutex_lock(&tpg->tpg_lun_mutex);
hlist_for_each_entry_rcu(lun, &tpg->tpg_lun_hlist, link) {
- if (lun->lun_status != TRANSPORT_LUN_STATUS_ACTIVE)
- continue;
if (lun_orig && lun != lun_orig)
continue;
@@ -495,7 +493,6 @@ static int core_tpg_setup_virtual_lun0(struct se_portal_group *se_tpg)
int ret;
lun->unpacked_lun = 0;
- lun->lun_status = TRANSPORT_LUN_STATUS_FREE;
atomic_set(&lun->lun_acl_count, 0);
init_completion(&lun->lun_shutdown_comp);
spin_lock_init(&lun->lun_sep_lock);
@@ -608,7 +605,6 @@ struct se_lun *core_tpg_alloc_lun(
}
lun->unpacked_lun = unpacked_lun;
lun->lun_link_magic = SE_LUN_LINK_MAGIC;
- lun->lun_status = TRANSPORT_LUN_STATUS_FREE;
atomic_set(&lun->lun_acl_count, 0);
init_completion(&lun->lun_shutdown_comp);
spin_lock_init(&lun->lun_sep_lock);
@@ -638,7 +634,6 @@ int core_tpg_add_lun(
mutex_lock(&tpg->tpg_lun_mutex);
lun->lun_access = lun_access;
- lun->lun_status = TRANSPORT_LUN_STATUS_ACTIVE;
if (!(dev->se_hba->hba_flags & HBA_FLAGS_INTERNAL_USE))
hlist_add_head_rcu(&lun->link, &tpg->tpg_lun_hlist);
mutex_unlock(&tpg->tpg_lun_mutex);
@@ -658,7 +653,6 @@ void core_tpg_remove_lun(
core_dev_unexport(lun->lun_se_dev, tpg, lun);
mutex_lock(&tpg->tpg_lun_mutex);
- lun->lun_status = TRANSPORT_LUN_STATUS_FREE;
if (!(dev->se_hba->hba_flags & HBA_FLAGS_INTERNAL_USE))
hlist_del_rcu(&lun->link);
mutex_unlock(&tpg->tpg_lun_mutex);
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index 7908d6d..78ed2a8 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -119,12 +119,6 @@ enum hba_flags_table {
HBA_FLAGS_PSCSI_MODE = 0x02,
};
-/* struct se_lun->lun_status */
-enum transport_lun_status_table {
- TRANSPORT_LUN_STATUS_FREE = 0,
- TRANSPORT_LUN_STATUS_ACTIVE = 1,
-};
-
/* Special transport agnostic struct se_cmd->t_states */
enum transport_state_table {
TRANSPORT_NO_STATE = 0,
@@ -707,8 +701,6 @@ struct se_lun {
u16 lun_rtpi;
#define SE_LUN_LINK_MAGIC 0xffff7771
u32 lun_link_magic;
- /* See transport_lun_status_table */
- enum transport_lun_status_table lun_status;
u32 lun_access;
u32 lun_flags;
u32 unpacked_lun;
--
1.9.1
next prev parent reply other threads:[~2015-05-26 6:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-26 6:40 [PATCH-v3 00/10] target: se_node_acl + se_lun RCU conversions Nicholas A. Bellinger
2015-05-26 6:40 ` [PATCH-v3 01/10] target: Convert se_node_acl->device_list[] to RCU hlist Nicholas A. Bellinger
2015-05-26 6:40 ` [PATCH-v3 02/10] target/pr: Use atomic bitop for se_dev_entry->deve_flags reservation check Nicholas A. Bellinger
2015-05-26 6:40 ` [PATCH-v3 03/10] target/pr: Change alloc_registration to avoid pr_reg_tg_pt_lun Nicholas A. Bellinger
2015-05-26 6:40 ` [PATCH-v3 04/10] target/pr: cleanup core_scsi3_pr_seq_non_holder Nicholas A. Bellinger
2015-05-26 6:40 ` [PATCH-v3 05/10] target: Convert se_portal_group->tpg_lun_list[] to RCU hlist Nicholas A. Bellinger
2015-05-26 6:40 ` [PATCH-v3 06/10] target: Convert se_tpg->acl_node_lock to ->acl_node_mutex Nicholas A. Bellinger
2015-05-26 6:40 ` [PATCH-v3 07/10] target: Convert core_tpg_deregister to use list splice Nicholas A. Bellinger
2015-05-26 6:40 ` [PATCH-v3 08/10] target: Drop unused se_lun->lun_acl_list Nicholas A. Bellinger
2015-05-26 6:40 ` [PATCH-v3 09/10] target: Only reset specific dynamic entries during lun_group creation Nicholas A. Bellinger
2015-05-26 6:40 ` Nicholas A. Bellinger [this message]
2015-05-26 6:45 ` [PATCH-v3 00/10] target: se_node_acl + se_lun RCU conversions Nicholas A. Bellinger
-- strict thread matches above, loose matches on Subject: below --
2015-05-26 6:25 Nicholas A. Bellinger
2015-05-26 6:25 ` [PATCH-v3 10/10] target: Drop left-over se_lun->lun_status 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=1432622430-25253-11-git-send-email-nab@linux-iscsi.org \
--to=nab@linux-iscsi.org \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=sagig@mellanox.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).