All of lore.kernel.org
 help / color / mirror / Atom feed
From: John David Anglin <dave.anglin@bell.net>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Helge Deller <deller@gmx.de>,
	linux-parisc List <linux-parisc@vger.kernel.org>
Subject: Re: SCSI bug
Date: Sun, 21 Feb 2016 16:09:19 -0500	[thread overview]
Message-ID: <28582474-5AB3-4022-86FE-E823F5990623@bell.net> (raw)
In-Reply-To: <1456086490.2340.18.camel@HansenPartnership.com>

On 2016-02-21, at 3:28 PM, James Bottomley wrote:

> That said, I still can't reproduce this, so you're going to have to
> help me find it.  Current theory is ll_merge_request_fn() it looks like
> there's scope for miscalculation in there.  Can you instrument this
> line
> 
> 	/* Merge is OK... */
> 	req->nr_phys_segments = total_phys_segments;
> 
> To add just before the return
> 
> if (req->nr_phys_segments != __blk_recalc_rq_segments(rq->q, rq->bio,	false) 
> 	printk("MISMATCH IN MERGE: got %d, should get %d\n", 
> 		req->nr_phys_segments,
> 		__blk_recalc_rq_segments(rq->q, rq->bio, false));

This didn't trigger.  There were some typos:

diff --git a/block/blk-merge.c b/block/blk-merge.c
index d9c3a75..e8969ef 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -545,6 +545,12 @@ static int ll_merge_requests_fn(struct request_queue *q, struct request *req,
 
        /* Merge is OK... */
        req->nr_phys_segments = total_phys_segments;
+
+if (req->nr_phys_segments != __blk_recalc_rq_segments(req->q, req->bio,        false)) 
+       printk("MISMATCH IN MERGE: got %d, should get %d\n", 
+               req->nr_phys_segments,
+               __blk_recalc_rq_segments(req->q, req->bio, false));
+
        return 1;
 }
 

Any more ideas?

Dave
--
John David Anglin	dave.anglin@bell.net




  reply	other threads:[~2016-02-21 21:09 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-23 18:00 SCSI bug John David Anglin
2016-02-20 20:13 ` John David Anglin
2016-02-20 20:43   ` John David Anglin
2016-02-20 21:59     ` Helge Deller
2016-02-20 22:52       ` John David Anglin
2016-02-21  2:52         ` John David Anglin
2016-02-21  3:47           ` James Bottomley
2016-02-21 14:45             ` John David Anglin
2016-02-21 18:10               ` James Bottomley
2016-02-21 18:09             ` John David Anglin
2016-02-21 18:13               ` James Bottomley
2016-02-21 18:43                 ` John David Anglin
2016-02-21 19:07                   ` James Bottomley
2016-02-21 19:36                     ` Helge Deller
2016-02-21 20:28                       ` James Bottomley
2016-02-21 21:09                         ` John David Anglin [this message]
2016-02-21 21:17                           ` Helge Deller
2016-02-21 21:49                             ` James Bottomley
2016-02-21 22:08                               ` John David Anglin
2016-02-22  0:53                             ` John David Anglin
2016-02-22  3:24                               ` John David Anglin
2016-02-23  3:04                                 ` John David Anglin
2016-02-23 18:06                                   ` Helge Deller
2016-02-23 19:10                                     ` John David Anglin
2016-02-21 20:42                       ` John David Anglin

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=28582474-5AB3-4022-86FE-E823F5990623@bell.net \
    --to=dave.anglin@bell.net \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=deller@gmx.de \
    --cc=linux-parisc@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 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.