Message ID | 56B3D4D7.8060800@sandisk.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
> - .node_acl_size = sizeof(struct srpt_node_acl), > + .node_acl_size = sizeof(struct se_node_acl), just drop this line entirely, the core code will do the right thing. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 02/09/16 05:15, Christoph Hellwig wrote: >> - .node_acl_size = sizeof(struct srpt_node_acl), >> + .node_acl_size = sizeof(struct se_node_acl), > > just drop this line entirely, the core code will do the right thing. Hello Christoph, Can you show me the code in the LIO core that handles not specifying .node_acl_size ? I have tried to find it but haven't found it yet. Thanks, Bart. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, Feb 09, 2016 at 07:03:52AM -0800, Bart Van Assche wrote: > On 02/09/16 05:15, Christoph Hellwig wrote: >>> - .node_acl_size = sizeof(struct srpt_node_acl), >>> + .node_acl_size = sizeof(struct se_node_acl), >> >> just drop this line entirely, the core code will do the right thing. > > Hello Christoph, > > Can you show me the code in the LIO core that handles not specifying > .node_acl_size ? I have tried to find it but haven't found it yet. static struct se_node_acl *target_alloc_node_acl(struct se_portal_group *tpg, const unsigned char *initiatorname) { struct se_node_acl *acl; u32 queue_depth; acl = kzalloc(max(sizeof(*acl), tpg->se_tpg_tfo->node_acl_size), GFP_KERNEL); -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 02/09/16 07:08, Christoph Hellwig wrote: > On Tue, Feb 09, 2016 at 07:03:52AM -0800, Bart Van Assche wrote: >> On 02/09/16 05:15, Christoph Hellwig wrote: >>>> - .node_acl_size = sizeof(struct srpt_node_acl), >>>> + .node_acl_size = sizeof(struct se_node_acl), >>> >>> just drop this line entirely, the core code will do the right thing. >> >> Hello Christoph, >> >> Can you show me the code in the LIO core that handles not specifying >> .node_acl_size ? I have tried to find it but haven't found it yet. > > static struct se_node_acl *target_alloc_node_acl(struct se_portal_group *tpg, > const unsigned char *initiatorname) > { > struct se_node_acl *acl; > u32 queue_depth; > > acl = kzalloc(max(sizeof(*acl), tpg->se_tpg_tfo->node_acl_size), > GFP_KERNEL); Hello Christoph, Ah, thanks, I came across that code but had overlooked the "max()" part in the above code. I will resubmit this patch series. Bart. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index 4ee9678..e9e062d 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -3508,7 +3508,7 @@ static struct configfs_attribute *srpt_wwn_attrs[] = { static const struct target_core_fabric_ops srpt_template = { .module = THIS_MODULE, .name = "srpt", - .node_acl_size = sizeof(struct srpt_node_acl), + .node_acl_size = sizeof(struct se_node_acl), .get_fabric_name = srpt_get_fabric_name, .tpg_get_wwn = srpt_get_fabric_wwn, .tpg_get_tag = srpt_get_tag, diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.h b/drivers/infiniband/ulp/srpt/ib_srpt.h index 09037f2..b0ede97 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.h +++ b/drivers/infiniband/ulp/srpt/ib_srpt.h @@ -363,12 +363,4 @@ struct srpt_device { struct list_head list; }; -/** - * struct srpt_node_acl - Per-initiator ACL data (managed via configfs). - * @nacl: Target core node ACL information. - */ -struct srpt_node_acl { - struct se_node_acl nacl; -}; - #endif /* IB_SRPT_H */