From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755431AbdEKJxY (ORCPT ); Thu, 11 May 2017 05:53:24 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:36534 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755069AbdEKJxW (ORCPT ); Thu, 11 May 2017 05:53:22 -0400 Subject: Re: [linux-next][bock] [bisected c20cfc27a] WARNING: CPU: 22 PID: 0 at block/blk-core.c:2655 .blk_update_request+0x4f8/0x500 From: Abdul Haleem To: Christoph Hellwig Cc: Jens Axboe , sachinp , "Martin K. Petersen" , Stephen Rothwell , linux-kernel , linux-block , linuxppc-dev Date: Thu, 11 May 2017 15:22:25 +0530 In-Reply-To: <20170510175506.GA5084@lst.de> References: <1493965539.7355.44.camel@abdul.in.ibm.com> <15a0a50a-d57d-736b-634c-4d0131ec5af3@kernel.dk> <1494227599.2983.2.camel@abdul.in.ibm.com> <1494343101.11532.4.camel@abdul.in.ibm.com> <20170510075642.GA10943@lst.de> <1494409780.11532.14.camel@abdul.in.ibm.com> <20170510175506.GA5084@lst.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable x-cbid: 17051109-0004-0000-0000-00000201B081 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17051109-0005-0000-0000-000009F6EFBA Message-Id: <1494496345.6713.2.camel@abdul.in.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-05-11_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1705110056 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2017-05-10 at 19:55 +0200, Christoph Hellwig wrote: > Hi Abdul, > > can you test the patch below? I'll try to create a way to inject > short WRITE SAME commands using qemu next, but I thought I'd give > you a chance to try it as well. No warnings with the patch. Thanks for all your support ! Reported-and-tested-by : Abdul Haleem > > --- > diff --git a/block/blk-core.c b/block/blk-core.c > index c580b0138a7f..c7068520794b 100644 > --- a/block/blk-core.c > +++ b/block/blk-core.c > @@ -2644,8 +2644,6 @@ bool blk_update_request(struct request *req, int error, unsigned int nr_bytes) > return false; > } > > - WARN_ON_ONCE(req->rq_flags & RQF_SPECIAL_PAYLOAD); > - > req->__data_len -= total_bytes; > > /* update sector only for requests with clear definition of sector */ > @@ -2658,17 +2656,19 @@ bool blk_update_request(struct request *req, int error, unsigned int nr_bytes) > req->cmd_flags |= req->bio->bi_opf & REQ_FAILFAST_MASK; > } > > - /* > - * If total number of sectors is less than the first segment > - * size, something has gone terribly wrong. > - */ > - if (blk_rq_bytes(req) < blk_rq_cur_bytes(req)) { > - blk_dump_rq_flags(req, "request botched"); > - req->__data_len = blk_rq_cur_bytes(req); > - } > + if (!(req->rq_flags & RQF_SPECIAL_PAYLOAD)) { > + /* > + * If total number of sectors is less than the first segment > + * size, something has gone terribly wrong. > + */ > + if (blk_rq_bytes(req) < blk_rq_cur_bytes(req)) { > + blk_dump_rq_flags(req, "request botched"); > + req->__data_len = blk_rq_cur_bytes(req); > + } > > - /* recalculate the number of segments */ > - blk_recalc_rq_segments(req); > + /* recalculate the number of segments */ > + blk_recalc_rq_segments(req); > + } > > return true; > } > -- Regard's Abdul Haleem IBM Linux Technology Centre