All of lore.kernel.org
 help / color / mirror / Atom feed
From: sagi@grimberg.me (Sagi Grimberg)
Subject: [PATCH rfc 3/3] nvmet: Add port transport active flag
Date: Wed, 4 Apr 2018 16:08:09 +0300	[thread overview]
Message-ID: <27bebeb1-75d7-9984-7b7b-e1389923a09a@grimberg.me> (raw)
In-Reply-To: <658c0e8d-cdc7-ab48-e4ad-c5ebdcbcbb11@mellanox.com>


> On 3/22/2018 9:03 PM, Sagi Grimberg wrote:
>> From: Israel Rukshin <israelr at mellanox.com>
>>
>> trstate port flag means that nvmet transport is active and ready for
> 
> *tractive
> 
> this is the configfs attribute name.

We should change it to trstate then...

>> diff --git a/drivers/nvme/target/configfs.c 
>> b/drivers/nvme/target/configfs.c
>> index e6b2d2af81b6..460eeb0c5801 100644
>> --- a/drivers/nvme/target/configfs.c
>> +++ b/drivers/nvme/target/configfs.c
>> @@ -268,6 +268,15 @@ static ssize_t nvmet_addr_trtype_store(struct 
>> config_item *item,
>> ? CONFIGFS_ATTR(nvmet_, addr_trtype);
>> +static ssize_t nvmet_addr_tractive_show(struct config_item *item, 
>> char *page)
>> +{
>> +??? struct nvmet_port *port = to_nvmet_port(item);
>> +
>> +??? return sprintf(page, "%d\n", nvmet_is_port_active(port));
>> +}
>> +
>> +CONFIGFS_ATTR_RO(nvmet_, addr_tractive);
>> +
> 
> addr_ prefix is needed for nvmetcli. Since this is a RO attribute, I'm 
> not sure we need this prefix. I guess It will be saved in the config 
> file (nvmetcli save) with no reason. And "nvmetcli restore" will try to 
> echo 1 in to a RO attribute.

Agreed.

  reply	other threads:[~2018-04-04 13:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-22 19:02 [PATCH rfc 0/3] nvmet-rdma automatic port re-activation Sagi Grimberg
2018-03-22 19:03 ` [PATCH rfc 1/3] nvmet-rdma: automatic listening " Sagi Grimberg
2018-03-25  8:25   ` Max Gurtovoy
2018-03-26  7:01   ` Max Gurtovoy
2018-04-04 13:06     ` Sagi Grimberg
2018-03-22 19:03 ` [PATCH rfc 2/3] nvmet: Add fabrics ops to port Sagi Grimberg
2018-03-22 19:03 ` [PATCH rfc 3/3] nvmet: Add port transport active flag Sagi Grimberg
2018-03-26  7:52   ` Max Gurtovoy
2018-04-04 13:08     ` Sagi Grimberg [this message]
2018-03-22 19:03 ` [PATCH 4/3 rfc nvmetcli] nvmetcli: expose nvmet port status and state Sagi Grimberg
2018-03-27  8:34   ` Nitzan Carmi
2018-04-11 16:17 ` [PATCH rfc 0/3] nvmet-rdma automatic port re-activation Max Gurtovoy

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=27bebeb1-75d7-9984-7b7b-e1389923a09a@grimberg.me \
    --to=sagi@grimberg.me \
    /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.