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-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
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-03-26 08:13 PM, Bart Van Assche wrote:
On Sun, 2018-03-18 at 21:59 +0100, Douglas Gilbert wrote:
+ /* sense not about current command is termed: deferred */
Do we really need comments that explain the SCSI specs? If such a comment is
added I think it should be added above
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>
---
drivers/scsi/scsi_lib.c | 41 ++-
Change some variable names and associated comments for clarity. Correct
some misleading comments.
Signed-off-by: Douglas Gilbert <dgilb...@interlog.com>
Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de>
---
drivers/scsi/scsi_lib.c | 57 ++---
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
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>
---
drivers/scsi/scsi_lib.c | 15 ---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/driver
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
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
ct remains, this is a very
complex function.
This patch is against Martin Petersen's 4.17/scsi-queue branch.
Douglas Gilbert (7):
scsi_io_completion comment on end_request return
scsi_io_completion rename variables
scsi_io_completion_nz_result function added
scsi_io_completion_action he
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...
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...
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>
-
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
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
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.
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-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
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...
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
Change some variable names and associated comments for clarity. Correct
some misleading comments.
Signed-off-by: Douglas Gilbert <dgilb...@interlog.com>
Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de>
Reviewed-by: Bart Van Assche <bart.vanass...@wdc.com>
---
drivers/sc
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
H_RETRY, 0);
and
__scsi_queue_insert(cmd, SCSI_MLQUEUE_DEVICE_BUSY, 0);
need that trailing 0 changed to 'false', prior to applying 4/7 .
Douglas Gilbert (7):
scsi_io_completion comment on end_request return
scsi_io_completion rename variables
scsi_io_completion_nz_result function added
scsi_io_complet
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>
-
On 2018-03-19 11:40 AM, Jack Wang wrote:
Hi list,
Any one knows how can I locate a HDD directly attached to mpt3sas,
sas3ircu only supports LOCATE commd to locates driver installed in a
disk enclosure, but not directly attached.
I know microsemi/PMCs supports SGPIO interface to locate drive
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>
---
This was done at a reviewer's request. This patchset did not change those
BUG() lines but the git-diff suggested
Change some variable names and associated comments for clarity. Correct
some misleading comments.
Signed-off-by: Douglas Gilbert <dgilb...@interlog.com>
Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de>
---
drivers/scsi/scsi_lib.c | 57 ++---
main thing to review is
whether the refactoring is worthwhile and whether the logic remains the
same after the refactoring.
Douglas Gilbert (6):
scsi_io_completion comment on end_request return
scsi_io_completion rename variables
scsi_io_completion_nz_result function added
scsi_io_completion
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
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
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...
Break out several interwined paths when cmd->result is non zero and
place them in 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 return values
b
ert <dgilb...@interlog.com>
Signed-off-by: Hannes Reinecke <h...@suse.com>
Reviewed-by: Douglas Gilbert <dgilb...@interlog.com>
---
drivers/scsi/scsi_lib.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index aea5a1ae318b..11d63
On 2018-02-26 02:25 AM, Hannes Reinecke wrote:
On 02/25/2018 07:29 PM, Douglas Gilbert wrote:
The SCSI PRE-FETCH (10 or 16) command is present both on hard disks
and some SSDs. It is useful when the address of the next block(s) to
be read is known but it is not following the LBA of the current
The "ChangeLog for v1" section in 0/2 (the cover letter) of this patch set
outlines the changes in this patch.
Signed-off-by: Douglas Gilbert <dgilb...@interlog.com>
---
drivers/scsi/scsi_lib.c | 297 +---
include/scsi/scsi.h
ChangeLog:
- convert 3 BUG calls to WARN calls
- un-invert some conditional logic to uncover the real fast path
- try to improve the comments, including noting what the bool return
value from scsi_end_request() means
Signed-off-by: Douglas Gilbert <dgilb...@interlog.com>
---
d
o)
This patch is against mkp's 4.17/scsi-queue branch. It also
applies to lk 4.15.x where it was tested on a SAS SSD.
Douglas Gilbert (2):
scsi_io_completion cleanup and fix CONDITION MET handling
scsi_io_completion-change2warn
drivers/scsi/scsi_lib.c | 304 +
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
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
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
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-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 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
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
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-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
.
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
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
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
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
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
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
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
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
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
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-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
701 - 784 of 784 matches
Mail list logo