<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/nvme/host/fc.c, branch linux-5.12.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.12.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.12.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-05-26T10:59:04Z</updated>
<entry>
<title>nvme-fc: clear q_live at beginning of association teardown</title>
<updated>2021-05-26T10:59:04Z</updated>
<author>
<name>James Smart</name>
</author>
<published>2021-05-11T04:56:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0477af297d6abedd5d26e82d4c77c7080ce5fd72'/>
<id>urn:sha1:0477af297d6abedd5d26e82d4c77c7080ce5fd72</id>
<content type='text'>
[ Upstream commit a7d139145a6640172516b193abf6d2398620aa14 ]

The __nvmf_check_ready() routine used to bounce all filesystem io if the
controller state isn't LIVE.  However, a later patch changed the logic so
that it rejection ends up being based on the Q live check.  The FC
transport has a slightly different sequence from rdma and tcp for
shutting down queues/marking them non-live.  FC marks its queue non-live
after aborting all ios and waiting for their termination, leaving a
rather large window for filesystem io to continue to hit the transport.
Unfortunately this resulted in filesystem I/O or applications seeing I/O
errors.

Change the FC transport to mark the queues non-live at the first sign of
teardown for the association (when I/O is initially terminated).

Fixes: 73a5379937ec ("nvme-fabrics: allow to queue requests for live queues")
Signed-off-by: James Smart &lt;jsmart2021@gmail.com&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Reviewed-by: Himanshu Madhani &lt;himanshu.madhani@oracle.com&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>nvme-fabrics: only reserve a single tag</title>
<updated>2021-03-18T04:38:48Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2021-03-03T12:28:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ed01fee283a067c72b2d6500046080dbc1bb9dae'/>
<id>urn:sha1:ed01fee283a067c72b2d6500046080dbc1bb9dae</id>
<content type='text'>
Fabrics drivers currently reserve two tags on the admin queue.  But
given that the connect command is only run on a freshly created queue
or after all commands have been force aborted we only need to reserve
a single tag.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Reviewed-by: Chaitanya Kulkarni &lt;chaitanya.kulkarni@wdc.com&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Reviewed-by: Daniel Wagner &lt;dwagner@suse.de&gt;
</content>
</entry>
<entry>
<title>nvme-fc: fix racing controller reset and create association</title>
<updated>2021-03-11T10:48:35Z</updated>
<author>
<name>James Smart</name>
</author>
<published>2021-03-09T00:51:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f20ef34d71abc1fc56b322aaa251f90f94320140'/>
<id>urn:sha1:f20ef34d71abc1fc56b322aaa251f90f94320140</id>
<content type='text'>
Recent patch to prevent calling __nvme_fc_abort_outstanding_ios in
interrupt context results in a possible race condition. A controller
reset results in errored io completions, which schedules error
work. The change of error work to a work element allows it to fire
after the ctrl state transition to NVME_CTRL_CONNECTING, causing
any outstanding io (used to initialize the controller) to fail and
cause problems for connect_work.

Add a state check to only schedule error work if not in the RESETTING
state.

Fixes: 19fce0470f05 ("nvme-fc: avoid calling _nvme_fc_abort_outstanding_ios from interrupt context")
Signed-off-by: Nigel Kirkland &lt;nkirkland2304@gmail.com&gt;
Signed-off-by: James Smart &lt;jsmart2021@gmail.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>nvme-fc: return NVME_SC_HOST_ABORTED_CMD when a command has been aborted</title>
<updated>2021-03-11T10:48:34Z</updated>
<author>
<name>Hannes Reinecke</name>
</author>
<published>2021-02-26T07:17:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ae3afe6308b43bbf49953101d4ba2c1c481133a8'/>
<id>urn:sha1:ae3afe6308b43bbf49953101d4ba2c1c481133a8</id>
<content type='text'>
When a command has been aborted we should return NVME_SC_HOST_ABORTED_CMD
to be consistent with the other transports.

Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Reviewed-by: James Smart &lt;jsmart2021@gmail.com&gt;
Reviewed-by: Daniel Wagner &lt;dwagner@suse.de&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>nvme-fc: set NVME_REQ_CANCELLED in nvme_fc_terminate_exchange()</title>
<updated>2021-03-11T10:48:34Z</updated>
<author>
<name>Hannes Reinecke</name>
</author>
<published>2021-02-26T07:17:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3c7aafbc8d3d4d90430dfa126847a796c3e4ecfc'/>
<id>urn:sha1:3c7aafbc8d3d4d90430dfa126847a796c3e4ecfc</id>
<content type='text'>
nvme_fc_terminate_exchange() is being called when exchanges are
being deleted, and as such we should be setting the NVME_REQ_CANCELLED
flag to have identical behaviour on all transports.

Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Reviewed-by: Keith Busch &lt;kbusch@kernel.org&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Reviewed-by: James Smart &lt;jsmart2021@gmail.com&gt;
Reviewed-by: Daniel Wagner &lt;dwagner@suse.de&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>nvme: constify static attribute_group structs</title>
<updated>2021-02-02T09:26:10Z</updated>
<author>
<name>Rikard Falkeborn</name>
</author>
<published>2021-01-08T23:41:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=60b152a50820a125336ecae26da489059fc61ce1'/>
<id>urn:sha1:60b152a50820a125336ecae26da489059fc61ce1</id>
<content type='text'>
The only usage of these is to put their addresses in arrays of pointers
to const attribute_groups. Make them const to allow the compiler to put
them in read-only memory.

