From patchwork Sun Feb 21 21:09:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John David Anglin X-Patchwork-Id: 8369381 Return-Path: X-Original-To: patchwork-linux-parisc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7BF699F2F0 for ; Sun, 21 Feb 2016 21:09:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AAA7E203C2 for ; Sun, 21 Feb 2016 21:09:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A25E320376 for ; Sun, 21 Feb 2016 21:09:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752227AbcBUVJV (ORCPT ); Sun, 21 Feb 2016 16:09:21 -0500 Received: from belmont79srvr.owm.bell.net ([184.150.200.79]:10442 "EHLO mtlfep01.bell.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751819AbcBUVJV convert rfc822-to-8bit (ORCPT ); Sun, 21 Feb 2016 16:09:21 -0500 Received: from bell.net mtlfep01 184.150.200.30 by mtlfep01.bell.net with ESMTP id <20160221210919.REVX19982.mtlfep01.bell.net@mtlspm01.bell.net> for ; Sun, 21 Feb 2016 16:09:19 -0500 Received: from [192.168.2.10] (really [70.54.51.120]) by mtlspm01.bell.net with ESMTP id <20160221210919.VXBM25255.mtlspm01.bell.net@[192.168.2.10]>; Sun, 21 Feb 2016 16:09:19 -0500 Subject: Re: SCSI bug Mime-Version: 1.0 (Apple Message framework v1085) From: John David Anglin In-Reply-To: <1456086490.2340.18.camel@HansenPartnership.com> Date: Sun, 21 Feb 2016 16:09:19 -0500 Cc: Helge Deller , linux-parisc List Message-Id: <28582474-5AB3-4022-86FE-E823F5990623@bell.net> References: <28D5FC66-A9E6-4F3E-A8AC-F9E68A6BC543@bell.net> <82D4BF6F-05CF-4441-9530-79475BFF84F3@bell.net> <56C8E1AC.3030409@gmx.de> <038473FE-9E6D-4F03-BBD4-9844B7B529E1@bell.net> <9C42B388-96D5-412A-BAC3-14E93415CA21@bell.net> <1456026424.2268.5.camel@HansenPartnership.com> <14EF1F4E-8045-4990-B29E-D489E82B1929@bell.net> <1456078381.2340.5.camel@HansenPartnership.com> <1456081676.2340.10.camel@HansenPartnership.com> <56CA11D2.3020900@gmx.de> <1456086490.2340.18.camel@HansenPartnership.com> To: James Bottomley X-Mailer: Apple Mail (2.1085) X-Opwv-CommTouchExtSvcRefID: str=0001.0A020206.56CA277F.00D0, ss=1, re=0.000, fgs=0 Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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: Any more ideas? Dave --- John David Anglin dave.anglin@bell.net -- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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; }