On 2018-11-12 11:32 a.m., Bean Huo (beanhuo) wrote:
This patch is to convert inputted string to the integer
when read data from stdin. While entering data flow, the
data between bytes can be separated by either space,
or ',' (or by '.').
V1-V2:
1. Rebased the patch on the latest
On 2018-11-09 7:18 p.m., Bean Huo (beanhuo) wrote:
This patch is to convert inputted string to the integer when
read data from stdin. While entering data, the data between bytes
can be separated by space, or by ',' or by '.'.
Could you send me this patch against sg_write_buffer.c as found
in
On 2018-10-25 10:49 a.m., Martin Wilck wrote:
By scanning for LUN 0 only, we may encounter a device that the
kernel won't add (e.g. peripheral device type 31) and which may
thus never appear in sysfs for us to use for REPORT LUNS. That
causes LUN additions for such devices to be missed by
For anyone thinking of testing this patchset, it also applies clean to
lk 4.19 release.
Doug Gilbert
On 2018-10-26 12:48 p.m., Douglas Gilbert wrote:
The intention is to add two new ioctls as proposed by Linus Torvalds:
SG_IOSUBMIT and SG_IORECEIVE to replace the write()/read() async
interface
On 2018-10-26 12:48 p.m., Douglas Gilbert wrote:
Add a SG_SET_GET_EXTENDED ioctl control for whether commands
will be queued_at_head or queued_at_tail by the block layer
(together with the scsi mid-level). It has file scope.
Also add a read_value integer the can be used by write a
value from
will be returned.
Signed-off-by: Douglas Gilbert
---
The user can still override the new file scope setting on a
a per command basis with the SG_FLAG_Q_AT_HEAD and
SG_FLAG_Q_AT_TAIL in the sg v3 and v4 structures.
An example of read_value usage is to write the value
SG_SEIRV_FL_RQS
Complete the locking and structure changes of ioctl and debug
('cat /proc/scsi/sg/debug') handling.
Signed-off-by: Douglas Gilbert
---
This was the code that was "#if 0'-ed out 2 patches ago. It
also shuts checkpatch.pl up as it doesn't like that technique
but offers no viable subst
. Correct and expand some comments.
Signed-off-by: Douglas Gilbert
---
The new header file: uapi/scsi/sg.h is expected to be in the
kernel's public interface. This takes time (i.e. months or years)
to find its way into glibc and Linux distributions. So the sooner
it is presented and accepted
. SG_TOT_FD_THRESHOLD is a default, per file descriptor
value that the sum of outstanding command data lengths is not
allowed to exceed.
Signed-off-by: Douglas Gilbert
---
The '#if 0's are temporary and removed in a later patch.
They allow the following large and complex patch (5 of 8)
to be a bit
er (the "_GET_" part) in a single operation.
Signed-off-by: Douglas Gilbert
---
One feature of the new SG_SET_GET_EXTENDED ioctl is ability to
fetch the sg device minor number (e.g. the "3" in /dev/sg3)
associated with the current file descriptor. A boolean addition
is t
will be returned.
Signed-off-by: Douglas Gilbert
---
The user can still override the new file scope setting on a
a per command basis with the SG_FLAG_Q_AT_HEAD and
SG_FLAG_Q_AT_TAIL in the sg v3 and v4 structures.
An example of read_value usage is to write the value
SG_SEIRV_FL_RQS
.
Signed-off-by: Douglas Gilbert
---
This patch is big and complex. Towards the end the diff program
completely loses the plot. Better to use difftool on a two pane
window, or simply view the before sg.c and the after sg.c .
The requirement to keep the patch small enough to be reviewable
Remove typedefs and use better type names like bool and u8 where
appropriate. Rename some variables and functions for clarity.
Adjust formatting (e.g. function definitions) to be more
consistent across the driver.
Signed-off-by: Douglas Gilbert
---
The intention is to move to sg_version_num
Introduce the SG_LOG macro to replace long-winded
'SCSI_LOG_TIMEOUT(3, sg_printk ...' debug messages. Use __func__
wherever appropriate to make the debug messages more portable.
Signed-off-by: Douglas Gilbert
---
Reviewers want SCSI_LOG_* style logging replaced. But with
what? One suggestion
compile/build problem around the 4th and 5th patches
- add read_value[SG_SEIRV_*] options in SG_SET_GET_EXTENDED
ioctl and increase structure size from 64 to 96 bytes
Douglas Gilbert (8):
sg: types and naming cleanup
sg: introduce sg_log macro
sg: split header, expand and correct
On 2018-10-24 3:58 a.m., Martin K. Petersen wrote:
Hi Doug,
I'll follow what the scsi mid-level and the other ULDs do. IOW, no
change. The debug messages they produce are quite helpful (to me, I
use them a lot, and Tony B. has asked for more precision) and
well-tuned to the SCSI subsystem
On 2018-10-20 11:21 p.m., Douglas Gilbert wrote:
Split scsi/sg.h into a smaller scsi/sg.h which includes a new header:
uapi/scsi/sg.h . Overall expand the twin header files with new
functionality in this patchset and functionality to be added in the
next patchset to implement SG_IOSUBMIT
. SG_TOT_FD_THRESHOLD is a default, per file descriptor
value that the sum of outstanding command data lengths is not
allowed to exceed.
Signed-off-by: Douglas Gilbert
---
The '#if 0's are temporary and removed in a later patch.
They allow the following large and complex patch (5 of 8)
to be a bit
Complete the locking and structure changes of ioctl and debug
('cat /proc/scsi/sg/debug') handling.
Signed-off-by: Douglas Gilbert
---
This was the code that was "#if 0'-ed out 2 patches ago. It
also shuts checkpatch.pl up as it doesn't like that technique
but offers no viable subst
around the 4th and 5th patches
- add read_value[SG_SEIRV_*] options in SG_SET_GET_EXTENDED
ioctl and increase structure size from 64 to 96 bytes
Douglas Gilbert (8):
sg: types and naming cleanup
sg: introduce sg_log macro
sg: split header, expand and correct descriptions
sg: expand
Introduce the SG_LOG macro to replace long-winded
'SCSI_LOG_TIMEOUT(3, sg_printk ...' debug messages. Use __func__
wherever appropriate to make the debug messages more portable.
Signed-off-by: Douglas Gilbert
---
drivers/scsi/sg.c | 162 +-
1 file
. Correct and expand some comments.
Signed-off-by: Douglas Gilbert
---
The new header file: uapi/scsi/sg.h is expected to be in the
kernel's public interface. This takes time (i.e. months or years)
to find its way into glibc and Linux distributions. So the sooner
it is presented and accepted
er (the "_GET_" part) in a single operation.
Signed-off-by: Douglas Gilbert
---
One feature of the new SG_SET_GET_EXTENDED ioctl is ability to
fetch the sg device minor number (e.g. the "3" in /dev/sg3)
associated with the current file descriptor. A boolean addition
is t
will be returned.
Signed-off-by: Douglas Gilbert
---
The user can still override the new file scope setting on a
a per command basis with the SG_FLAG_Q_AT_HEAD and
SG_FLAG_Q_AT_TAIL in the sg v3 and v4 structures.
An example of read_value usage is to write the value
SG_SEIRV_FL_RQS
.
Signed-off-by: Douglas Gilbert
---
This patch is big and complex. Towards the end the diff program
completely loses the plot. Better to use difftool on a two pane
window, or simply view the before sg.c and the after sg.c .
drivers/scsi/sg.c | 1241 +++--
1
Remove typedefs and use better type names like bool and u8 where
appropriate. Rename some variables and functions for clarity.
Adjust formatting (e.g. function definitions) to be more
consistent across the driver.
Signed-off-by: Douglas Gilbert
---
The intention is to move to sg_version_num
On 2018-10-19 11:22 a.m., Bart Van Assche wrote:
On Fri, 2018-10-19 at 02:24 -0400, Douglas Gilbert wrote:
static void
-sg_fill_request_table(struct sg_fd *sfp, struct sg_req_info *rinfo)
+sg_fill_request_table(struct sg_fd *sfp, struct sg_req_info *rinfo,
+ int max_num
On 2018-10-19 4:31 a.m., Johannes Thumshirn wrote:
On 19/10/18 08:24, Douglas Gilbert wrote:
+/* Alternate style type names, "..._t" variants preferred */
+typedef struct sg_io_hdr Sg_io_hdr;
+typedef struct sg_io_vec Sg_io_vec;
+typedef struct sg_scsi_id Sg_scsi_id;
+typedef struct s
On 2018-10-19 3:45 a.m., Johannes Thumshirn wrote:
On 19/10/18 08:24, Douglas Gilbert wrote:
[..]
+/*
+ * Kernel needs to be built with CONFIG_SCSI_LOGGING to see log messages.
+ * 'depth' is a number between 1 (most severe) and 7 (most noisy, most
+ * information). All messages are logged
. Correct and expand some comments.
Signed-off-by: Douglas Gilbert
---
The new header file: uapi/scsi/sg.h is expected to be in the
kernel's public interface. This takes time (i.e. months or years)
to find its way into glibc and Linux distributions. So the sooner
it is presented and accepted
er (the "_GET_" part) in a single operation.
Signed-off-by: Douglas Gilbert
---
One feature of the new SG_SET_GET_EXTENDED ioctl is ability to
fetch the sg device minor number (e.g. the "3" in /dev/sg3)
associated with the current file descriptor. A boolean addition
is t
.
Signed-off-by: Douglas Gilbert
---
This patch is big and complex. Towards the end the diff program
completely loses the plot. Better to use difftool on a two pane
window.
drivers/scsi/sg.c | 1225 +++--
1 file changed, 739 insertions(+), 486 deletions
Complete the locking and structure changes of ioctl and debug
('cat /proc/scsi/sg/debug') handling.
Signed-off-by: Douglas Gilbert
---
This was the code that was "#if 0'-ed out 2 patches ago. It
also shuts checkpatch.pl up as it doesn't like that technique
but offers no viable subst
Add a SG_SET_GET_EXTENDED ioctl control for whether commands
will be queued_at_head or queued_at_tail by the block layer
(together with the scsi mid-level). It has file scope.
Signed-off-by: Douglas Gilbert
---
The user can still override this setting on a per command
basis
Remove typedefs and use better type names like bool and u8 where
appropriate. Rename some variables and functions for clarity.
Adjust formatting (e.g. function definitions) to be more
consistent across the driver.
Signed-off-by: Douglas Gilbert
---
The intention is to move to sg_version_num
descriptor
value that the sum of outstanding command data lengths is not
allowed to exceed.
Signed-off-by: Douglas Gilbert
---
The '#if 0's are temporary and removed in a later patch.
They allow the following large and complex patch to be
a bit shorter and still compile.
drivers/scsi/sg.c | 27
branch.
Douglas Gilbert (8):
sg: types and naming cleanup
sg: introduce sg_log macro
sg: split header, expand and correct descriptions
sg: expand request states
sg: add free list, rework locking
sg: complete locking changes on ioctl+debug
sg: rework ioctl handling
sg: user control
Introduce the SG_LOG macro to replace long-winded
'SCSI_LOG_TIMEOUT(3, sg_printk ...' debug messages. Use __func__
wherever appropriate to make the debug messages more portable.
Signed-off-by: Douglas Gilbert
---
drivers/scsi/sg.c | 162 +-
1 file
On 2018-10-17 11:55 a.m., Benjamin Block wrote:
On Tue, Oct 16, 2018 at 08:43:01AM -0600, Jens Axboe wrote:
Requires a few changes to the FC transport class as well.
Cc: Johannes Thumshirn
Cc: Benjamin Block
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Jens Axboe
---
block/bsg-lib.c
a request is "in flight" and a surprise
removal occurs, can the sg driver expect the block layer (or
scsi mid-level) to react (and clean-up) or is it up to the
sg driver to force those actions?
Acked-by: Douglas Gilbert
Cc: Doug Gilbert
Cc: linux-scsi@vger.kernel.org
Signed-off-by:
On 2018-08-09 07:51 PM, Bart Van Assche wrote:
On Thu, 2018-08-09 at 23:32 +, Avri Altman wrote:
And as I said before, we think that maintaining the flexibility to have
more-than-one
bsg device nodes, will be useful serving as a testing and validation
environment.
That is a very vague
On 2018-08-06 01:41 AM, Damien Le Moal wrote:
On 2018/08/06 13:51, Douglas Gilbert wrote:
Make the two block layer operations most frequently used (REQ_OP_READ
and REQ_OP_WRITE) bypass the switch statements in the submission and
response paths. Assume these two enums are 0 and 1 which allows
On 2018-08-06 01:41 AM, Damien Le Moal wrote:
On 2018/08/06 13:51, Douglas Gilbert wrote:
Re-arrange some logic to lessen the number of checks. With logical
ANDs put the least likely first, with logical ORs put the most
likely first. Also add conditional hints on the assumed fastpath.
Signed
On 2018-08-06 01:41 AM, Damien Le Moal wrote:
On 2018/08/06 13:51, Douglas Gilbert wrote:
Break out the sense key handling in the sd_done() (response) path into
its own function. Note that the sense key only needs to be inspected
when a SCSI status of Check Condition is returned.
It looks
On 2018-08-06 01:41 AM, Damien Le Moal wrote:
Douglas,
On 2018/08/06 13:51, Douglas Gilbert wrote:
Add bounds_check "rw" attribute to the sd driver. It controls whether
each read/write operation submission does an "out of range" bounds check
and a LBA/number_of_blocks al
erent it is
possible that there is an alignment issue. But if that occurs, it
would be a logic issue in the block layer. Note that the current
mainline code does this check even when it is not needed (e.g. when
the logical block size of the disk is 512 bytes).
Signed-off-by: Douglas Gilbert
---
Should a m
Re-arrange some logic to lessen the number of checks. With logical
ANDs put the least likely first, with logical ORs put the most
likely first. Also add conditional hints on the assumed fastpath.
Signed-off-by: Douglas Gilbert
---
drivers/scsi/sd.c | 43
-off-by: Douglas Gilbert
---
drivers/scsi/sd.c | 82 +++
1 file changed, 55 insertions(+), 27 deletions(-)
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 4b1402633c36..9f047fd3c92d 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
scsi_debug
driver.
Douglas Gilbert (5):
add tweakable bounds_check flag, now off by default
break sd_done sense processing out to own function
streamline REQ_OP_READ-WRITE access
streamline some logical operations
make sd_done() REQ_OP_FLUSH handling explicit
drivers/scsi/
Break out the sense key handling in the sd_done() (response) path into
its own function. Note that the sense key only needs to be inspected
when a SCSI status of Check Condition is returned.
Signed-off-by: Douglas Gilbert
---
No speed up here, just a clean up. There could possibly be a speed
On 2018-07-30 02:13 PM, Hannes Reinecke wrote:
On 07/30/2018 08:01 PM, Bart Van Assche wrote:
On Sun, 2018-07-29 at 16:33 +0300, Avri Altman wrote:
Here is a proposal to use the scsi transport subsystem to manage
ufs devices.
scsi transport is a framework that allow to send scsi commands to
a
g:
https://lore.kernel.org/lkml/a68ad043-26a1-d3d8-2009-504ba4230...@oracle.com/
Also convert two vmalloc/memset(0) to vzalloc() calls.
Signed-off-by: Douglas Gilbert
---
Changes since original version:
- thanks to changes/fixes suggested by Bart Van Assche, mainly
to avoid calling scsi_done()
On 2018-07-12 06:09 PM, Tony Battersby wrote:
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
Acked-by: Douglas Gilbert
On 2018-07-12 02:46 PM, Tony Battersby wrote:
Fix a minor memory leak when there is an error opening a /dev/sg device.
Signed-off-by: Tony Battersby
Acked-by: Douglas Gilbert
Thanks.
---
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index cd2fdac..2962a38 100644
--- a/drivers/scsi
.
Signed-off-by: Douglas Gilbert
---
This patch is against MKP's 4.19/scsi-queue branch.
Re-arrange if condition so least likely is first part of && .
drivers/scsi/scsi_debug.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/scsi_debug.c b/driv
On 2018-06-26 07:28 AM, Hannes Reinecke wrote:
On 06/23/2018 12:22 PM, Douglas Gilbert wrote:
The scsi_io_completion function contains three BUG() and BUG_ON() calls.
Replace them with WARN variants.
Signed-off-by: Douglas Gilbert
Reviewed-by: Johannes Thumshirn
Reviewed-by: Bart Van Assche
Add likely() and unlikely() hints to conditionals on or near the fastpath.
Signed-off-by: Douglas Gilbert
Reviewed-by: Johannes Thumshirn
Reviewed-by: Bart Van Assche
---
A reviewer wanted any performance improvement (or otherwise) quantified.
The improvement was so small, that ftrace ignored
Place scsi_io_completion()'s complex error processing associated with a
local enumeration into a static helper function. That enumeration's
values start with "ACTION_" so use the suffix "_action" in the helper
function's name.
Signed-off-by: Douglas Gilbert
Reviewed-by
scsi_end_request() is called multiple times from scsi_io_completion()
which branches on its bool returned value. Add comment before the static
definition of scsi_end_request() about the meaning of that return.
Signed-off-by: Douglas Gilbert
Reviewed-by: Johannes Thumshirn
Reviewed-by: Bart Van
print to simplify conditionals in the case of
a recovered error sense key in 2/7 rather than 3/7
ChangeLog since v3
- make use of bools sense_valid and sense_current consistent in 3/7
and 4/7
Douglas Gilbert (7):
scsi_io_completion: comment on end_request return
scsi_i
Break out several intertwined paths when cmd->result is non zero and
place them in the scsi_io_completion_nz_result helper function. The
logic is not changed.
Signed-off-by: Douglas Gilbert
Reviewed-by: Johannes Thumshirn
Reviewed-by: Bart Van Assche
---
A reviewer requested the origi
The scsi_io_completion function contains three BUG() and BUG_ON() calls.
Replace them with WARN variants.
Signed-off-by: Douglas Gilbert
Reviewed-by: Johannes Thumshirn
Reviewed-by: Bart Van Assche
---
drivers/scsi/scsi_lib.c | 15 ---
1 file changed, 12 insertions(+), 3 deletions
Change and add some variable names, adjust some associated comments
for clarity. Correct some misleading comments.
Signed-off-by: Douglas Gilbert
Reviewed-by: Johannes Thumshirn
Reviewed-by: Bart Van Assche
---
drivers/scsi/scsi_lib.c | 72 ++---
1 file
Since the action "reprep" is called from two places, rather than repeat
the code, make a new scsi_io_completion helper with "reprep" as its
suffix.
Signed-off-by: Douglas Gilbert
Reviewed-by: Johannes Thumshirn
Reviewed-by: Bart Van Assche
---
drivers/
_SYS_RAWIO))
gfp_mask |= __GFP_ZERO;
And there's only one user of the gfp_mask. Just or in the __GFP_ZERO
flag at the top of the function and be done with it.
Signed-off-by: Jeff Moyer
Acked-by: Douglas Gilbert
p.s. I'm not even sure why the original patch was committed -- it do
On 2018-06-11 12:07 PM, Ted Cabeen wrote:
I'm seeing a similar behavior on my system, but across multiple devices on a SAS
drive array (front bays on a Supermicro-based system with onboard mpt3sas card).
The Sense Key here doesn't show a medium error, and the multiple-drive behavior
makes me
On 2018-06-11 11:06 AM, James Bottomley wrote:
On Mon, 2018-06-11 at 16:24 +0200, Sebastian Hegler wrote:
Dear all,
First off: sorry for cross-posting. I don't know if this is a RAID
issue or a SCSI issue, so I'll just ask y'all.
For a RAID6 capacity upgrade (higher capacity drives), we
It has been a while since the last release of lsscsi: 0.29 was sort of
released on 2016/05/14 and lsscsi 0.28 on 2014/09/30 . A few bug
fixes have got out thanks to the github (now Microsoft) mirror that
Hannes Reinecke maintains.
Recently there have been some additions and some folks have found
"Sanitize in progress" plus some other recent "... in progress"
additional sense codes into the scsi mid-level so they are treated in
a similar fashion to "Format in progress".
Signed-off-by: Douglas Gilbert <dgilb...@interlog.com>
---
drivers/scsi/scsi_lib.c |
On 2018-05-05 11:21 PM, Wenwen Wang wrote:
In sg_write(), the opcode of the command is firstly copied from the
userspace pointer 'buf' and saved to the kernel variable 'opcode', using
the __get_user() function. The size of the command, i.e., 'cmd_size' is
then calculated based on the 'opcode'.
still caused some confusion so a more
conventional method is now used: adding an extra flag to the
scsi_cmnd "host_scribble" area.
Signed-off-by: Douglas Gilbert <dgilb...@interlog.com>
---
This patch is designed to simplify part of the patchset titled:
"Rework SCSI results h
On 2018-04-18 11:01 AM, Johannes Thumshirn wrote:
Hey all,
here's a early preview of my SCSI results rework so we can eventually
discuss things next week at LSF/MM (it still has compiler errors on
aic7xxx and scsi_debug).
The motivation behing this is that some drivers have failed to set the
On 2018-04-14 02:47 PM, Souptick Joarder wrote:
Use new return type vm_fault_t for fault handler
in struct vm_operations_struct.
Signed-off-by: Souptick Joarder <jrdr.li...@gmail.com>
Reviewed-by: Matthew Wilcox <mawil...@microsoft.com>
Acked-by: Douglas Gilbert <dgilb.
On 2018-04-11 12:25 PM, Johannes Thumshirn wrote:
On Wed, Apr 11, 2018 at 12:20:49PM -0400, Martin K. Petersen wrote:
Johannes,
While we're at it, anyone still in love with the non SAM_ status
bytes? If not they'll be gone afterwards as well.
/me is up for some spring cleaning.
Just be
d; SC only
delays when there's been a write since the previous SC. It
also reduced the SC delay from 1 second to 50 milliseconds.
Signed-off-by: Douglas Gilbert <dgilb...@interlog.com>
---
This patch is in response to a report on the Linux scsi list
indicating a significant slowdown in
On 2018-04-09 02:17 AM, Hannes Reinecke wrote:
On 04/09/2018 04:08 AM, Tim Walker wrote:
On Fri, Apr 6, 2018 at 11:09 AM, Douglas Gilbert <dgilb...@interlog.com> wrote:
On 2018-04-06 02:42 AM, Christoph Hellwig wrote:
On Fri, Apr 06, 2018 at 08:24:18AM +0200, Hannes Reinecke wrote
On 2018-04-07 10:23 PM, Ming Lei wrote:
On Fri, Feb 09, 2018 at 09:36:39PM -0500, Douglas Gilbert wrote:
The Start Stop Unit (SSU) command takes in the order of a second to
complete on some SAS SSDs and longer on hard disks. Synchronize Cache (SC)
can also take some time. Both commands have
On 2018-04-06 02:42 AM, Christoph Hellwig wrote:
On Fri, Apr 06, 2018 at 08:24:18AM +0200, Hannes Reinecke wrote:
Ah. Far better.
What about delegating FORMAT UNIT to the control LUN, and not
implementing it for the individual disk LUNs?
That would make an even stronger case for having a
On 2018-04-05 07:43 PM, Tim Walker wrote:
On Tue, Apr 3, 2018 at 1:46 AM, Christoph Hellwig wrote:
On Sat, Mar 31, 2018 at 01:03:46PM +0200, Hannes Reinecke wrote:
Actually I would propose to have a 'management' LUN at LUN0, who could
handle all the device-wide commands
On 2018-04-04 04:32 PM, Kees Cook wrote:
On Wed, Apr 4, 2018 at 12:07 PM, Oleksandr Natalenko
wrote:
[ 261.262135] Bad or missing usercopy whitelist? Kernel memory exposure
attempt detected from SLUB object 'scsi_sense_cache' (offset 94, size 22)!
I can easily
On 2018-04-04 04:21 PM, Kees Cook wrote:
On Wed, Apr 4, 2018 at 12:07 PM, Oleksandr Natalenko
wrote:
With v4.16 I get the following dump while using smartctl:
[...]
[ 261.262135] Bad or missing usercopy whitelist? Kernel memory exposure
attempt detected from SLUB
good status values into BLK_STS_OK.
Fixes: e39a97353e53 ("scsi: core: return BLK_STS_OK for DID_OK in
__scsi_error_from_host_byte()")
Reported-by: Damien Le Moal <damien.lem...@wdc.com>
Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com>
Cc: Hannes Reinecke <h...@suse
rs present
in the driver_byte and the status byte. Add those checks and expand
description of function accordingly.
Signed-off-by: Douglas Gilbert <dgilb...@interlog.com>
---
The function would be better called blk_status_from_scsi_result(). Is
the leading "__" needed?
drivers/scsi/scsi
lus add 'case DID_OK:' before the
'default:' to emphasis the point.
Doug Gilbert
Fixes: e39a97353e53 ("scsi: core: return BLK_STS_OK for DID_OK in
__scsi_error_from_host_byte()")
Reported-by: Damien Le Moal <damien.lem...@wdc.com>
Signed-off-by: Bart Van Assche <bart.vanass...@wdc
On 2018-04-04 03:27 AM, Hannes Reinecke wrote:
With the introduction of commit e39a97353e53 ("scsi: core: return
BLK_STS_OK for DID_OK in __scsi_error_from_host_byte()"), a command that
failed with hostbyte=DID_OK and driverbyte=DRIVER_SENSE but lacking
additional sense information will have a
On 2018-04-02 07:10 AM, Mahesh Rajashekhara wrote:
Hello,
I am RAID HBA driver engineer here at Microsemi. We are working on linux driver
development for Microsemi SAS/SATA RAID HBA controllers.
As per our understanding, while a drive is processing the SANITIZE command:
- The drive should
On 2018-04-02 11:34 AM, Tim Walker wrote:
On Sat, Mar 31, 2018 at 10:52 AM, Douglas Gilbert <dgilb...@interlog.com> wrote:
On 2018-03-30 04:01 PM, Bart Van Assche wrote:
On Fri, 2018-03-30 at 12:36 -0600, Tim Walker wrote:
Yes I will be there to discuss the multi-LUN approach. I
On 2018-03-26 11:08 AM, Hannes Reinecke wrote:
On Fri, 23 Mar 2018 08:57:12 -0600
Tim Walker wrote:
Seagate announced their split actuator SAS drive, which will probably
require some kernel changes for full support. It's targeted at cloud
provider JBODs and RAID.
Since the action "reprep" is called from two places, rather than repeat
the code, make a new scsi_io_completion helper with "reprep" as its
suffix.
Signed-off-by: Douglas Gilbert <dgilb...@interlog.com>
Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de>
-
The scsi_io_completion function contains three BUG() and BUG_ON() calls.
Replace them with WARN variants.
Signed-off-by: Douglas Gilbert <dgilb...@interlog.com>
Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de>
---
drivers/scsi/scsi_lib.c | 15 ---
1 file changed, 1
Add likely() and unlikely() hints to conditionals on or near the fastpath.
Signed-off-by: Douglas Gilbert <dgilb...@interlog.com>
Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de>
---
A reviewer wanted any performance improvement (or otherwise) quantified.
The improvement
introduce bool do_print to simplify conditionals in the case of
a recovered error sense key in 2/7 rather than 3/7
ChangeLog since v3
- make use of bools sense_valid and sense_current consistent in 3/7
and 4/7
Douglas Gilbert (7):
scsi_io_completion comment on end_requ
Place scsi_io_completion()'s complex error processing associated with a
local enumeration into a static helper function. That enumeration's
values start with "ACTION_" so use the suffix "_action" in the helper
function's name.
Signed-off-by: Douglas Gilbert <dgilb...
Change and add some variable names, adjust some associated comments
for clarity. Correct some misleading comments.
Signed-off-by: Douglas Gilbert <dgilb...@interlog.com>
---
drivers/scsi/scsi_lib.c | 72 ++---
1 file changed, 39 insertions(
Break out several intertwined paths when cmd->result is non zero and
place them in the scsi_io_completion_nz_result helper function. The
logic is not changed.
Signed-off-by: Douglas Gilbert <dgilb...@interlog.com>
---
A reviewer requested the original helper function's two retu
scsi_end_request() is called multiple times from scsi_io_completion()
which branches on its bool returned value. Add comment before the static
definition of scsi_end_request() about the meaning of that return.
Signed-off-by: Douglas Gilbert <dgilb...@interlog.com>
Reviewed-by: Johannes Thu
Break out several intertwined paths when cmd->result is non zero and
place them in the scsi_io_completion_nz_result helper function. The
logic is not changed.
Signed-off-by: Douglas Gilbert <dgilb...@interlog.com>
---
A reviewer requested the original helper function's two retu
The scsi_io_completion function contains three BUG() and BUG_ON() calls.
Replace them with WARN variants.
Signed-off-by: Douglas Gilbert <dgilb...@interlog.com>
Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de>
---
drivers/scsi/scsi_lib.c | 15 ---
1 file changed, 1
Add likely() and unlikely() hints to conditionals on or near the fastpath.
Signed-off-by: Douglas Gilbert <dgilb...@interlog.com>
Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de>
---
A reviewer wanted any performance improvement (or otherwise) quantified.
The improvement
Since the action "reprep" is called from two places, rather than repeat
the code, make a new scsi_io_completion helper with "reprep" as its
suffix.
Signed-off-by: Douglas Gilbert <dgilb...@interlog.com>
Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de>
-
1 - 100 of 784 matches
Mail list logo