Signed-off-by: Rikard Falkeborn &lt;rikard.falkeborn@gmail.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>nvme-fc: avoid calling _nvme_fc_abort_outstanding_ios from interrupt context</title>
<updated>2021-01-06T09:30:36Z</updated>
<author>
<name>James Smart</name>
</author>
<published>2020-12-02T01:52:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=19fce0470f05031e6af36e49ce222d0f0050d432'/>
<id>urn:sha1:19fce0470f05031e6af36e49ce222d0f0050d432</id>
<content type='text'>
Recent patches changed calling sequences. nvme_fc_abort_outstanding_ios
used to be called from a timeout or work context. Now it is being called
in an io completion context, which can be an interrupt handler.
Unfortunately, the abort outstanding ios routine attempts to stop nvme
queues and nested routines that may try to sleep, which is in conflict
with the interrupt handler.

Correct replacing the direct call with a work element scheduling, and the
abort outstanding ios routine will be called in the work element.

Fixes: 95ced8a2c72d ("nvme-fc: eliminate terminate_io use by nvme_fc_error_recovery")
Signed-off-by: James Smart &lt;james.smart@broadcom.com&gt;
Reported-by: Daniel Wagner &lt;dwagner@suse.de&gt;
Tested-by: Daniel Wagner &lt;dwagner@suse.de&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>nvme: use consistent macro name for timeout</title>
<updated>2020-12-01T19:36:35Z</updated>
<author>
<name>Chaitanya Kulkarni</name>
</author>
<published>2020-11-10T00:33:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dc96f93874c63e126087e1adf1973c9fecfdaa0c'/>
<id>urn:sha1:dc96f93874c63e126087e1adf1973c9fecfdaa0c</id>
<content type='text'>
This is purely a clenaup patch, add prefix NVME to the ADMIN_TIMEOUT to
make consistent with NVME_IO_TIMEOUT.

Signed-off-by: Chaitanya Kulkarni &lt;chaitanya.kulkarni@wdc.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>nvme-fc: remove nvme_fc_terminate_io()</title>
<updated>2020-10-27T09:02:29Z</updated>
<author>
<name>James Smart</name>
</author>
<published>2020-10-23T22:27:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ac9b820e713bdc8f340e7d65ca6a19b10b790f2a'/>
<id>urn:sha1:ac9b820e713bdc8f340e7d65ca6a19b10b790f2a</id>
<content type='text'>
__nvme_fc_terminate_io() is now called by only 1 place, in reset_work.
Consoldate and move the functionality of terminate_io into reset_work.

In reset_work, rather than calling the create_association directly,
schedule the connect work element to do its thing. After scheduling,
flush the connect work element to continue with semantic of not
returning until connect has been attempted at least once.

Signed-off-by: James Smart &lt;james.smart@broadcom.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>nvme-fc: eliminate terminate_io use by nvme_fc_error_recovery</title>
<updated>2020-10-27T09:02:08Z</updated>
<author>
<name>James Smart</name>
</author>
<published>2020-10-23T22:27:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=95ced8a2c72dd48167adc4981c3c465c491f2f02'/>
<id>urn:sha1:95ced8a2c72dd48167adc4981c3c465c491f2f02</id>
<content type='text'>
nvme_fc_error_recovery() special cases handling when in CONNECTING state
and calls __nvme_fc_terminate_io(). __nvme_fc_terminate_io() itself
special cases CONNECTING state and calls the routine to abort outstanding
ios.

Simplify the sequence by putting the call to abort outstanding I/Os
directly in nvme_fc_error_recovery.

Move the location of __nvme_fc_abort_outstanding_ios(), and
nvme_fc_terminate_exchange() which is called by it, to avoid adding
function prototypes for nvme_fc_error_recovery().

Signed-off-by: James Smart &lt;james.smart@broadcom.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
</feed>
