<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/nvme/target/fc.c, branch linux-4.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.19.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.19.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-02-22T11:47:19Z</updated>
<entry>
<title>nvme-fc: fix a missing queue put in nvmet_fc_ls_create_association</title>
<updated>2023-02-22T11:47:19Z</updated>
<author>
<name>Amit Engel</name>
</author>
<published>2023-01-23T12:37:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8b226a02d18685a5ba2534bb33e7398bd5f5eac7'/>
<id>urn:sha1:8b226a02d18685a5ba2534bb33e7398bd5f5eac7</id>
<content type='text'>
[ Upstream commit 0cab4404874f2de52617de8400c844891c6ea1ce ]

As part of nvmet_fc_ls_create_association there is a case where
nvmet_fc_alloc_target_queue fails right after a new association with an
admin queue is created. In this case, no one releases the get taken in
nvmet_fc_alloc_target_assoc.  This fix is adding the missing put.

Signed-off-by: Amit Engel &lt;Amit.Engel@dell.com&gt;
Reviewed-by: James Smart &lt;jsmart2021@gmail.com&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>nvmet-fc: Fix a missed _irqsave version of spin_lock in 'nvmet_fc_fod_op_done()'</title>
<updated>2020-09-09T17:04:26Z</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=dff6a2c2828bce13f32c62029def97195f8830f6'/>
<id>urn:sha1:dff6a2c2828bce13f32c62029def97195f8830f6</id>
<content type='text'>
[ Upstream commit 70e37988db94aba607d5491a94f80ba08e399b6b ]

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;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>nvmet-fc: fix target sgl list on large transfers</title>
<updated>2018-07-24T11:44:09Z</updated>
<author>
<name>James Smart</name>
</author>
<published>2018-07-16T21:38:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d082dc1562a2ff0947b214796f12faaa87e816a9'/>
<id>urn:sha1:d082dc1562a2ff0947b214796f12faaa87e816a9</id>
<content type='text'>
The existing code to carve up the sg list expected an sg element-per-page
which can be very incorrect with iommu's remapping multiple memory pages
to fewer bus addresses. To hit this error required a large io payload
(greater than 256k) and a system that maps on a per-page basis. It's
possible that large ios could get by fine if the system condensed the
sgl list into the first 64 elements.

This patch corrects the sg list handling by specifically walking the
sg list element by element and attempting to divide the transfer up
on a per-sg element boundary. While doing so, it still tries to keep
sequences under 256k, but will exceed that rule if a single sg element
is larger than 256k.

Fixes: 48fa362b6c3f ("nvmet-fc: simplify sg list handling")
Cc: &lt;stable@vger.kernel.org&gt; # 4.14
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>nvmet-fc: increase LS buffer count per fc port</title>
<updated>2018-05-25T14:50:12Z</updated>
<author>
<name>James Smart</name>
</author>
<published>2018-05-21T23:27:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=17d78252ee568ecf94df6829c81578c0602991eb'/>
<id>urn:sha1:17d78252ee568ecf94df6829c81578c0602991eb</id>
<content type='text'>
Todays limit on concurrent LS's is very small - 4 buffers. With large
subsystem counts or large numbers of initiators connecting, the limit
may be exceeded.

Raise the LS buffer count to 256.

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>nvmet: constify struct nvmet_fabrics_ops</title>
<updated>2018-03-26T14:53:43Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2018-03-20T19:41:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e929f06d9eaab4dba14e730ef18aa85b76465db9'/>
<id>urn:sha1:e929f06d9eaab4dba14e730ef18aa85b76465db9</id>
<content type='text'>
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>nvmet_fc: prevent new io rqsts in possible isr completions</title>
<updated>2018-03-26T14:53:43Z</updated>
<author>
<name>James Smart</name>
</author>
<published>2018-02-28T22:49:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9d625f7792875e8119ac3f364f3fd71b8bfc1294'/>
<id>urn:sha1:9d625f7792875e8119ac3f364f3fd71b8bfc1294</id>
<content type='text'>
When a bio completion calls back into the transport for a
back-end io device, the request completion path can free
the transport io job structure allowing it to be reused for
other operations. The transport has a defer_rcv queue which
holds temporary cmd rcv ops while waitng for io job structures.
when the job frees, if there's a cmd waiting, it is picked up
and submitted for processing, which can call back out to the
bio path if it's a read.  Unfortunately, what is unknown is the
context of the original bio done call, and it may be in a state
(softirq) that is not compatible with submitting the new bio in
the same calling sequence. This is especially true when using
scsi back-end devices as scsi is in softirq when it makes the
done call.

