All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/3] scsi/dm: dm_blk_ioctl(): implement failover for SG_IO on dm-multipath
@ 2021-06-28 15:15 ` mwilck
  0 siblings, 0 replies; 28+ messages in thread
From: mwilck @ 2021-06-28 15:15 UTC (permalink / raw)
  To: Mike Snitzer, Alasdair G Kergon, Bart Van Assche,
	Martin K. Petersen, linux-scsi, dm-devel, Hannes Reinecke,
	Christoph Hellwig
  Cc: Daniel Wagner, linux-block, Paolo Bonzini, Benjamin Marzinski,
	nkoenig, emilne, Martin Wilck

From: Martin Wilck <mwilck@suse.com>

Hello Mike, hello Martin,

here is v5 of my attempt to add retry logic to SG_IO on dm-multipath
devices.

Christoph's comment on v4 has been received, but as I'm still confused
how to handle the SCSI result / blk_status_t conversion properly, and
waiting for more guidance, I want to fix the nasty bug in v4 first.

Regards
Martin

Changes v4->v5:

 - (2/3) Fixed bug in logical / bitwise and expression
   Reported-by: kernel test robot <lkp@intel.com>

Changes v3->v4 (thanks to Mike Snitzer):

 - Added an additional helper function sg_io_to_blk_status() to
   scsi_ioctl.c, in order to avoid open-coding handling of the SCSI result
   code in device-mapper.

 - Added a new method dm_sg_io_ioctl_fn() in struct target_type, define
   only by the multipath target. This allows moving the bulk of the new
   code to dm-mpath.c, and avoids the wrong limitation of the code to
   request-based multipath.

Changes v2->v3:

 - un-inlined scsi_result_to_blk_status again, and move the helper
   __scsi_result_to_blk_status to block/scsi_ioctl.c instead
   (Bart v. Assche)
 - open-coded the status/msg/host/driver-byte -> result conversion
   where the standard SCSI helpers aren't usable (Bart v. Assche)
    
Changes v1->v2:

 - applied modifications from Mike Snitzer
 - moved SG_IO dependent code to a separate file, no scsi includes in
   dm.c any more
 - made the new code depend on a configuration option 
 - separated out scsi changes, made scsi_result_to_blk_status()
   inline to avoid dependency of dm_mod from scsi_mod (Paolo Bonzini)

Martin Wilck (3):
  scsi: scsi_ioctl: export __scsi_result_to_blk_status()
  scsi: scsi_ioctl: add sg_io_to_blk_status()
  dm mpath: add CONFIG_DM_MULTIPATH_SG_IO - failover for SG_IO

Martin Wilck (3):
  scsi: scsi_ioctl: export __scsi_result_to_blk_status()
  scsi: scsi_ioctl: add sg_io_to_blk_status()
  dm mpath: add CONFIG_DM_MULTIPATH_SG_IO - failover for SG_IO

 block/scsi_ioctl.c            |  72 ++++++++++++++++++++++-
 drivers/md/Kconfig            |  11 ++++
 drivers/md/dm-core.h          |   5 ++
 drivers/md/dm-mpath.c         | 105 ++++++++++++++++++++++++++++++++++
 drivers/md/dm.c               |  26 ++++++++-
 drivers/scsi/scsi_lib.c       |  24 +-------
 include/linux/blkdev.h        |   4 ++
 include/linux/device-mapper.h |   8 ++-
 8 files changed, 226 insertions(+), 29 deletions(-)

-- 
2.32.0


^ permalink raw reply	[flat|nested] 28+ messages in thread
* Re: [PATCH v5 3/3] dm mpath: add CONFIG_DM_MULTIPATH_SG_IO - failover for SG_IO
@ 2021-06-30 22:36 kernel test robot
  0 siblings, 0 replies; 28+ messages in thread
From: kernel test robot @ 2021-06-30 22:36 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 4699 bytes --]

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210628151558.2289-4-mwilck@suse.com>
References: <20210628151558.2289-4-mwilck@suse.com>
TO: mwilck(a)suse.com
TO: Mike Snitzer <snitzer@redhat.com>
TO: Alasdair G Kergon <agk@redhat.com>
TO: Bart Van Assche <Bart.VanAssche@sandisk.com>
TO: "Martin K. Petersen" <martin.petersen@oracle.com>
TO: linux-scsi(a)vger.kernel.org
TO: dm-devel(a)redhat.com
TO: Hannes Reinecke <hare@suse.de>
TO: Christoph Hellwig <hch@lst.de>
CC: Daniel Wagner <dwagner@suse.de>
CC: linux-block(a)vger.kernel.org

Hi,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on scsi/for-next]
[cannot apply to dm/for-next block/for-next song-md/md-next v5.13 next-20210630]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/mwilck-suse-com/scsi-dm-dm_blk_ioctl-implement-failover-for-SG_IO-on-dm-multipath/20210628-232212
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: x86_64-randconfig-b001-20210630 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8d21d5472501460933e78aead04cf59579025ba4)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # apt-get install iwyu # include-what-you-use
        # https://github.com/0day-ci/linux/commit/c6258b84ddc2128c365356dc189407083935c791
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review mwilck-suse-com/scsi-dm-dm_blk_ioctl-implement-failover-for-SG_IO-on-dm-multipath/20210628-232212
        git checkout c6258b84ddc2128c365356dc189407083935c791
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross C=1 CHECK=iwyu O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/md/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


iwyu warnings: (new ones prefixed by >>)
   drivers/md/dm.c:17:1: iwyu: warning: superfluous #include <linux/blkpg.h>
   drivers/md/dm.c:31:1: iwyu: warning: superfluous #include <linux/keyslot-manager.h>
   drivers/md/dm.c:19:1: iwyu: warning: superfluous #include <linux/mempool.h>
>> drivers/md/dm.c:32:1: iwyu: warning: superfluous #include <scsi/sg.h>

vim +32 drivers/md/dm.c

^1da177e4c3f41 Linus Torvalds    2005-04-16  11  
^1da177e4c3f41 Linus Torvalds    2005-04-16  12  #include <linux/init.h>
^1da177e4c3f41 Linus Torvalds    2005-04-16  13  #include <linux/module.h>
48c9c27b8bcd2a Arjan van de Ven  2006-03-27  14  #include <linux/mutex.h>
6958c1c640af8c Mikulas Patocka   2020-07-08  15  #include <linux/sched/mm.h>
174cd4b1e5fbd0 Ingo Molnar       2017-02-02  16  #include <linux/sched/signal.h>
^1da177e4c3f41 Linus Torvalds    2005-04-16  17  #include <linux/blkpg.h>
^1da177e4c3f41 Linus Torvalds    2005-04-16  18  #include <linux/bio.h>
^1da177e4c3f41 Linus Torvalds    2005-04-16  19  #include <linux/mempool.h>
f26c5719b2d7b0 Dan Williams      2017-04-12  20  #include <linux/dax.h>
^1da177e4c3f41 Linus Torvalds    2005-04-16  21  #include <linux/slab.h>
^1da177e4c3f41 Linus Torvalds    2005-04-16  22  #include <linux/idr.h>
7e026c8c0a4200 Dan Williams      2017-05-29  23  #include <linux/uio.h>
3ac51e741a46af Darrick J. Wong   2006-03-27  24  #include <linux/hdreg.h>
3f77316de0ec0f Kiyoshi Ueda      2010-08-12  25  #include <linux/delay.h>
ffcc3936416066 Mike Snitzer      2014-10-28  26  #include <linux/wait.h>
71cdb6978a80f9 Christoph Hellwig 2015-10-15  27  #include <linux/pr.h>
b0b4d7c6752a45 Elena Reshetova   2017-10-20  28  #include <linux/refcount.h>
c6a564ffadc910 Christoph Hellwig 2020-03-25  29  #include <linux/part_stat.h>
a892c8d52c0228 Satya Tangirala   2020-05-14  30  #include <linux/blk-crypto.h>
aa6ce87a768226 Satya Tangirala   2021-02-01  31  #include <linux/keyslot-manager.h>
c6258b84ddc212 Martin Wilck      2021-06-28 @32  #include <scsi/sg.h>
55782138e47d9b Li Zefan          2009-06-09  33  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 41399 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread
* Re: [PATCH v5 3/3] dm mpath: add CONFIG_DM_MULTIPATH_SG_IO - failover for SG_IO
@ 2021-07-02  4:55 kernel test robot
  0 siblings, 0 replies; 28+ messages in thread
From: kernel test robot @ 2021-07-02  4:55 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 5059 bytes --]

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210628151558.2289-4-mwilck@suse.com>
References: <20210628151558.2289-4-mwilck@suse.com>
TO: mwilck(a)suse.com
TO: Mike Snitzer <snitzer@redhat.com>
TO: Alasdair G Kergon <agk@redhat.com>
TO: Bart Van Assche <Bart.VanAssche@sandisk.com>
TO: "Martin K. Petersen" <martin.petersen@oracle.com>
TO: linux-scsi(a)vger.kernel.org
TO: dm-devel(a)redhat.com
TO: Hannes Reinecke <hare@suse.de>
TO: Christoph Hellwig <hch@lst.de>
CC: Daniel Wagner <dwagner@suse.de>
CC: linux-block(a)vger.kernel.org

Hi,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on scsi/for-next]
[cannot apply to dm/for-next block/for-next song-md/md-next v5.13 next-20210701]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/mwilck-suse-com/scsi-dm-dm_blk_ioctl-implement-failover-for-SG_IO-on-dm-multipath/20210628-232212
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
:::::: branch date: 4 days ago
:::::: commit date: 4 days ago
config: x86_64-randconfig-b001-20210701 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project e7e71e9454ed76c1b3d8140170b5333c28bef1be)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # apt-get install iwyu # include-what-you-use
        # https://github.com/0day-ci/linux/commit/c6258b84ddc2128c365356dc189407083935c791
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review mwilck-suse-com/scsi-dm-dm_blk_ioctl-implement-failover-for-SG_IO-on-dm-multipath/20210628-232212
        git checkout c6258b84ddc2128c365356dc189407083935c791
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross C=1 CHECK=iwyu O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/md/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


iwyu warnings: (new ones prefixed by >>)
   drivers/md/dm-mpath.c:28:1: iwyu: warning: superfluous #include <linux/atomic.h>
   drivers/md/dm-mpath.c:17:1: iwyu: warning: superfluous #include <linux/ctype.h>
   drivers/md/dm-mpath.c:26:1: iwyu: warning: superfluous #include <linux/delay.h>
   drivers/md/dm-mpath.c:19:1: iwyu: warning: superfluous #include <linux/mempool.h>
   drivers/md/dm-mpath.c:21:1: iwyu: warning: superfluous #include <linux/pagemap.h>
   drivers/md/dm-mpath.c:23:1: iwyu: warning: superfluous #include <linux/time.h>
>> drivers/md/dm-mpath.c:30:1: iwyu: warning: superfluous #include <scsi/sg.h>
>> drivers/md/dm-mpath.c:14:1: iwyu: warning: superfluous #include "dm-core.h"

vim +30 drivers/md/dm-mpath.c

586e80e6ee0d13 Mikulas Patocka     2008-10-21   9  
4cc96131afce3e Mike Snitzer        2016-05-12  10  #include "dm-rq.h"
76e33fe4e2c436 Mike Snitzer        2016-05-19  11  #include "dm-bio-record.h"
^1da177e4c3f41 Linus Torvalds      2005-04-16  12  #include "dm-path-selector.h"
b15546f942c09f Mike Anderson       2007-10-19  13  #include "dm-uevent.h"
c6258b84ddc212 Martin Wilck        2021-06-28 @14  #include "dm-core.h"
^1da177e4c3f41 Linus Torvalds      2005-04-16  15  
e5863d9ad75492 Mike Snitzer        2014-12-17  16  #include <linux/blkdev.h>
^1da177e4c3f41 Linus Torvalds      2005-04-16  17  #include <linux/ctype.h>
^1da177e4c3f41 Linus Torvalds      2005-04-16  18  #include <linux/init.h>
^1da177e4c3f41 Linus Torvalds      2005-04-16  19  #include <linux/mempool.h>
^1da177e4c3f41 Linus Torvalds      2005-04-16  20  #include <linux/module.h>
^1da177e4c3f41 Linus Torvalds      2005-04-16  21  #include <linux/pagemap.h>
^1da177e4c3f41 Linus Torvalds      2005-04-16  22  #include <linux/slab.h>
^1da177e4c3f41 Linus Torvalds      2005-04-16  23  #include <linux/time.h>
be240ff5e402df Anatol Pomazau      2020-01-13  24  #include <linux/timer.h>
^1da177e4c3f41 Linus Torvalds      2005-04-16  25  #include <linux/workqueue.h>
35991652baa12f Mikulas Patocka     2012-06-03  26  #include <linux/delay.h>
cfae5c9bb66325 Chandra Seetharaman 2008-05-01  27  #include <scsi/scsi_dh.h>
60063497a95e71 Arun Sharma         2011-07-26 @28  #include <linux/atomic.h>
78ce23b51802f5 Mike Snitzer        2016-01-31  29  #include <linux/blk-mq.h>
c6258b84ddc212 Martin Wilck        2021-06-28 @30  #include <scsi/sg.h>
^1da177e4c3f41 Linus Torvalds      2005-04-16  31  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 39115 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2021-07-06 10:13 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-28 15:15 [PATCH v5 0/3] scsi/dm: dm_blk_ioctl(): implement failover for SG_IO on dm-multipath mwilck
2021-06-28 15:15 ` [dm-devel] " mwilck
2021-06-28 15:15 ` [PATCH v5 1/3] scsi: scsi_ioctl: export __scsi_result_to_blk_status() mwilck
2021-06-28 15:15   ` [dm-devel] " mwilck
2021-06-28 15:15 ` [PATCH v5 2/3] scsi: scsi_ioctl: add sg_io_to_blk_status() mwilck
2021-06-28 15:15   ` [dm-devel] " mwilck
2021-06-28 15:15 ` [PATCH v5 3/3] dm mpath: add CONFIG_DM_MULTIPATH_SG_IO - failover for SG_IO mwilck
2021-06-28 15:15   ` [dm-devel] " mwilck
2021-07-01  7:56   ` Christoph Hellwig
2021-07-01  7:56     ` [dm-devel] " Christoph Hellwig
2021-07-01 10:35     ` Martin Wilck
2021-07-01 10:35       ` [dm-devel] " Martin Wilck
2021-07-01 11:34       ` Christoph Hellwig
2021-07-01 11:34         ` [dm-devel] " Christoph Hellwig
2021-07-02 14:21         ` Martin Wilck
2021-07-02 14:21           ` Martin Wilck
2021-07-05 13:02           ` Paolo Bonzini
2021-07-05 13:02             ` Paolo Bonzini
2021-07-05 13:11             ` Hannes Reinecke
2021-07-05 13:11               ` Hannes Reinecke
2021-07-05 13:48               ` Martin Wilck
2021-07-05 13:48                 ` Martin Wilck
2021-07-06 10:13                 ` Paolo Bonzini
2021-07-06 10:13                   ` Paolo Bonzini
2021-07-01 11:06     ` Paolo Bonzini
2021-07-01 11:06       ` [dm-devel] " Paolo Bonzini
2021-06-30 22:36 kernel test robot
2021-07-02  4:55 kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.