t may be a long
time before I can update to a kernel version with these patches anyway.
Tony Battersby
Cybernetics
ements for the write()/read()
>>> async version 3 interface. They only accept the version 3 interface.
>> I don't think we should do this at all. Anyone who wants to use the
>> new async interfaces should use the v4 headers. As Tony Battersby
>> already said, the leg
On 12/4/18 3:30 PM, Andy Shevchenko wrote:
> On Tue, Dec 4, 2018 at 10:18 PM Matthew Wilcox wrote:
>> On Tue, Dec 04, 2018 at 12:14:43PM -0800, Andrew Morton wrote:
>>> Also, Andy had issues with the v2 series so it would be good to hear an
>>> update from him?
>> Certainly.
> Hmm... I certainly f
On 11/13/18 1:36 AM, Matthew Wilcox wrote:
> On Mon, Nov 12, 2018 at 10:46:35AM -0500, Tony Battersby wrote:
>> Prevent a possible endless loop with DMAPOOL_DEBUG enabled if a buggy
>> driver corrupts DMA pool memory.
>>
>> Signed-off-by: Tony Battersby
> I lik
On 11/12/18 11:32 AM, John Garry wrote:
> On 12/11/2018 15:42, Tony Battersby wrote:
>> dmapool originally tried to support pools without a device because
>> dma_alloc_coherent() supports allocations without a device. But nobody
>> ended up using dma pools without a device,
ng
'struct dma_page'. In big O notation, this improves the algorithm from
O(n^2) to O(n) while also reducing memory usage.
Thanks to Matthew Wilcox for the suggestion to use struct page.
Signed-off-by: Tony Battersby
---
--- linux/include/linux/mm_types.h.orig 2018-08-01 17:59:46.0
Rename fields in 'struct dma_page' in preparation for moving them into
'struct page'. No functional changes.
in_use -> dma_in_use
offset -> dma_free_off
Signed-off-by: Tony Battersby
---
--- linux/mm/dmapool.c.orig 2018-08-03 17:46:13.0 -0400
+++ linux/m
improves the algorithm from O(n^2) to O(n).
Signed-off-by: Tony Battersby
---
--- linux/mm/dmapool.c.orig 2018-08-03 16:16:49.0 -0400
+++ linux/mm/dmapool.c 2018-08-03 16:45:33.0 -0400
@@ -15,11 +15,16 @@
* Many older drivers still have their own code to do this
To represent the size of a single allocation, dmapool currently uses
'unsigned int' in some places and 'size_t' in other places. Standardize
on 'unsigned int' to reduce overhead, but use 'size_t' when counting all
the blocks in the entire pool.
Signed-o
hem.
Signed-off-by: Tony Battersby
---
--- linux/mm/dmapool.c.orig 2018-08-03 16:12:23.0 -0400
+++ linux/mm/dmapool.c 2018-08-03 16:13:44.0 -0400
@@ -277,7 +277,7 @@ void dma_pool_destroy(struct dma_pool *p
mutex_lock(&pools_reg_lock);
mutex_lock(&
Remove a small amount of code duplication between dma_pool_destroy() and
pool_free_page() in preparation for adding more code without having to
duplicate it. No functional changes.
Signed-off-by: Tony Battersby
---
--- linux/mm/dmapool.c.orig 2018-08-02 09:59:15.0 -0400
+++ linux/mm
ss ranges marked with "*" would not have
been used even though they didn't cross the given boundary.
Fixes: e34f44b3517f ("pool: Improve memory usage for devices which can't cross
boundaries")
Signed-off-by: Tony Battersby
---
Even though I described this as a "
I posted v3 on August 7. Nobody acked or merged the patches, and then
I got too busy with other stuff to repost until now.
The only change since v3:
*) Dropped patch #10 (the mpt3sas patch) since the mpt3sas maintainers
didn't show any interest.
I believe these patches are ready for merging.
--
Prevent a possible endless loop with DMAPOOL_DEBUG enabled if a buggy
driver corrupts DMA pool memory.
Signed-off-by: Tony Battersby
---
--- linux/mm/dmapool.c.orig 2018-08-06 17:52:53.0 -0400
+++ linux/mm/dmapool.c 2018-08-06 17:53:31.0 -0400
@@ -454,17 +454,39 @@ void
es the
boundary into account, and use it to replace the inaccurate calculation.
Signed-off-by: Tony Battersby
---
This depends on patch #1 "dmapool: fix boundary comparison" for the
calculated blks_per_alloc value to be correct.
The added blks_per_alloc value will also be used in
list_add_tail(&srp->free_entry, &sfp->rq_free_list);
> + snprintf(b, sizeof(b), "clear sgat srp=0x%p move to fl tail",
> + srp);
> + }
>
>
Here again, no lock protecting sfp->sum_fd_dlens.
Incidentally, I have been using my own home-grown target-mode SCSI
system for the past 16 years, but now I am starting to look into
switching to SCST. I was just reading about their "SGV cache":
http://scst.sourceforge.net/scst_pg.html
It looks like it serves a similar purpose to what you are trying to
accomplish with recycling the indirect I/O buffers between different
requests. Perhaps you can borrow some inspiration from them (or even
some code).
Tony Battersby
Cybernetics
The calling convention of blk_get_request() has changed in lk 4.18;
update the comment in sg.c to match.
Fixes: ff005a066240 ("block: sanitize blk_get_request calling conventions")
Signed-off-by: Tony Battersby
---
I wrote the original comment in commit 7772855a996e ("sg: fix EWO
Fix a minor memory leak when there is an error opening a /dev/sg device.
Fixes: cc833acbee9d ("sg: O_EXCL and other lock handling")
Cc:
Reviewed-by: Ewan D. Milne
Signed-off-by: Tony Battersby
---
Resending to include the requested fixes: / cc: stable tags.
diff --git a/drivers/s
Fix a minor memory leak when there is an error opening a /dev/sg device.
Signed-off-by: Tony Battersby
---
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index cd2fdac..2962a38 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -2185,6 +2185,7 @@ sg_add_sfp(Sg_device * sdp
fected because they have not had
the problematic commit backported:
3.2.101
3.16.56
Related bugzilla:
https://bugzilla.kernel.org/show_bug.cgi?id=198081
Thanks!
Tony Battersby
Cybernetics
647 ("scsi: add support for a blk-mq based I/O path.")
Cc: # 3.17+
Signed-off-by: Tony Battersby
---
For immediate inclusion.
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 106884a..cfadcce 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
On 02/11/2015 11:31 AM, Tony Battersby wrote:
> Note: I did a number of tests with this patch, but I do not have any
> programs to test commands with bidirectional data transfer. I would
> appreciate if someone could test that.
Replying to myself, I was able to test bidirectional data
applied after the patch titled "sg: fix unkillable I/O wait deadlock
with scsi-mq".
Cc: Douglas Gilbert
Cc: # 3.17+
Signed-off-by: Tony Battersby
---
For inclusion in kernel 3.20.
The difference in behavior is due to bt_get() in block/blk-mq-tag.c
checking for __GFP_WAIT.
The bsg driv
).
Cc: Douglas Gilbert
Cc: # 3.17+
Signed-off-by: Tony Battersby
---
For inclusion in kernel 3.20.
This is the exact same patch as before; I have only updated the patch
description to reflect new details uncovered by myself and Douglas
Gilbert. There is also now a second related patch to sg that m
On 02/11/2015 12:45 PM, Douglas Gilbert wrote:
> On 15-02-11 11:32 AM, Tony Battersby wrote:
>> Fix SCSI generic read() incorrectly returning success after detecting an
>> error.
>>
>> Cc:
>> Signed-off-by: Tony Battersby
>> ---
>>
>> For inclu
If the allocation of bt->bs fails, then bt->map can be freed twice, once
in blk_mq_init_bitmap_tags() -> bt_alloc(), and once in
blk_mq_init_bitmap_tags() -> bt_free(). Fix by setting the pointer to
NULL after the first free.
Cc:
Signed-off-by: Tony Battersby
---
For inclusion in
k by calling blk_put_request() as soon as the SCSI command
completes instead of waiting for userspace to call read().
Cc: # 3.17+
Signed-off-by: Tony Battersby
---
For inclusion in kernel 3.20.
Note: I did a number of tests with this patch, but I do not have any
programs to test commands with b
Fix SCSI generic read() incorrectly returning success after detecting an
error.
Cc:
Signed-off-by: Tony Battersby
---
For inclusion in kernel 3.20.
--- linux-3.19.0/drivers/scsi/sg.c.orig 2015-02-08 21:54:22.0 -0500
+++ linux-3.19.0/drivers/scsi/sg.c 2015-02-10 09:26:09.0
deadlock by calling blk_put_request() as soon as
the SCSI command completes instead of waiting for userspace to call read().
Cc: # 3.17+
Signed-off-by: Tony Battersby
---
For inclusion in kernel 3.20.
I encountered this problem using mptsas (can_queue == 127) and 8 disks
connected via an expande
[] cpuidle_enter+0x12/0x20
[] cpu_startup_entry+0x25f/0x300
[] start_secondary+0x13f/0x170
Cc: # 3.17+
Signed-off-by: Tony Battersby
---
Note that this patch does *not* fix the deadlock with mptsas that I
reported yesterday; that is a completely different issue that still
needs to be addressed.
Summary:
When removing a SCSI device with scsi-mq, blk_mq_update_tag_set_depth()
ends up waiting for commands to *other* SCSI devices to complete. If
those other SCSI devices are in the SDEV_BLOCK state, then the removal
deadlocks.
Setup:
kernel 3.19-rc7 with the following additional commits:
t OK for them to share the same portid/loop_id
values, but instead qla2x00_terminate_rport_io() needs more checks
before calling fabric_logout()?
I would be happy to test any patches that anyone can provide. Or if
someone can provide answers to my questions above or other guidance,
then I can try to com
ups, etc., any of which may appear to be completely
unrelated to the root cause.
Cc: # 3.17.x, 3.18.x
Signed-off-by: Tony Battersby
---
I encountered this problem with a QLogic QLE2672 FC HBA using qla2xxx.
On my system, this would trigger BUG_ON(atomic_read(&bio->bi_remaining) <= 0)
Fix an error path in SCSI_IOCTL_SEND_COMMAND that calls
blk_put_request(rq) on an invalid IS_ERR(rq) pointer.
Fixes: a492f075450f ("block,scsi: fixup blk_get_request dead queue scenarios")
Signed-off-by: Tony Battersby
---
(resending, since no one picked it up last time)
For inclusi
Fix an error path in SCSI_IOCTL_SEND_COMMAND that calls
blk_put_request(rq) on an invalid IS_ERR(rq) pointer.
Fixes: a492f075450f ("block,scsi: fixup blk_get_request dead queue
scenarios")
Signed-off-by: Tony Battersby
---
For inclusion in 3.18 only.
This does not conflict with
Fix a memory leak with scsi-mq triggered by commands with large data
transfer length.
Fixes: c53c6d6a68b1 ("scatterlist: allow chaining to preallocated chunks")
Cc: # 3.17.x
Signed-off-by: Tony Battersby
---
For inclusion in 3.18 and 3.17.x.
--- a/lib/scatterlist.c 2014-1
On 08/23/2014 03:09 PM, Douglas Gilbert wrote:
>> For inclusion in 3.17 only.
> May want to check if blk-mq work in lk 3.16 and earlier
> breaks the bsg driver's capability to send SCSI cdbs
> that are longer than 16 bytes.
>
>
I think 3.16 and earlier are OK. The problem was caused by
scsi_mq_pr
blk_rq_set_block_pc() memsets rq->cmd to 0, so it should come
immediately after blk_get_request() to avoid overwriting the
user-supplied CDB. Also check for failure to allocate rq.
Fixes: f27b087b81b7 ("block: add blk_rq_set_block_pc()")
Cc: # 3.16.x
Signed-off-by: Tony Batters
rge CDBs only). Without this patch, scsi_mq_prep_fn() will set
rq->cmd back to rq->__cmd, causing the wrong CDB to be sent to the device.
Signed-off-by: Tony Battersby
---
For inclusion in 3.17 only.
diff -urpN linux-3.17.0-rc1-a/block/blk-core.c
linux-3.17.0-rc1-b/block/blk-core.c
--- lin
> I attached a backport of the patch from Tony (added as cc) that is in
> 2.6.25-rc2. Could you try it out against 2.6.24.2 just to make sure it
> was this patch, then we can send it to stable.
>
Yes, I had wanted to send this patch to -stable, but got distracted with
other bugs. So please
en rather
than to sum(scatterlist lengths), which fixes the problem.
Signed-off-by: Tony Battersby <[EMAIL PROTECTED]>
---
--- linux-2.6.24-git14/drivers/scsi/scsi_lib.c.orig 2008-02-05
09:33:05.0 -0500
+++ linux-2.6.24-git14/drivers/scsi/scsi_lib.c 2008-02-05 09:33:10.0
Luben Tuikov wrote:
> You then took hunk #2 (2 lines) of the patch I sent
> you and submitted it as your own, and then I acked
> "your" patch.
>
I _really_ _really_ hope that you don't believe that I am trying to take
credit for your work. If you take another look, my original patch had
the foll
Luben Tuikov wrote:
> --- On Fri, 2/1/08, Tony Battersby <[EMAIL PROTECTED]> wrote:
>
>> Also, I disagree about treating recovered error like
>> hardware/medium
>> error. Recovered error is supposed to mean "the last
>> command completed
>> succe
This patch fixes a problem with some out-of-spec SCSI disks that report
hardware or medium errors incorrectly. Without the patch, the kernel
may silently ignore a failed write command or return corrupted data on a
failed read command.
Signed-off-by: Tony Battersby <[EMAIL PROTECTED]>
---
Salyzyn, Mark wrote:
> Serendipity, been working an issue for the past week where error reporting
> from aacraid's HARDWARE_ERROR when an array was marked DEAD in the Adapter
> was not propagating to MD. The trigger for this investigation was "AACRAID
> driver broken in 2.6.22.x (and beyond?) [W
with some recovery action performed by the device
server". The other errors mean that the command didn't complete
successfully. If VALID=1, then the sense information bytes indicate
"the unsigned logical block address associated with the sense key". So
for hardwar
I have a RAID that returns a medium error on a read command. The
"information bytes valid" bit is set in the sense data, but the
information bytes are zero:
CDB: 28 00 02 B0 62 00 00 00 02 00
Status: 02 (CHECK CONDITION)
Sense data:
F0 00 03 00 | 00 00 00 0A | 00 00 00 00 | 00 00 00 00
00 00
For
| FF FF 04 00 | FF FF 08 00
FF FF 10 00 | FF FF 20 00 | FF FF 40 00 | FF FF 80 00
This data pattern tests simultaneously turning on or off all bits but
one.
Signed-off-by: Tony Battersby <[EMAIL PROTECTED]>
---
--- linux-2.6.24/drivers/scsi/scsi_transport_spi.c.orig 2008-01-25
15:16:15
Tony Battersby wrote:
> I get "unexpected IRQ trap at vector dd" when reloading mptspi with MSI
> enabled. This seems to happen only on dual-channel HBAs; single-channel
> HBAs are unaffected. It looks like the second channel is generating a
> bogus MSI interrupt while the
I get "unexpected IRQ trap at vector dd" when reloading mptspi with MSI
enabled. This seems to happen only on dual-channel HBAs; single-channel
HBAs are unaffected. It looks like the second channel is generating a
bogus MSI interrupt while the first channel is being brought up.
modprobe mpt_base
evices in the system. A similar problem exists with
/proc/scsi/sg/device_strs. The following patch restores the behavior
of 2.6.23.
Signed-off-by: Tony Battersby <[EMAIL PROTECTED]>
---
--- linux-2.6.24-rc8-git5/drivers/scsi/sg.c.orig2008-01-22
15:08:46.0 -0500
+++ linux-2.
.
Tony Battersby
Cybernetics
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html
(INTF) condition. The following patch
fixes the problem.
Signed-off-by: Tony Battersby <[EMAIL PROTECTED]>
---
James, please queue for scsi-rc-fixes-2.6. Thanks!
--- linux-2.6.24-rc5-git3/drivers/scsi/sym53c8xx_2/sym_hipd.c.orig
2007-12-14 15:07:09.0 -0500
+++ linux-2.6.24
Tony Battersby wrote:
> Hello,
>
> I am sending this message to check up on the merge status of my recent
> sym53c8xx patches to make sure they aren't forgotten. Matthew Wilcox,
> could you give an ack/nak for these merge requests? Also, please let me
> know if I need to
Randy Dunlap wrote:
> Is Matthew assisting James on SCSI merges now?
>
>
Matthew is the maintainer of sym53c8xx. I figured my patches weren't
getting merged since he hadn't given the ok yet.
Tony
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message
ent due to speculation that it may
break some 875 chips.
Thanks,
Tony Battersby
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html
James Bottomley wrote:
> On Thu, 2007-11-15 at 11:38 -0500, Tony Battersby wrote:
>
>> James Bottomley wrote:
>>
>>> On Thu, 2007-11-15 at 10:06 -0500, Tony Battersby wrote:
>>>
>>>
>>>> This patch increases the sg_t
James Bottomley wrote:
> On Thu, 2007-11-15 at 10:06 -0500, Tony Battersby wrote:
>
>> This patch increases the sg_tablesize for sym53c8xx from 96 to 128,
>> which enables commands to transfer larger amounts of data (e.g. 512 KB
>> instead of 384 KB, assuming 4 KB non-a
ot be set much higher than
128 without making more intrusive changes.
Tested on a LSI 53c1010-66.
Signed-off-by: Tony Battersby <[EMAIL PROTECTED]>
---
--- linux-2.6.24-rc2-git5/drivers/scsi/sym53c8xx_2/sym53c8xx.h.orig
2007-11-15 09:36:03.0 -0500
+++ linux-2.6.24-rc2-git5/driv
scsi_target instead of scsi_device,
which causes every device at a given target ID to inherit the single_lun
flag from one LUN. This makes it possible to blacklist just the medium
changer and not the tape drive.
Signed-off-by: Tony Battersby <[EMAIL PROTECTED]>
---
diff -urpN linux-2.6.24-rc2-v
vement for writing.
This issue does not seem to affect the 9550SX controller, but the patch
doesn't hurt it either. I haven't tested any of the other 3ware
controllers.
Signed-off-by: Tony Battersby <[EMAIL PROTECTED]>
---
--- linux-2.6.24-rc2/drivers/scsi/3w-9xxx.c.orig2007
James Bottomley wrote:
> On Wed, 2007-11-07 at 15:37 -0500, Tony Battersby wrote:
>
>> This patch fixes the sym53c8xx "setflag" user command to control
>> disconnect privilege, which has been broken for a long time.
>>
>
> The first observation is
would be the same as the last one printed.
Signed-off-by: Tony Battersby <[EMAIL PROTECTED]>
---
diff -urpN linux-2.6.24-rc2/drivers/scsi/sym53c8xx_2/sym_hipd.c
linux-2.6.24-rc2-sym2/drivers/scsi/sym53c8xx_2/sym_hipd.c
--- linux-2.6.24-rc2/drivers/scsi/sym53c8xx_2/sym_hipd.c2007-11-
This patch fixes the sym53c8xx "setflag" user command to control
disconnect privilege, which has been broken for a long time.
Signed-off-by: Tony Battersby <[EMAIL PROTECTED]>
---
NOTE regarding the following change:
can_disconnect = (cp->tag != NO_TAG) ||
-
Currently, the iSCSI driver returns the data transfer residual for
data-in commands (e.g. read) but not data-out commands (e.g. write).
This patch makes it return the data transfer residual for both types of
commands.
Signed-off-by: Tony Battersby <[EMAIL PROTECTED]>
---
--- linux-2.6.
This patch fixes the calculation of the data transfer residual for the
case of a command that is supposed to transfer an odd number of bytes on
a wide bus but transfers nothing instead.
Signed-off-by: Tony Battersby <[EMAIL PROTECTED]>
---
--- linux-2.6.24-rc1-git15/drivers/scsi/sym53
andler capable of returning IRQ_NONE
...
The result is that free_irq() doesn't actually take any action. This
patch fixes it.
Signed-off-by: Tony Battersby <[EMAIL PROTECTED]>
---
--- linux-2.6.24-rc1-git15/drivers/scsi/sym53c8xx_2/sym_glue.c.orig
2007-11-06 14:22:43.
This patch fixes a compile error in iSCSI when DEBUG_SCSI is defined.
Signed-off-by: Tony Battersby <[EMAIL PROTECTED]>
---
--- linux-2.6.24-rc1/drivers/scsi/libiscsi.c.orig 2007-10-25
15:56:32.0 -0400
+++ linux-2.6.24-rc1/drivers/scsi/libiscsi.c2007-10-25 15:56:49.000
24-rc1) converts accesses of xmstate to use
set_bit, clear_bit, and test_bit instead of |= and &=. I have tested
this patch and verified that it fixes the problem. Another possible
approach would be to hold a lock during most of the rx/tx setup and
post-processing, and drop the lock only fo
This patch fixes two problems with sym53c8xx_2.o in 2.4.x kernels:
1) A system hang when loading sym53c8xx_2.o on a SMP system with two
dual-channel LSI HBAs (http://bugzilla.kernel.org/show_bug.cgi?id=3680)
2) A function improperly marked __init.
Signed-off-by: Tony Battersby <[EMAIL PROTEC
Willy Tarreau wrote:
> On Wed, Oct 17, 2007 at 10:53:06AM -0400, Tony Battersby wrote:
>
>>> So we should unconditionally drop the lock (and re-enable
>>> interrupts) and re-acquire it.
>>>
>> After looking at it carefully, this is true o
ot in ->release.
So, your patch locks up the system on module unload.
I have put together and tested a new patch which does it correctly,
while still trying to make only minimal changes.
If you approve, this can go into the next 2.4.x release.
Signed-off-by: Tony Battersby <[EMAIL PROTECTED]&
72 matches
Mail list logo