All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Bogdanov <d.bogdanov@yadro.com>
To: Mike Christie <michael.christie@oracle.com>
Cc: Martin Petersen <martin.petersen@oracle.com>,
	<target-devel@vger.kernel.org>,
	Bart Van Assche <bvanassche@acm.org>,
	Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>,
	James Smart <james.smart@broadcom.com>,
	Ram Vegesna <ram.vegesna@broadcom.com>,
	Michael Cyr <mikecyr@linux.ibm.com>,
	Nilesh Javali <njavali@marvell.com>,
	<GR-QLogic-Storage-Upstream@marvell.com>,
	Chris Boot <bootc@bootc.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	Jason Wang <jasowang@redhat.com>, Juergen Gross <jgross@suse.com>,
	<linux-scsi@vger.kernel.org>, <linux@yadro.com>,
	Konstantin Shelekhin <k.shelekhin@yadro.com>
Subject: Re: [PATCH v2 12/12] target: add virtual remote target
Date: Mon, 13 Mar 2023 17:13:02 +0300	[thread overview]
Message-ID: <20230313141302.GA1031@yadro.com> (raw)
In-Reply-To: <f1f56999-931a-ebed-6458-89ff45573e59@oracle.com>

On Fri, Mar 10, 2023 at 04:32:32PM -0600, Mike Christie wrote:
> 
> Just some nits.
> 
> On 3/7/23 2:07 AM, Dmitry Bogdanov wrote:
> > +
> > +static int tcm_remote_port_link(
> > +     struct se_portal_group *se_tpg,
> > +     struct se_lun *lun)
> > +{
> > +     pr_debug("TCM_Remote_ConfigFS: Port Link LUN %lld Successful\n",
> > +               lun->unpacked_lun);
> 
> The l in lun should be one space to the left so it's under the ".
> It will then match the other code and checkpatch won't complain.
> 
> 
> > +     return 0;
> > +}
> > +
> > +static void tcm_remote_port_unlink(
> > +     struct se_portal_group *se_tpg,
> > +     struct se_lun *lun)
> > +{
> > +     pr_debug("TCM_Remote_ConfigFS: Port Unlink LUN %lld Successful\n",
> > +               lun->unpacked_lun);
> 
> Same as above.
> 
> > +}
> > +
> > +static struct se_portal_group *tcm_remote_make_tpg(
> > +     struct se_wwn *wwn,
> > +     const char *name)
> > +{
> > +     struct tcm_remote_hba *remote_hba = container_of(wwn,
> > +                     struct tcm_remote_hba, remote_hba_wwn);
> > +     struct tcm_remote_tpg *remote_tpg;
> > +     unsigned long tpgt;
> > +     int ret;
> > +
> > +     if (strstr(name, "tpgt_") != name) {
> > +             pr_err("Unable to locate \"tpgt_#\" directory group\n");
> > +             return ERR_PTR(-EINVAL);
> > +     }
> > +     if (kstrtoul(name+5, 10, &tpgt))
> 
> Add spaces so it looks like: "name + 5"
> 
> 
> 
> > +}
> > +
> > +static ssize_t tcm_remote_wwn_version_show(struct config_item *item, char *page)
> > +{
> > +     return sprintf(page, "TCM Remote Fabric module %s\n", TCM_REMOTE_VERSION);
> > +}
> 
> 
> Do we need this? I saw other LIO drivers like iscsi, fcoe and loop have them
> but they are never updated so it seems useless.
> 
> For something like stable trying to manage versions is going to be difficult
> as well, so it might just be more confusing.
> 

I absolutely agree that in-kernel modules should not have its own
versions. Kernel version is enough. 

But targetcli tool reads that file for a fabric and I don't want to
work it around when I will add support of remote fabric to it.
So, I am going to keep the version attribute.

> > +
> > +static int __init tcm_remote_fabric_init(void)
> > +{
> > +     int ret = -ENOMEM;
> 
> You can drop the -ENOMEM since we set ret the next line.

I can drop ret variable here at all.

> > +
> > +     ret = target_register_template(&remote_ops);
> > +     if (ret)
> > +             goto out;
> > +
> > +     return 0;
> > +
> > +out:
> > +     return ret;
> > +}
> > +
> 


      reply	other threads:[~2023-03-13 14:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-07  8:07 [PATCH v2 00/12] add virtual remote fabric Dmitry Bogdanov
2023-03-07  8:07 ` [PATCH v2 01/12] scsi: target: add default fabric ops callaouts Dmitry Bogdanov
2023-03-07  8:07 ` [PATCH v2 02/12] infiniband: srpt: remove default fabric ops callouts Dmitry Bogdanov
2023-03-07  8:07 ` [PATCH v2 03/12] scsi: ibmvscsit: " Dmitry Bogdanov
2023-03-07  8:07 ` [PATCH v2 04/12] scsi: target: loop: " Dmitry Bogdanov
2023-03-07  8:07 ` [PATCH v2 05/12] scsi: target: sbp: " Dmitry Bogdanov
2023-03-07  8:07 ` [PATCH v2 06/12] scsi: target: fcoe: " Dmitry Bogdanov
2023-03-07  8:07 ` [PATCH v2 07/12] usb: gadjet: f_tcm: " Dmitry Bogdanov
2023-03-10 22:08   ` Mike Christie
2023-03-07  8:07 ` [PATCH v2 08/12] vhost-scsi: " Dmitry Bogdanov
2023-03-07  8:07 ` [PATCH v2 09/12] xen-scsiback: " Dmitry Bogdanov
2023-03-07  8:44   ` Juergen Gross
2023-03-07  8:07 ` [PATCH v2 10/12] scsi: qla2xxx: " Dmitry Bogdanov
2023-03-07  8:07 ` [PATCH v2 11/12] scsi: efct: " Dmitry Bogdanov
2023-03-07  8:07 ` [PATCH v2 12/12] target: add virtual remote target Dmitry Bogdanov
2023-03-10 22:32   ` Mike Christie
2023-03-13 14:13     ` Dmitry Bogdanov [this message]

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=20230313141302.GA1031@yadro.com \
    --to=d.bogdanov@yadro.com \
    --cc=GR-QLogic-Storage-Upstream@marvell.com \
    --cc=bootc@bootc.net \
    --cc=bvanassche@acm.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=james.smart@broadcom.com \
    --cc=jasowang@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=jgross@suse.com \
    --cc=k.shelekhin@yadro.com \
    --cc=leon@kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux@yadro.com \
    --cc=martin.petersen@oracle.com \
    --cc=michael.christie@oracle.com \
    --cc=mikecyr@linux.ibm.com \
    --cc=mst@redhat.com \
    --cc=njavali@marvell.com \
    --cc=ram.vegesna@broadcom.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.