Re: [PATCH 11/15] target: export initiator port values for all sessions

2018-08-01 Thread Bart Van Assche
On Wed, 2018-08-01 at 11:44 -0500, Mike Christie wrote: > I agree knowing the acl info is useful, so how about the following: > > 1. Create a file named "acl" in the session's dir. > 2. For dynamic_node_acl=0 the acl file will return a empty string or > "generate_node_acls=1" or "demo mode

Re: [PATCH 11/15] target: export initiator port values for all sessions

2018-08-01 Thread Mike Christie
On 08/01/2018 11:44 AM, Mike Christie wrote: > 1. Create a file named "acl" in the session's dir. > 2. For dynamic_node_acl=0 the acl file will return a empty string or Miswrote this. Above should be dynamic_node_acl=1 > "generate_node_acls=1" or "demo mode enabled". > 3. For dynamic_node_acl=1

Re: [PATCH 11/15] target: export initiator port values for all sessions

2018-08-01 Thread Mike Christie
On 07/19/2018 12:07 PM, Bart Van Assche wrote: > On Thu, 2018-07-19 at 11:38 -0500, Mike Christie wrote: >> On 07/19/2018 10:37 AM, Bart Van Assche wrote: >>> The general recommendation for configfs is that each attribute contains a >>> single value, just like for sysfs. Patch 11/15 exports two

Re: [PATCH 11/15] target: export initiator port values for all sessions

2018-07-20 Thread Christoph Hellwig
On Thu, Jul 19, 2018 at 04:30:36PM -0500, Mike Christie wrote: > Just to clarify. We can create a dir from the kernel already. It is no > problem. I am doing that in this patchset with configfs_register_group. > > What Bart was requesting originally and what is missing is being able to > add a

Re: [PATCH 11/15] target: export initiator port values for all sessions

2018-07-19 Thread Mike Christie
On 07/19/2018 03:47 PM, Christoph Hellwig wrote: > On Thu, Jul 19, 2018 at 05:07:59PM +, Bart Van Assche wrote: >> Initially configfs did not support creation of a directory from the kernel >> side. Last time I brought this up with Christoph he replied that this >> functionality has been added

Re: [PATCH 11/15] target: export initiator port values for all sessions

2018-07-19 Thread Christoph Hellwig
On Thu, Jul 19, 2018 at 05:07:59PM +, Bart Van Assche wrote: > Initially configfs did not support creation of a directory from the kernel > side. Last time I brought this up with Christoph he replied that this > functionality has been added to configfs (if I understood Christoph > correctly).

Re: [PATCH 11/15] target: export initiator port values for all sessions

2018-07-19 Thread Bart Van Assche
On Thu, 2018-07-19 at 11:38 -0500, Mike Christie wrote: > On 07/19/2018 10:37 AM, Bart Van Assche wrote: > > The general recommendation for configfs is that each attribute contains a > > single value, just like for sysfs. Patch 11/15 exports two values through > > a single attribute. Have you

Re: [PATCH 11/15] target: export initiator port values for all sessions

2018-07-19 Thread Mike Christie
On 07/19/2018 10:37 AM, Bart Van Assche wrote: > On Sun, 2018-07-15 at 18:16 -0500, Mike Christie wrote: >> +if (se_sess->se_tpg->se_tpg_tfo->sess_get_initiator_sid) { >> +len = snprintf(page, PAGE_SIZE, "%s 0x%6phN\n", >> +

Re: [PATCH 11/15] target: export initiator port values for all sessions

2018-07-19 Thread Bart Van Assche
On Wed, 2018-07-18 at 21:15 -0500, Mike Christie wrote: > Oh wait, I think I know what you mean. I should have written "se_node_acl" instead of "se_portal_group". Bart.

Re: [PATCH 11/15] target: export initiator port values for all sessions

2018-07-19 Thread Bart Van Assche
On Sun, 2018-07-15 at 18:16 -0500, Mike Christie wrote: > + if (se_sess->se_tpg->se_tpg_tfo->sess_get_initiator_sid) { > + len = snprintf(page, PAGE_SIZE, "%s 0x%6phN\n", > +se_sess->se_node_acl->initiatorname, > +

Re: [PATCH 11/15] target: export initiator port values for all sessions

2018-07-18 Thread Mike Christie
On 07/18/2018 06:04 PM, Mike Christie wrote: > On 07/18/2018 05:41 PM, Bart Van Assche wrote: >> On Sun, 2018-07-15 at 18:16 -0500, Mike Christie wrote: >>> Export the initiator port info in configfs >> >> Does configfs support soft links? Can this information be exported as a >> soft link from

Re: [PATCH 11/15] target: export initiator port values for all sessions

2018-07-18 Thread Mike Christie
On 07/18/2018 05:41 PM, Bart Van Assche wrote: > On Sun, 2018-07-15 at 18:16 -0500, Mike Christie wrote: >> Export the initiator port info in configfs > > Does configfs support soft links? Can this information be exported as a > soft link from the session directory to the struct se_portal_group

Re: [PATCH 11/15] target: export initiator port values for all sessions

2018-07-18 Thread Bart Van Assche
On Sun, 2018-07-15 at 18:16 -0500, Mike Christie wrote: > Export the initiator port info in configfs Does configfs support soft links? Can this information be exported as a soft link from the session directory to the struct se_portal_group configfs object? Thanks, Bart.

[PATCH 11/15] target: export initiator port values for all sessions

2018-07-15 Thread Mike Christie
Export the initiator port info in configfs Signed-off-by: Mike Christie --- drivers/target/target_core_fabric_configfs.c | 48 1 file changed, 48 insertions(+) diff --git a/drivers/target/target_core_fabric_configfs.c b/drivers/target/target_core_fabric_configfs.c