<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/scsi/hosts.c, branch linux-4.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-06-30T12:49:34Z</updated>
<entry>
<title>scsi: core: Put .shost_dev in failure path if host state changes to RUNNING</title>
<updated>2021-06-30T12:49:34Z</updated>
<author>
<name>Ming Lei</name>
</author>
<published>2021-06-02T13:30:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fbedbc8fb1dc2bc0545523ff6d6792d697a17ba9'/>
<id>urn:sha1:fbedbc8fb1dc2bc0545523ff6d6792d697a17ba9</id>
<content type='text'>
[ Upstream commit 11714026c02d613c30a149c3f4c4a15047744529 ]

scsi_host_dev_release() only frees dev_name when host state is
SHOST_CREATED. After host state has changed to SHOST_RUNNING,
scsi_host_dev_release() no longer cleans up.

Fix this by doing a put_device(&amp;shost-&gt;shost_dev) in the failure path when
host state is SHOST_RUNNING. Move get_device(&amp;shost-&gt;shost_gendev) before
device_add(&amp;shost-&gt;shost_dev) so that scsi_host_cls_release() can do a put
on this reference.

Link: https://lore.kernel.org/r/20210602133029.2864069-4-ming.lei@redhat.com
Cc: Bart Van Assche &lt;bvanassche@acm.org&gt;
Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Reported-by: John Garry &lt;john.garry@huawei.com&gt;
Tested-by: John Garry &lt;john.garry@huawei.com&gt;
Reviewed-by: John Garry &lt;john.garry@huawei.com&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Ming Lei &lt;ming.lei@redhat.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>scsi: core: Only put parent device if host state differs from SHOST_CREATED</title>
<updated>2021-06-16T09:34:54Z</updated>
<author>
<name>Ming Lei</name>
</author>
<published>2021-06-02T13:30:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f949bb6e67a363682a85f82797e70838d798086d'/>
<id>urn:sha1:f949bb6e67a363682a85f82797e70838d798086d</id>
<content type='text'>
commit 1e0d4e6225996f05271de1ebcb1a7c9381af0b27 upstream.

get_device(shost-&gt;shost_gendev.parent) is called after host state has
switched to SHOST_RUNNING. scsi_host_dev_release() shouldn't release the
parent device if host state is still SHOST_CREATED.

Link: https://lore.kernel.org/r/20210602133029.2864069-5-ming.lei@redhat.com
Cc: Bart Van Assche &lt;bvanassche@acm.org&gt;
Cc: John Garry &lt;john.garry@huawei.com&gt;
Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Tested-by: John Garry &lt;john.garry@huawei.com&gt;
Reviewed-by: John Garry &lt;john.garry@huawei.com&gt;
Signed-off-by: Ming Lei &lt;ming.lei@redhat.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mkp-fixes' into fixes</title>
<updated>2015-12-03T17:32:33Z</updated>
<author>
<name>James Bottomley</name>
</author>
<published>2015-12-03T17:32:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=be9e2f775f5a3147205c552534c3abf0f9374a13'/>
<id>urn:sha1:be9e2f775f5a3147205c552534c3abf0f9374a13</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix a memory leak in scsi_host_dev_release()</title>
<updated>2015-12-01T01:33:34Z</updated>
<author>
<name>Bart Van Assche</name>
</author>
<published>2015-11-18T22:56:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b49493f99690c8eaacfbc635bafaad629ea2c036'/>
<id>urn:sha1:b49493f99690c8eaacfbc635bafaad629ea2c036</id>
<content type='text'>
Avoid that kmemleak reports the following memory leak if a
SCSI LLD calls scsi_host_alloc() and scsi_host_put() but neither
scsi_host_add() nor scsi_host_remove(). The following shell
command triggers that scenario:

for ((i=0; i&lt;2; i++)); do
  srp_daemon -oac |
  while read line; do
    echo $line &gt;/sys/class/infiniband_srp/srp-mlx4_0-1/add_target
  done
done

