<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/nvme/target/fc.c, branch linux-5.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.9.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.9.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-08-28T23:43:57Z</updated>
<entry>
<title>nvmet-fc: Fix a missed _irqsave version of spin_lock in 'nvmet_fc_fod_op_done()'</title>
<updated>2020-08-28T23:43:57Z</updated>
<author>
<name>Christophe JAILLET</name>
</author>
<published>2020-08-21T07:58:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=70e37988db94aba607d5491a94f80ba08e399b6b'/>
<id>urn:sha1:70e37988db94aba607d5491a94f80ba08e399b6b</id>
<content type='text'>
The way 'spin_lock()' and 'spin_lock_irqsave()' are used is not consistent
in this function.

Use 'spin_lock_irqsave()' also here, as there is no guarantee that
interruptions are disabled at that point, according to surrounding code.

Fixes: a97ec51b37ef ("nvmet_fc: Rework target side abort handling")
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
</content>
</entry>
<entry>
<title>nvmet-fc: remove redundant del_work_active flag</title>
<updated>2020-07-29T05:45:20Z</updated>
<author>
<name>James Smart</name>
</author>
<published>2020-07-24T16:40:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ece0278c1c96905c53a6cbb253927530fc707cfa'/>
<id>urn:sha1:ece0278c1c96905c53a6cbb253927530fc707cfa</id>
<content type='text'>
The transport has a del_work_active flag to avoid duplicate scheduling
of the del_work item. This is redundant with the checks that
schedule_work() makes.

Remove the del_work_active flag.

Signed-off-by: James Smart &lt;jsmart2021@gmail.com&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>nvmet-fc: check successful reference in nvmet_fc_find_target_assoc</title>
<updated>2020-07-29T05:45:20Z</updated>
<author>
<name>James Smart</name>
</author>
<published>2020-07-24T16:40:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=34efa23234c8b55dd178bba2216ca9ae9b50e1c9'/>
<id>urn:sha1:34efa23234c8b55dd178bba2216ca9ae9b50e1c9</id>
<content type='text'>
When searching for an association based on an association id, when there
is a match, the code takes a reference. However, it is not validating
that the reference taking was successful.

Check the status of the reference. If unsuccessful, the device is being
deleted and should be ignored.

Signed-off-by: James Smart &lt;jsmart2021@gmail.com&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>nvmet-fc: slight cleanup for kbuild test warnings</title>
<updated>2020-05-09T22:18:35Z</updated>
<author>
<name>James Smart</name>
</author>
<published>2020-04-06T23:55:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e4fcc72c1a420bdbe425530dd19724214ceb44ec'/>
<id>urn:sha1:e4fcc72c1a420bdbe425530dd19724214ceb44ec</id>
<content type='text'>
The kbuild tst robot flagged the following 3 issues:

Case 1)
&gt;&gt; drivers/nvme/target/fc.c:1201:37: warning: Either the condition
&gt;&gt; '!assoc' is redundant or there is possible null pointer dereference:
&gt;&gt; assoc. [nullPointerRedundantCheck]
&gt;&gt;  struct nvmet_fc_tgtport *tgtport = assoc-&gt;tgtport;
                                       ^
&gt;&gt; drivers/nvme/target/fc.c:1853:7: note: Assuming that condition '!assoc'
&gt;&gt; is not redundant
&gt;&gt;   if (!assoc)
         ^
&gt;&gt; drivers/nvme/target/fc.c:1850:37: note: Assignment
&gt;&gt; 'assoc=nvmet_fc_find_target_assoc(tgtport,be64_to_cpu(
&gt;&gt;              rqst-&gt;associd.association_id))', assigned value is 0
&gt;&gt;   assoc = nvmet_fc_find_target_assoc(tgtport,
                                       ^
&gt;&gt; drivers/nvme/target/fc.c:1896:31: note: Calling function
&gt;&gt; 'nvmet_fc_delete_target_assoc', 1st argument 'assoc' value is 0
&gt;&gt;  nvmet_fc_delete_target_assoc(assoc);
                                 ^

The tool isn't smart enough to see that line 1854 sets a ret value which
thereafter causes the routine to exit. This occurs before any of the assoc
references, so it is not an issue. There are 2 more reportings of this
same failure.

To quiet the tool - rework the if test that does the exit to also
reference assoc.  No change in logic otherwise.

Case 2)
drivers/nvme/target/fc.c:1202:29: warning: The scope of the variable
'queue' can be reduced. [variableScope]
    struct nvmet_fc_tgt_queue *queue;
                               ^

The tool is requesting the variable be declared within the code block
that utilizes it. Ignoring this report as existing code style is fine.

Case 3)
drivers/nvme/target/fc.c:1137:16: warning: Variable 'needrandom' is
assigned a value that is never used. [unreadVariable]
       needrandom = true;
                  ^

Another parsing issue with the tool. Given that parens were not used
with the list_for_each_entry() check, it inadvertantly thinks the
break exited the outer while loop not the inner for loop.

This is not an error. But, added parens to the inner list_for_each_entry()
to quiet the tool and as it is better coding style.

-- james

