From: Konstantin Shelekhin <k.shelekhin@yadro.com>
To: Mike Christie <michael.christie@oracle.com>
Cc: <martin.petersen@oracle.com>, <linux-scsi@vger.kernel.org>,
<target-devel@vger.kernel.org>
Subject: Re: [PATCH 5/5] scsi: target: Export fabric driver direct submit settings
Date: Thu, 13 Jul 2023 16:06:44 +0300 [thread overview]
Message-ID: <ZK_25KIJw-CudIXw@yadro.com> (raw)
In-Reply-To: <20230710214442.6718-6-michael.christie@oracle.com>
On Mon, Jul 10, 2023 at 04:44:42PM -0500, Mike Christie wrote:
> +static ssize_t
> +target_fabric_wwn_default_to_direct_submit_show(struct config_item *item,
> + char *page)
> +{
> + struct se_wwn *wwn = container_of(to_config_group(item), struct se_wwn,
> + param_group);
> + return sprintf(page, "%u\n", wwn->wwn_tf->tf_ops->default_direct_submit);
I belive we should do the right thing and use sysfs_emit() here. We
already have a bunch of issues with bad sprintf() usage and I think it
would be wise to promote safer interfaces.
> +static ssize_t
> +target_fabric_wwn_direct_submit_supported_show(struct config_item *item,
> + char *page)
> +{
> + struct se_wwn *wwn = container_of(to_config_group(item), struct se_wwn,
> + param_group);
> + return sprintf(page, "%u\n", wwn->wwn_tf->tf_ops->direct_submit_supp);
Same.
next prev parent reply other threads:[~2023-07-13 13:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-10 21:44 [PATCH 0/5] scsi: target: Allow userspace to config cmd submission Mike Christie
2023-07-10 21:44 ` [PATCH 1/5] scsi: target: Make write_pending_must_be_called a bit field Mike Christie
2023-07-10 21:44 ` [PATCH 2/5] scsi: target: Have drivers report if they support direct submissions Mike Christie
2023-07-10 21:44 ` [PATCH 3/5] scsi: target: Allow userspace to request " Mike Christie
2023-07-10 21:44 ` [PATCH 4/5] scsi: target: Unexport target_queue_submission Mike Christie
2023-07-10 21:44 ` [PATCH 5/5] scsi: target: Export fabric driver direct submit settings Mike Christie
2023-07-13 13:06 ` Konstantin Shelekhin [this message]
2023-07-13 15:50 ` 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=ZK_25KIJw-CudIXw@yadro.com \
--to=k.shelekhin@yadro.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=michael.christie@oracle.com \
--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.