linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: Bart Van Assche <Bart.VanAssche@sandisk.com>
Cc: "hch@lst.de" <hch@lst.de>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"axboe@fb.com" <axboe@fb.com>
Subject: Re: split scsi passthrough fields out of struct request V2
Date: Thu, 2 Feb 2017 16:10:14 -0500	[thread overview]
Message-ID: <20170202211014.GA27604@redhat.com> (raw)
In-Reply-To: <20170202210434.GA27548@redhat.com>

On Thu, Feb 02 2017 at  4:04pm -0500,
Mike Snitzer <snitzer@redhat.com> wrote:

> On Thu, Feb 02 2017 at  2:46pm -0500,
> Bart Van Assche <Bart.VanAssche@sandisk.com> wrote:
> 
> > On Thu, 2017-02-02 at 14:13 -0500, Mike Snitzer wrote:
> > > On Thu, Feb 02 2017 at  1:43pm -0500, Bart Van Assche <Bart.VanAssche@sandisk.com> wrote:
> > > > On Thu, 2017-02-02 at 13:33 -0500, Mike Snitzer wrote:
> > > > > I'll go back over hch's changes to see if I can spot anything.  But is
> > > > > this testing using dm_mod.use_bk_mq=Y or are you testing old .request_fn
> > > > > dm-multipath?
> > > > 
> > > > The srp-test software tests multiple configurations: dm-mq on scsi-mq, dm-sq
> > > > on scsi-mq and dm-sq on scsi-sq. I have not yet checked which of these
> > > > three configurations triggers the kernel crash.
> > > 
> > > OK, such info is important to provide for crashes like this.  Please let
> > > me know once you do.
> > 
> > Hello Mike,
> > 
> > Apparently it's the large I/O test (using dm-mq on scsi-mq) that triggers the
> > crash:
> 
> I've gone over Christoph's "dm: always defer request allocation to the
> owner of the request_queue" commit yet again.  Most of that commit's
> changes are just mechanical.  I didn't see any problems.
> 
> In general, dm_start_request() calls dm_get(md) to take a reference on
> the mapped_device.  And rq_completed() calls dm_put(md) to drop the
> reference.  The DM device's request_queue (md->queue) should _not_ ever
> be torn down before all references on the md have been dropped. But I'll
> have to look closer on how/if that is enforced anywhere by coordinating
> with block core.
> 
> In any case, the crash you reported was that the mapped_device was being
> dereferenced after it was freed (at line 187's md->queue).  Which seems
> to imply a dm_get/dm_put reference count regression.  But I'm not seeing
> where at this point.

Maybe it isn't a regression but something about Christoph's changes
causes a race to present itself?

Care to try moving the dm_get(md) at the end of dm_start_request() to
the beginning of dm_start_request() and report back on whether it helps
at all?

Thanks,
Mike

  reply	other threads:[~2017-02-02 21:10 UTC|newest]

Thread overview: 116+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-25 17:25 split scsi passthrough fields out of struct request V2 Christoph Hellwig
2017-01-25 17:25 ` [PATCH 01/18] block: add a op_is_flush helper Christoph Hellwig
2017-01-26  2:58   ` Martin K. Petersen
2017-01-26 22:38   ` Bart Van Assche
2017-01-25 17:25 ` [PATCH 02/18] md: cleanup bio op / flags handling in raid1_write_request Christoph Hellwig
2017-01-26  2:59   ` Martin K. Petersen
2017-01-26 23:18   ` Bart Van Assche
2017-01-25 17:25 ` [PATCH 03/18] block: fix elevator init check Christoph Hellwig
2017-01-26  3:01   ` Martin K. Petersen
2017-01-26 23:21   ` Bart Van Assche
2017-01-25 17:25 ` [PATCH 04/18] block: simplify blk_init_allocated_queue Christoph Hellwig
2017-01-26  3:02   ` Martin K. Petersen
2017-01-26 23:27   ` Bart Van Assche
2017-01-25 17:25 ` [PATCH 05/18] block: allow specifying size for extra command data Christoph Hellwig
2017-01-26  3:15   ` Martin K. Petersen
2017-01-27 16:12     ` Christoph Hellwig
2017-01-27 17:21       ` Bart Van Assche
2017-01-27 17:26         ` Jens Axboe
2017-01-27 17:30           ` Bart Van Assche
2017-01-27 17:33             ` Jens Axboe
2017-01-25 17:25 ` [PATCH 06/18] dm: remove incomple BLOCK_PC support Christoph Hellwig
2017-01-27 17:32   ` Bart Van Assche
2017-01-25 17:25 ` [PATCH 07/18] dm: always defer request allocation to the owner of the request_queue Christoph Hellwig
2017-01-27 16:34   ` Mike Snitzer
2017-01-27 16:36     ` Christoph Hellwig
2017-01-27 16:44       ` Mike Snitzer
2017-01-25 17:25 ` [PATCH 08/18] scsi_dh_rdac: switch to scsi_execute_req_flags() Christoph Hellwig
2017-01-26  3:18   ` Martin K. Petersen
2017-01-25 17:25 ` [PATCH 09/18] scsi_dh_emc: " Christoph Hellwig
2017-01-26  3:19   ` Martin K. Petersen
2017-01-25 17:25 ` [PATCH 10/18] scsi_dh_hp_sw: " Christoph Hellwig
2017-01-26  3:20   ` Martin K. Petersen
2017-01-25 17:25 ` [PATCH 11/18] scsi: remove gfp_flags member in scsi_host_cmd_pool Christoph Hellwig
2017-01-26  3:21   ` Martin K. Petersen
2017-01-27 17:38   ` Bart Van Assche
2017-01-25 17:25 ` [PATCH 12/18] scsi: respect unchecked_isa_dma for blk-mq Christoph Hellwig
2017-01-26  3:23   ` Martin K. Petersen
2017-01-27 17:45   ` Bart Van Assche
2017-01-25 17:25 ` [PATCH 13/18] scsi: remove scsi_cmd_dma_pool Christoph Hellwig
2017-01-26  3:24   ` Martin K. Petersen
2017-01-27 17:51   ` Bart Van Assche
2017-01-25 17:25 ` [PATCH 14/18] scsi: remove __scsi_alloc_queue Christoph Hellwig
2017-01-26  3:25   ` Martin K. Petersen
2017-01-27 17:58   ` Bart Van Assche
2017-01-28  8:23     ` hch
2017-01-25 17:25 ` [PATCH 15/18] scsi: allocate scsi_cmnd structures as part of struct request Christoph Hellwig
2017-01-26  3:30   ` Martin K. Petersen
2017-01-27 18:39   ` Bart Van Assche
2017-01-28  8:25     ` hch
2017-01-25 17:25 ` [PATCH 16/18] block/bsg: move queue creation into bsg_setup_queue Christoph Hellwig
2017-01-27 18:48   ` Bart Van Assche
2017-01-25 17:25 ` [PATCH 17/18] block: split scsi_request out of struct request Christoph Hellwig
2017-01-25 17:25 ` [PATCH 18/18] block: don't assign cmd_flags in __blk_rq_prep_clone Christoph Hellwig
2017-01-26  3:31   ` Martin K. Petersen
2017-01-26 18:29 ` split scsi passthrough fields out of struct request V2 Bart Van Assche
2017-01-26 18:44   ` Jens Axboe
2017-01-26 18:52     ` Bart Van Assche
2017-01-26 18:57       ` Jens Axboe
2017-01-26 18:59         ` hch
2017-01-26 19:01           ` Jens Axboe
2017-01-26 20:47             ` [dm-devel] " Bart Van Assche
2017-01-26 20:54               ` Jens Axboe
2017-01-26 21:01                 ` Bart Van Assche
2017-01-26 21:12                   ` Jens Axboe
2017-01-26 21:47                     ` Bart Van Assche
2017-01-26 21:51                       ` Jens Axboe
2017-01-26 23:14                         ` Bart Van Assche
2017-01-26 23:26                           ` Jens Axboe
2017-01-26 23:47                             ` Bart Van Assche
2017-01-26 23:50                               ` Jens Axboe
2017-01-27  0:33                                 ` Jens Axboe
2017-01-27  0:38                                 ` Bart Van Assche
2017-01-27  0:41                                   ` Jens Axboe
2017-01-27  1:15                                     ` Bart Van Assche
2017-01-27  1:22                                       ` Jens Axboe
2017-01-27  6:40                                         ` Jens Axboe
2017-01-27  8:04                                           ` Jens Axboe
2017-01-27 16:52                                             ` Bart Van Assche
2017-01-27 16:56                                               ` Jens Axboe
2017-01-27 17:03                                                 ` Bart Van Assche
2017-01-31  1:12                                                 ` Bart Van Assche
2017-01-31  1:38                                                   ` Jens Axboe
2017-01-31  4:13                                                     ` Jens Axboe
2017-01-31 21:35                                                     ` Bart Van Assche
2017-01-31 21:55                                                       ` Bart Van Assche
2017-01-31 21:58                                                         ` Jens Axboe
2017-02-01  1:01                                                           ` Bart Van Assche
2017-02-01  6:38                                                             ` Jens Axboe
2017-02-01 16:46                                                               ` Bart Van Assche
2017-02-01 17:13                                                                 ` Jens Axboe
2017-02-01 17:28                                                                   ` Bart Van Assche
2017-02-01 19:21                                                                   ` Bart Van Assche
2017-02-01 22:01                                                                   ` Bart Van Assche
2017-02-02 17:27                                                                     ` Bart Van Assche
2017-02-02 18:33                                                                       ` Mike Snitzer
2017-02-02 18:43                                                                         ` Bart Van Assche
2017-02-02 19:13                                                                           ` Mike Snitzer
2017-02-02 19:46                                                                             ` Bart Van Assche
2017-02-02 21:04                                                                               ` Mike Snitzer
2017-02-02 21:10                                                                                 ` Mike Snitzer [this message]
2017-02-03  0:20                                                                                   ` Bart Van Assche
2017-02-03  0:42                                                                                     ` Mike Snitzer
2017-02-02 22:38                                                                                 ` Bart Van Assche
2017-01-27 17:02                                         ` [dm-devel] " Bart Van Assche
2017-01-27 16:11 ` Jens Axboe
2017-01-27 16:17   ` Christoph Hellwig
2017-01-27 16:21     ` Jens Axboe
2017-01-27 16:23       ` Christoph Hellwig
2017-01-27 16:27         ` Jens Axboe
2017-01-27 16:34           ` Christoph Hellwig
2017-01-27 16:38             ` Jens Axboe
2017-01-27 16:42               ` Christoph Hellwig
2017-01-27 16:58                 ` Jens Axboe
2017-01-27 21:27 ` Bart Van Assche
2017-01-28  8:29   ` hch
2017-01-30  6:58   ` Hannes Reinecke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170202211014.GA27604@redhat.com \
    --to=snitzer@redhat.com \
    --cc=Bart.VanAssche@sandisk.com \
    --cc=axboe@fb.com \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).