From: Mike Christie <mchristi@redhat.com>
To: Bodo Stroesser <bstroesser@ts.fujitsu.com>,
jsmart2021@gmail.com, martin.petersen@oracle.com,
linux-scsi@vger.kernel.org, target-devel@vger.kernel.org,
nab@linux-iscsi.org
Subject: Re: [RFC PATCH 2/5] target: add sysfs session helper functions
Date: Mon, 20 Apr 2020 12:43:19 -0500 [thread overview]
Message-ID: <5E9DDF37.2020102@redhat.com> (raw)
In-Reply-To: <4416ba8f-5eae-9dfd-7e39-0f91d37d62e3@ts.fujitsu.com>
On 04/20/2020 12:39 PM, Bodo Stroesser wrote:
>
>
> On 04/14/20 07:15, Mike Christie wrote:
>> +static ssize_t session_acl_show(struct se_session *se_sess, char *page)
>> +{
>> + struct se_node_acl *acl;
>> + ssize_t len;
>> +
>> + acl = se_sess->se_node_acl;
>> + if (!acl)
>> + return -ENOTCONN;
>> +
>> + if (acl->dynamic_node_acl) {
>> + page[0] = '\0';
>> + len = 0;
>> + } else {
>> + len = snprintf(page, PAGE_SIZE, "%s\n", acl->initiatorname);
>> + }
>> +
>> + return len;
>> +}
>
> Would it be a good idea to provide more info about initiators using
> dynamic acl?
>
> For example the file could be named "initiatorname" instead of "acl" and
I added this info in another dir/file. I was just about to post a update.
The acl is just a way to reference the configfs dir the info would be
located in since you can symlink.
> always provide the initiatorname, while a boolean file "acl" could
> return "Y" or "1" for explicit acls, but "N" or "0" for dynamic acls.
I was trying to not duplicate what is already in configfs.
WARNING: multiple messages have this Message-ID (diff)
From: Mike Christie <mchristi@redhat.com>
To: Bodo Stroesser <bstroesser@ts.fujitsu.com>,
jsmart2021@gmail.com, martin.petersen@oracle.com,
linux-scsi@vger.kernel.org, target-devel@vger.kernel.org,
nab@linux-iscsi.org
Subject: Re: [RFC PATCH 2/5] target: add sysfs session helper functions
Date: Mon, 20 Apr 2020 17:43:19 +0000 [thread overview]
Message-ID: <5E9DDF37.2020102@redhat.com> (raw)
In-Reply-To: <4416ba8f-5eae-9dfd-7e39-0f91d37d62e3@ts.fujitsu.com>
On 04/20/2020 12:39 PM, Bodo Stroesser wrote:
>
>
> On 04/14/20 07:15, Mike Christie wrote:
>> +static ssize_t session_acl_show(struct se_session *se_sess, char *page)
>> +{
>> + struct se_node_acl *acl;
>> + ssize_t len;
>> +
>> + acl = se_sess->se_node_acl;
>> + if (!acl)
>> + return -ENOTCONN;
>> +
>> + if (acl->dynamic_node_acl) {
>> + page[0] = '\0';
>> + len = 0;
>> + } else {
>> + len = snprintf(page, PAGE_SIZE, "%s\n", acl->initiatorname);
>> + }
>> +
>> + return len;
>> +}
>
> Would it be a good idea to provide more info about initiators using
> dynamic acl?
>
> For example the file could be named "initiatorname" instead of "acl" and
I added this info in another dir/file. I was just about to post a update.
The acl is just a way to reference the configfs dir the info would be
located in since you can symlink.
> always provide the initiatorname, while a boolean file "acl" could
> return "Y" or "1" for explicit acls, but "N" or "0" for dynamic acls.
I was trying to not duplicate what is already in configfs.
next prev parent reply other threads:[~2020-04-20 17:43 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-14 5:15 [RFC PATCH 0/5] target: add sysfs support Mike Christie
2020-04-14 5:15 ` Mike Christie
2020-04-14 5:15 ` [RFC PATCH 1/5] " Mike Christie
2020-04-14 5:15 ` Mike Christie
2020-04-15 2:23 ` Bart Van Assche
2020-04-15 2:23 ` Bart Van Assche
2020-04-15 17:28 ` Mike Christie
2020-04-15 17:28 ` Mike Christie
2020-04-14 5:15 ` [RFC PATCH 2/5] target: add sysfs session helper functions Mike Christie
2020-04-14 5:15 ` Mike Christie
2020-04-15 2:30 ` Bart Van Assche
2020-04-15 2:30 ` Bart Van Assche
2020-04-15 17:35 ` Mike Christie
2020-04-15 17:35 ` Mike Christie
2020-04-15 17:46 ` Mike Christie
2020-04-15 17:46 ` Mike Christie
2020-04-20 17:39 ` Bodo Stroesser
2020-04-20 17:39 ` Bodo Stroesser
2020-04-20 17:43 ` Mike Christie [this message]
2020-04-20 17:43 ` Mike Christie
2020-04-14 5:15 ` [RFC PATCH 3/5] target: add target_setup_session sysfs support Mike Christie
2020-04-14 5:15 ` Mike Christie
2020-04-14 5:28 ` Mike Christie
2020-04-14 5:28 ` Mike Christie
2020-04-15 2:37 ` Bart Van Assche
2020-04-15 2:37 ` Bart Van Assche
2020-04-15 17:38 ` Mike Christie
2020-04-15 17:38 ` Mike Christie
2020-04-14 5:15 ` [RFC PATCH 4/5] iscsi target: use session sysfs helpers Mike Christie
2020-04-14 5:15 ` Mike Christie
2020-04-14 5:15 ` [RFC PATCH 5/5] target: drop sess_get_index Mike Christie
2020-04-14 5:15 ` Mike Christie
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=5E9DDF37.2020102@redhat.com \
--to=mchristi@redhat.com \
--cc=bstroesser@ts.fujitsu.com \
--cc=jsmart2021@gmail.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=nab@linux-iscsi.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.