Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1277810

Re: kernel BUG at drivers/scsi/scsi_lib.c:1096!

From Mike Snitzer <snitzer@redhat.com>
Newsgroups linux.kernel
Subject Re: kernel BUG at drivers/scsi/scsi_lib.c:1096!
Date 2015-11-25 22:30 +0100
Message-ID <qyPNw-3gO-9@gated-at.bofh.it> (permalink)
References (5 earlier) <qyEfo-48i-13@gated-at.bofh.it> <qyMwi-12v-7@gated-at.bofh.it> <qyNLH-1Zv-13@gated-at.bofh.it> <qyNVn-22H-17@gated-at.bofh.it> <qyORt-2F7-33@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Nov 25 2015 at  3:23pm -0500,
Mike Snitzer <snitzer@redhat.com> wrote:

> On Wed, Nov 25 2015 at  2:24pm -0500,
> Jens Axboe <axboe@fb.com> wrote:
> 
> > On 11/25/2015 12:10 PM, Hannes Reinecke wrote:
> > >The problem is that NOMERGE does too much, as it inhibits _any_ merging.
> > 
> > Right, that is the point of the flag from the block layer view,
> > where it was originally added for the case mentioned.
> 
> And we really don't want _any_ merging.  The merging, if any, will have
> already happened in upper DM-multipath's elevator.  So there should be
> no need to have the underlying SCSI paths do any merging.
> 
> > >Unfortunately, the req->nr_phys_segments value is evaluated in the final
> > >_driver_ context _after_ the merging happend; cf
> > >scsi_lib.c:scsi_init_sgtable().
> > >As nr_phys_segments is inherited from the original request (and never
> > >recalculated with the new request queue limits) the following
> > >blk_rq_map_sg() call might end up at a different calculation, especially
> > >after retrying a request on another path.
> > 
> > That all sounds pretty horrible. Why is blk_rq_check_limits()
> > checking for mergeable at all? If merging is disabled on the
> > request, I'm assuming that's an attempt at an optimization since we
> > know it won't change. But that should be tracked separately, like
> > how it's done on the bio.
> 
> Not clear to me why it was checking for merging...

Ewan pointed out that blk_rq_check_limits()'s call to rq_mergable() was
introduced as part of Martin's DISCARD cleanup that prepared for
WRITE_SAME, see: commit e2a60da74 ("block: Clean up special command handling logic")

And prior to that, blk_rq_check_limits()'s (rq->cmd_flags & REQ_DISCARD)
check was introduced by some guy crazy doppelganger name "Ike Snitzer",
see commit: 3383977f ("block: update request stacking methods to support discards")

So basically we probably never needed the extra check in
blk_rq_check_limits() to begin with.. Ike was probably paranoid. ;)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

kernel BUG at drivers/scsi/scsi_lib.c:1096! Michael Ellerman <mpe@ellerman.id.au> - 2015-11-18 10:20 +0100
  Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Mark Salter <msalter@redhat.com> - 2015-11-18 15:10 +0100
    Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Michael Ellerman <mpe@ellerman.id.au> - 2015-11-19 02:10 +0100
      Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Christoph Hellwig <hch@infradead.org> - 2015-11-19 09:30 +0100
        Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Hannes Reinecke <hare@suse.de> - 2015-11-19 16:40 +0100
          Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Ewan Milne <emilne@redhat.com> - 2015-11-20 15:40 +0100
            Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Hannes Reinecke <hare@suse.de> - 2015-11-20 16:10 +0100
              Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Ewan Milne <emilne@redhat.com> - 2015-11-20 16:30 +0100
                Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Hannes Reinecke <hare@suse.de> - 2015-11-23 08:00 +0100
                Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Hannes Reinecke <hare@suse.de> - 2015-11-25 10:10 +0100
                Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Jens Axboe <axboe@fb.com> - 2015-11-25 19:00 +0100
                Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Hannes Reinecke <hare@suse.de> - 2015-11-25 20:20 +0100
                Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Jens Axboe <axboe@fb.com> - 2015-11-25 20:30 +0100
                Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Mike Snitzer <snitzer@redhat.com> - 2015-11-25 21:30 +0100
                Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Mike Snitzer <snitzer@redhat.com> - 2015-11-25 22:30 +0100
                Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Mike Snitzer <snitzer@redhat.com> - 2015-11-25 19:10 +0100
                Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Hannes Reinecke <hare@suse.de> - 2015-11-25 20:10 +0100
        Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Michael Ellerman <mpe@ellerman.id.au> - 2015-11-20 13:20 +0100
          Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Laurent Dufour <ldufour@linux.vnet.ibm.com> - 2015-11-20 14:00 +0100
            Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Mark Salter <msalter@redhat.com> - 2015-11-20 14:40 +0100
          Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Laurent Dufour <ldufour@linux.vnet.ibm.com> - 2015-11-21 12:40 +0100
            Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Ming Lei <ming.lei@canonical.com> - 2015-11-21 18:00 +0100
              Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Mark Salter <msalter@redhat.com> - 2015-11-23 00:30 +0100
                Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Ming Lei <ming.lei@canonical.com> - 2015-11-23 01:40 +0100
                Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Mark Salter <msalter@redhat.com> - 2015-11-23 03:00 +0100
                Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Ming Lei <ming.lei@canonical.com> - 2015-11-23 03:50 +0100
                Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Ming Lei <tom.leiming@gmail.com> - 2015-11-23 16:30 +0100
                Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Alan Ott <alan@softiron.co.uk> - 2015-11-24 20:40 +0100
                Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Laurent Dufour <ldufour@linux.vnet.ibm.com> - 2015-11-23 15:00 +0100
                Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Pratyush Anand <panand@redhat.com> - 2015-11-23 16:20 +0100
                Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Laurent Dufour <ldufour@linux.vnet.ibm.com> - 2015-11-23 16:30 +0100
                Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Ming Lei <ming.lei@canonical.com> - 2015-11-23 16:30 +0100
                Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Laurent Dufour <ldufour@linux.vnet.ibm.com> - 2015-11-23 17:30 +0100
                Re: kernel BUG at drivers/scsi/scsi_lib.c:1096! Mark Salter <msalter@redhat.com> - 2015-11-24 02:40 +0100

csiph-web