Correct by scheduling the io to be started via workq rather
than calling the start new io path inline to the original bio
done path.

Signed-off-by: James Smart &lt;james.smart@broadcom.com&gt;
Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>nvmet-fc: cleanup nvmet add_port/remove_port</title>
<updated>2018-01-08T10:01:56Z</updated>
<author>
<name>James Smart</name>
</author>
<published>2017-11-29T23:11:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9ce1f2e12e017607fe17a67cea79ebcf0184e5b3'/>
<id>urn:sha1:9ce1f2e12e017607fe17a67cea79ebcf0184e5b3</id>
<content type='text'>
The current fc transport add_port routine validates that there is a
matching port to the target port config. It then takes a reference
on the targetport. The del_port removes the reference.

Unfortunately, if the LLDD undergoes a hw reset or driver unload and
wants to unreg the targetport, due to the reference, the targetport
effectively can't be removed. It requires the admin to remove the
port from the nvmet config first, which calls the del_port.
Note: it appears nvmetcli clear skips over the del_port call (I'm
not attempting to change that).

There's no real reason to take the reference. With FC, there is nothing
to enable or disable as the presence of the FC targetport implicitly
means its enabled, and removal of the targtport means its disabled.

Change add_port to simply validate and change remove_port to a noop.
No references are taken on the targetport.

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>nvmet/fc: Use sgl_alloc() and sgl_free()</title>
<updated>2018-01-06T16:18:00Z</updated>
<author>
<name>Bart Van Assche</name>
</author>
<published>2018-01-05T16:26:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4442b56fb5151e9a7e21c0f73aba5a071f559dce'/>
<id>urn:sha1:4442b56fb5151e9a7e21c0f73aba5a071f559dce</id>
<content type='text'>
Use the sgl_alloc() and sgl_free() functions instead of open coding
these functions.

Signed-off-by: Bart Van Assche &lt;bart.vanassche@wdc.com&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.com&gt;
Reviewed-by:  James Smart &lt;james.smart@broadcom.com&gt;
Cc: Keith Busch &lt;keith.busch@intel.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>nvmet-fc: correct ref counting error when deferred rcv used</title>
<updated>2017-11-20T07:38:12Z</updated>
<author>
<name>James Smart</name>
</author>
<published>2017-11-10T23:38:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=619c62dcc62b957d17cccde2081cad527b020883'/>
<id>urn:sha1:619c62dcc62b957d17cccde2081cad527b020883</id>
<content type='text'>
Whenever a cmd is received a reference is taken while looking up the
queue. The reference is removed after the cmd is done as the iod is
returned for reuse. The fod may be reused for a deferred (recevied but
no job context) cmd.  Existing code removes the reference only if the
fod is not reused for another command. Given the fod may be used for
one or more ios, although a reference was taken per io, it won't be
matched on the frees.

Remove the reference on every fod free. This pairs the references to
each io.

Signed-off-by: James Smart &lt;james.smart@broadcom.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: fix better length checking</title>
<updated>2017-11-16T18:27:04Z</updated>
<author>
<name>James Smart</name>
</author>
<published>2017-11-16T01:00:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cce75291ffd82eb5bac56b051f46f89e8c0d2918'/>
<id>urn:sha1:cce75291ffd82eb5bac56b051f46f89e8c0d2918</id>
<content type='text'>
Reorganize nvmet_fc_handle_fcp_rqst() so that the nvmet req.transfer_len
field is set after the call nvmet_req_init(). An update to nvmet now
has nvmet_req_init() clearing the field, thus the fc transport was losing
the value.

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