unreferenced object 0xffff88021b24a220 (size 8):
  comm "srp_daemon", pid 56421, jiffies 4295006762 (age 4240.750s)
  hex dump (first 8 bytes):
    68 6f 73 74 35 38 00 a5                          host58..
  backtrace:
    [&lt;ffffffff8151014a&gt;] kmemleak_alloc+0x7a/0xc0
    [&lt;ffffffff81165c1e&gt;] __kmalloc_track_caller+0xfe/0x160
    [&lt;ffffffff81260d2b&gt;] kvasprintf+0x5b/0x90
    [&lt;ffffffff81260e2d&gt;] kvasprintf_const+0x8d/0xb0
    [&lt;ffffffff81254b0c&gt;] kobject_set_name_vargs+0x3c/0xa0
    [&lt;ffffffff81337e3c&gt;] dev_set_name+0x3c/0x40
    [&lt;ffffffff81355757&gt;] scsi_host_alloc+0x327/0x4b0
    [&lt;ffffffffa03edc8e&gt;] srp_create_target+0x4e/0x8a0 [ib_srp]
    [&lt;ffffffff8133778b&gt;] dev_attr_store+0x1b/0x20
    [&lt;ffffffff811f27fa&gt;] sysfs_kf_write+0x4a/0x60
    [&lt;ffffffff811f1e8e&gt;] kernfs_fop_write+0x14e/0x180
    [&lt;ffffffff81176eef&gt;] __vfs_write+0x2f/0xf0
    [&lt;ffffffff811771e4&gt;] vfs_write+0xa4/0x100
    [&lt;ffffffff81177c64&gt;] SyS_write+0x54/0xc0
    [&lt;ffffffff8151b257&gt;] entry_SYSCALL_64_fastpath+0x12/0x6f

Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Reviewed-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Reviewed-by: Lee Duncan &lt;lduncan@suse.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: use host wide tags by default</title>
<updated>2015-11-10T01:11:57Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2015-10-08T08:28:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=64d513ac31bd02a3c9b69ef04444f36c196f9a9d'/>
<id>urn:sha1:64d513ac31bd02a3c9b69ef04444f36c196f9a9d</id>
<content type='text'>
This patch changes the !blk-mq path to the same defaults as the blk-mq
I/O path by always enabling block tagging, and always using host wide
tags.  We've had blk-mq available for a few releases so bugs with
this mode should have been ironed out, and this ensures we get better
coverage of over tagging setup over different configs.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Acked-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Odin.com&gt;
</content>
</entry>
<entry>
<title>scsi: remove ordered_tag host template field</title>
<updated>2014-11-12T10:19:41Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2014-11-03T13:47:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=abd0c533e37789ef56a73562d6d06d39897bd801'/>
<id>urn:sha1:abd0c533e37789ef56a73562d6d06d39897bd801</id>
<content type='text'>
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Reviewed-by: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Reviewed-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
</content>
</entry>
<entry>
<title>scsi: fixup logging messages in scsi_error.c</title>
<updated>2014-11-12T10:16:06Z</updated>
<author>
<name>Hannes Reinecke</name>
</author>
<published>2014-10-24T12:27:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a222b1e2fe4299a01c86ea8ccafbf0a05aeaa5a1'/>
<id>urn:sha1:a222b1e2fe4299a01c86ea8ccafbf0a05aeaa5a1</id>
<content type='text'>
Use the matching scope for logging messages to allow for
better command tracing.

Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Suggested-by: Robert Elliott &lt;elliott@hp.com&gt;
Reviewed-by: Robert Elliott &lt;elliott@hp.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>scsi: add support for a blk-mq based I/O path.</title>
<updated>2014-07-25T21:16:28Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2014-01-17T11:06:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d285203cf647d7c97db3a1c33794315c9008593f'/>
<id>urn:sha1:d285203cf647d7c97db3a1c33794315c9008593f</id>
<content type='text'>
This patch adds support for an alternate I/O path in the scsi midlayer
which uses the blk-mq infrastructure instead of the legacy request code.

Use of blk-mq is fully transparent to drivers, although for now a host
template field is provided to opt out of blk-mq usage in case any unforseen
incompatibilities arise.

In general replacing the legacy request code with blk-mq is a simple and
mostly mechanical transformation.  The biggest exception is the new code
that deals with the fact the I/O submissions in blk-mq must happen from
process context, which slightly complicates the I/O completion handler.
The second biggest differences is that blk-mq is build around the concept
of preallocated requests that also include driver specific data, which
in SCSI context means the scsi_cmnd structure.  This completely avoids
dynamic memory allocations for the fast path through I/O submission.

Due the preallocated requests the MQ code path exclusively uses the
host-wide shared tag allocator instead of a per-LUN one.  This only
affects drivers actually using the block layer provided tag allocator
instead of their own.  Unlike the old path blk-mq always provides a tag,
although drivers don't have to use it.

For now the blk-mq path is disable by defauly and must be enabled using
the "use_blk_mq" module parameter.  Once the remaining work in the block
layer to make blk-mq more suitable for slow devices is complete I hope
to make it the default and eventually even remove the old code path.

Based on the earlier scsi-mq prototype by Nicholas Bellinger.

Thanks to Bart Van Assche and Robert Elliot for testing, benchmarking and
various sugestions and code contributions.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Reviewed-by: Webb Scales &lt;webbnh@hp.com&gt;
Acked-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Tested-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Tested-by: Robert Elliott &lt;elliott@hp.com&gt;
</content>
</entry>
<entry>
<title>scsi: use dev_printk variants where possible</title>
<updated>2014-07-17T20:07:42Z</updated>
<author>
<name>Hannes Reinecke</name>
</author>
<published>2014-06-25T14:39:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=91921e016a2199e7afe5933c94bd9f723d946598'/>
<id>urn:sha1:91921e016a2199e7afe5933c94bd9f723d946598</id>
<content type='text'>
Using dev_printk variants prefixes the logging message with
the originating device, which makes debugging easier.

Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Reviewed-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>[SCSI] scsi_error: disable eh_deadline if no host_reset_handler is set</title>
<updated>2014-03-15T17:18:59Z</updated>
<author>
<name>Hannes Reinecke</name>
</author>
<published>2014-01-17T15:05:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ad469a57643b322dc7a3bfc482e265e1e88f735a'/>
<id>urn:sha1:ad469a57643b322dc7a3bfc482e265e1e88f735a</id>
<content type='text'>
When the host template doesn't declare an eh_host_reset_handler
the eh_deadline mechanism is pointless and will set the
device to offline. So disable eh_deadline if no
eh_host_reset_handler is present.

Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
</feed>
