From: Mike Christie <mchristi@redhat.com>
To: 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 3/5] target: add target_setup_session sysfs support
Date: Tue, 14 Apr 2020 00:28:35 -0500 [thread overview]
Message-ID: <5E954A03.7020802@redhat.com> (raw)
In-Reply-To: <20200414051514.7296-4-mchristi@redhat.com>
On 04/14/2020 12:15 AM, Mike Christie wrote:
> +/**
> + * target_setup_session - alloc and add a session to lio core
> + * @tpg: parent tpg
> + * @tag_num: if non-zero max num in-flight commands.
> + * @tag_size: if tag_num is non-zero, fabric driver's per cmd data in bytes.
> + * @sup_prot_ops: bitmask that defines which T10-PI modes are supported.
> + * @fabric_attrs: opt fabric driver session level attrs.
> + * @private: if setup_cb is non-NULL private will be passed to setup_cb.
> + * @setup_cb: opt function called before session has been added to lio core.
> + * @free_cb: function called during removal when all user refs have dropped.
> + *
> + * If the caller passes in a setup_cb that allocates resource a free_cb is
> + * required to free those resource during session removal.
> + *
> + * If the caller passes in fabric_attrs a free_cb is required, so resources
> + * it may access are freed when all users have dropped their references.
> + */
> struct se_session *
> target_setup_session(struct se_portal_group *tpg,
> unsigned int tag_num, unsigned int tag_size,
> enum target_prot_op prot_op,
> - const char *initiatorname, void *private,
> - int (*callback)(struct se_portal_group *,
> - struct se_session *, void *))
> + const char *initiatorname,
> + struct attribute_group *fabric_attrs, void *private,
> + int (*setup_cb)(struct se_portal_group *,
> + struct se_session *, void *),
> + void (*free_cb)(struct se_session *))
> {
> struct se_session *sess;
> + int rc;
>
Hey James,
For this, I just added a single attribute group. For elx will you want
to add multiple dirs under the session? Would just an array of attribute
groups work or do you want multiple nested dirs?
next prev parent reply other threads:[~2020-04-14 5:28 UTC|newest]
Thread overview: 16+ 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 ` [RFC PATCH 1/5] " Mike Christie
2020-04-15 2:23 ` Bart Van Assche
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-15 2:30 ` Bart Van Assche
2020-04-15 17:35 ` Mike Christie
2020-04-15 17:46 ` Mike Christie
2020-04-20 17:39 ` Bodo Stroesser
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:28 ` Mike Christie [this message]
2020-04-15 2:37 ` Bart Van Assche
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 ` [RFC PATCH 5/5] target: drop sess_get_index 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=5E954A03.7020802@redhat.com \
--to=mchristi@redhat.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 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).