isert (the only user of this attribute) dynamically allocates (in a lazy fashion) the needed resources for PI so no need for it anymore. This is a revert of: "Target/configfs: Expose iSCSI network portal group T10-PI support" (8085176) "Target/iscsi: Add T10-PI indication for iscsi_portal_group" (5b168dc) Signed-off-by: Sagi Grimberg <sagig@xxxxxxxxxxxx> --- drivers/target/iscsi/iscsi_target_configfs.c | 6 ------ drivers/target/iscsi/iscsi_target_core.h | 5 +---- drivers/target/iscsi/iscsi_target_tpg.c | 21 --------------------- drivers/target/iscsi/iscsi_target_tpg.h | 1 - 4 files changed, 1 insertions(+), 32 deletions(-) diff --git a/drivers/target/iscsi/iscsi_target_configfs.c b/drivers/target/iscsi/iscsi_target_configfs.c index 9059c1e..12c9f1f 100644 --- a/drivers/target/iscsi/iscsi_target_configfs.c +++ b/drivers/target/iscsi/iscsi_target_configfs.c @@ -1050,11 +1050,6 @@ TPG_ATTR(demo_mode_discovery, S_IRUGO | S_IWUSR); */ DEF_TPG_ATTRIB(default_erl); TPG_ATTR(default_erl, S_IRUGO | S_IWUSR); -/* - * Define iscsi_tpg_attrib_s_t10_pi - */ -DEF_TPG_ATTRIB(t10_pi); -TPG_ATTR(t10_pi, S_IRUGO | S_IWUSR); static struct configfs_attribute *lio_target_tpg_attrib_attrs[] = { &iscsi_tpg_attrib_authentication.attr, @@ -1067,7 +1062,6 @@ static struct configfs_attribute *lio_target_tpg_attrib_attrs[] = { &iscsi_tpg_attrib_prod_mode_write_protect.attr, &iscsi_tpg_attrib_demo_mode_discovery.attr, &iscsi_tpg_attrib_default_erl.attr, - &iscsi_tpg_attrib_t10_pi.attr, NULL, }; diff --git a/drivers/target/iscsi/iscsi_target_core.h b/drivers/target/iscsi/iscsi_target_core.h index 302eb3b..8eacb55 100644 --- a/drivers/target/iscsi/iscsi_target_core.h +++ b/drivers/target/iscsi/iscsi_target_core.h @@ -58,8 +58,7 @@ #define TA_DEMO_MODE_DISCOVERY 1 #define TA_DEFAULT_ERL 0 #define TA_CACHE_CORE_NPS 0 -/* T10 protection information disabled by default */ -#define TA_DEFAULT_T10_PI 0 + #define ISCSI_IOV_DATA_BUFFER 5 @@ -766,7 +765,6 @@ struct iscsi_tpg_attrib { u32 prod_mode_write_protect; u32 demo_mode_discovery; u32 default_erl; - u8 t10_pi; struct iscsi_portal_group *tpg; }; @@ -790,7 +788,6 @@ struct iscsi_np { void *np_context; struct iscsit_transport *np_transport; struct list_head np_list; - struct iscsi_tpg_np *tpg_np; } ____cacheline_aligned; struct iscsi_tpg_np { diff --git a/drivers/target/iscsi/iscsi_target_tpg.c b/drivers/target/iscsi/iscsi_target_tpg.c index c3cb5c1..eb9601b 100644 --- a/drivers/target/iscsi/iscsi_target_tpg.c +++ b/drivers/target/iscsi/iscsi_target_tpg.c @@ -227,7 +227,6 @@ static void iscsit_set_default_tpg_attribs(struct iscsi_portal_group *tpg) a->prod_mode_write_protect = TA_PROD_MODE_WRITE_PROTECT; a->demo_mode_discovery = TA_DEMO_MODE_DISCOVERY; a->default_erl = TA_DEFAULT_ERL; - a->t10_pi = TA_DEFAULT_T10_PI; } int iscsit_tpg_add_portal_group(struct iscsi_tiqn *tiqn, struct iscsi_portal_group *tpg) @@ -501,7 +500,6 @@ struct iscsi_tpg_np *iscsit_tpg_add_network_portal( init_completion(&tpg_np->tpg_np_comp); kref_init(&tpg_np->tpg_np_kref); tpg_np->tpg_np = np; - np->tpg_np = tpg_np; tpg_np->tpg = tpg; spin_lock(&tpg->tpg_np_lock); @@ -860,22 +858,3 @@ int iscsit_ta_default_erl( return 0; } - -int iscsit_ta_t10_pi( - struct iscsi_portal_group *tpg, - u32 flag) -{ - struct iscsi_tpg_attrib *a = &tpg->tpg_attrib; - - if ((flag != 0) && (flag != 1)) { - pr_err("Illegal value %d\n", flag); - return -EINVAL; - } - - a->t10_pi = flag; - pr_debug("iSCSI_TPG[%hu] - T10 Protection information bit:" - " %s\n", tpg->tpgt, (a->t10_pi) ? - "ON" : "OFF"); - - return 0; -} diff --git a/drivers/target/iscsi/iscsi_target_tpg.h b/drivers/target/iscsi/iscsi_target_tpg.h index e726533..9a3efbb 100644 --- a/drivers/target/iscsi/iscsi_target_tpg.h +++ b/drivers/target/iscsi/iscsi_target_tpg.h @@ -38,6 +38,5 @@ extern int iscsit_ta_demo_mode_write_protect(struct iscsi_portal_group *, u32); extern int iscsit_ta_prod_mode_write_protect(struct iscsi_portal_group *, u32); extern int iscsit_ta_demo_mode_discovery(struct iscsi_portal_group *, u32); extern int iscsit_ta_default_erl(struct iscsi_portal_group *, u32); -extern int iscsit_ta_t10_pi(struct iscsi_portal_group *, u32); #endif /* ISCSI_TARGET_TPG_H */ -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html