Signed-off-by: James Smart &lt;jsmart2021@gmail.com&gt;
Reported-by: kbuild test robot &lt;lkp@intel.com&gt;
CC: kbuild test robot &lt;lkp@intel.com&gt;
CC: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>nvmet-fc: Add Disconnect Association Xmt support</title>
<updated>2020-05-09T22:18:34Z</updated>
<author>
<name>James Smart</name>
</author>
<published>2020-03-31T16:49:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=47bf3241064498878ffed10a69131be9154201eb'/>
<id>urn:sha1:47bf3241064498878ffed10a69131be9154201eb</id>
<content type='text'>
As part of FC-NVME-2 (and ammendment on FC-NVME), the target is to
send a Disconnect LS after an association is terminated and any
exchanges for the association have been ABTS'd. The target is also
not to send the receipt to any Disconnect Association LS, received
to initiate the association termination or received while the
association is terminating, until the Disconnect LS has been transmit.

Add support for sending Disconnect Association LS after all I/O's
complete (which is after ABTS'd certainly). Utilizes the new LLDD
api to send ls requests.

There is no need to track the Disconnect LS response or to retry
after timeout. All spec requirements will have been met by waiting
for i/o completion to initiate the transmission.

Add support for tracking the reception of Disconnect Association
and defering the response transmission until after the Disconnect
Association LS has been transmit.

Signed-off-by: James Smart &lt;jsmart2021@gmail.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>nvmet-fc: rename ls_list to ls_rcv_list</title>
<updated>2020-05-09T22:18:34Z</updated>
<author>
<name>James Smart</name>
</author>
<published>2020-03-31T16:49:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=349c694ee71ce0dfe4b9ccfac76ef5c1efb476cf'/>
<id>urn:sha1:349c694ee71ce0dfe4b9ccfac76ef5c1efb476cf</id>
<content type='text'>
In preparation to add ls request support, rename the current ls_list,
which is RCV LS request only, to ls_rcv_list.

Signed-off-by: James Smart &lt;jsmart2021@gmail.com&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>nvmet-fc: track hostport handle for associations</title>
<updated>2020-05-09T22:18:34Z</updated>
<author>
<name>James Smart</name>
</author>
<published>2020-03-31T16:49:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=58ab8ff9dca2142ba16ea02f7db9ba06eebbc37c'/>
<id>urn:sha1:58ab8ff9dca2142ba16ea02f7db9ba06eebbc37c</id>
<content type='text'>
In preparation for sending LS requests for an association that
terminates, save and track the hosthandle that is part of the
LS's that are received to create associations.

Support consists of:
- Create a hostport structure that will be 1:1 mapped to a
  host port handle. The hostport structure is specific to
  a targetport.
- Whenever an association is created, create a host port for
  the hosthandle the Create Association LS was received from.
  There will be only 1 hostport structure created, with all
  associations that have the same hosthandle sharing the
  hostport structure.
- When the association is terminated, the hostport reference
  will be removed. After the last association for the host
  port is removed, the hostport will be deleted.
- Add support for the new nvmet_fc_invalidate_host() interface.
  In the past, the LLDD didn't notify loss of connectivity to
  host ports - the LLD would simply reject new requests and wait
  for the kato timeout to kill the association. Now, when host
  port connectivity is lost, the LLDD can notify the transport.
  The transport will initiate the termination of all associations
  for that host port. When the last association has been terminated
  and the hosthandle will no longer be referenced, the new
  host_release callback will be made to the lldd.
- For compatibility with prior behavior which didn't report the
  hosthandle:  the LLDD must set hosthandle to NULL. In these
  cases, not LS request will be made, and no host_release callbacks
  will be made either.

Signed-off-by: James Smart &lt;jsmart2021@gmail.com&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>nvmet-fc: perform small cleanups on unneeded checks</title>
<updated>2020-05-09T22:18:34Z</updated>
<author>
<name>James Smart</name>
</author>
<published>2020-03-31T16:49:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0dfb992e0ec2e7b9e5ccf92d2261aaa6b5cc57a8'/>
<id>urn:sha1:0dfb992e0ec2e7b9e5ccf92d2261aaa6b5cc57a8</id>
<content type='text'>
While code reviewing saw a couple of items that can be cleaned up:
- In nvmet_fc_delete_target_queue(), the routine unlocks, then checks
  and relocks.  Reorganize to avoid the unlock/relock.
- In nvmet_fc_delete_target_queue(), there's a check on the disconnect
  state that is unnecessary as the routine validates the state before
  starting any action.

Signed-off-by: James Smart &lt;jsmart2021@gmail.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>nvmet-fc: add LS failure messages</title>
<updated>2020-05-09T22:18:34Z</updated>
<author>
<name>James Smart</name>
</author>
<published>2020-03-31T16:49:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a5c2b4f633cf06df62d24b0ef11f824e8da646a5'/>
<id>urn:sha1:a5c2b4f633cf06df62d24b0ef11f824e8da646a5</id>
<content type='text'>
Add LS reception failure messages

Signed-off-by: James Smart &lt;jsmart2021@gmail.com&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>nvmet-fc: Update target for common definitions for LS handling</title>
<updated>2020-05-09T22:18:33Z</updated>
<author>
<name>James Smart</name>
</author>
<published>2020-03-31T16:49:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ec3b0e3cc393dee1ad3f4bd1026f2c1f8b1c1ffb'/>
<id>urn:sha1:ec3b0e3cc393dee1ad3f4bd1026f2c1f8b1c1ffb</id>
<content type='text'>
Given that both host and target now generate and receive LS's create
a single table definition for LS names. Each tranport half will have
a local version of the table.

Convert the target side transport to use the new common Create
Association LS validation routine.

Signed-off-by: James Smart &lt;jsmart2021@gmail.com&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Reviewed-by: Himanshu Madhani &lt;himanshu.madhani@oracle.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
</feed>
