Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934256AbcJZXip (ORCPT ); Wed, 26 Oct 2016 19:38:45 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:37779 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932887AbcJZXil (ORCPT ); Wed, 26 Oct 2016 19:38:41 -0400 Date: Wed, 26 Oct 2016 19:38:08 -0400 From: Chris Mason To: Jens Axboe CC: Linus Torvalds , Dave Jones , Andy Lutomirski , "Andy Lutomirski" , Al Viro , Josef Bacik , David Sterba , linux-btrfs , Linux Kernel , Dave Chinner Subject: Re: bio linked list corruption. Message-ID: <20161026233808.GC15247@clm-mbp.thefacebook.com> Mail-Followup-To: Chris Mason , Jens Axboe , Linus Torvalds , Dave Jones , Andy Lutomirski , Andy Lutomirski , Al Viro , Josef Bacik , David Sterba , linux-btrfs , Linux Kernel , Dave Chinner References: <488f9edc-6a1c-2c68-0d33-d3aa32ece9a4@fb.com> <20161026224025.mou27kki4bslftli@codemonkey.org.uk> <2bdc068d-afd5-7a78-f334-26970c91aaca@fb.com> <203e0319-bc9b-245c-e162-709267540d22@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Content-Disposition: inline In-Reply-To: <203e0319-bc9b-245c-e162-709267540d22@fb.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [2620:10d:c091:180::1:5709] X-ClientProxiedBy: DB6PR0701CA0027.eurprd07.prod.outlook.com (10.168.7.165) To BN6PR15MB1233.namprd15.prod.outlook.com (10.172.206.7) X-MS-Office365-Filtering-Correlation-Id: 5cfb02b3-f51c-4b5c-cca1-08d3fdf92f39 X-Microsoft-Exchange-Diagnostics: 1;BN6PR15MB1233;2:Ttx6PvjuBec5REc4gnrqpudLkGwk7CxDErXfG2GUYEI5y+ox50175kxzjvM5DW5hssLniePO2cubR+4TGLt18ToAJByppmH08dsNHq+PSGkwr08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/W/IlCdwZlSuz/yu7H0rIHp8= X-Microsoft-Exchange-Diagnostics: 1;BN6PR15MB1233;31:RK6shq9ACbWH/jWkXXV0dmTs5W96wgHtLWYCIV9qns92QqzACIWh+DBOVFnWk0Ly42zzK5uJXidsO+h0cfvGplqB4QXBgasSBBZl3IMvdrDi9siWXg1USy1eCsg3K4R3RPLYpOgs74t06TxIWTafL/QpWCGs0s4m8oO9Ilx26Au3tTm52brmtYij9ZGObDSnYwvTpDfZe61/nWIO3Dab65fTPf2RXVa69tEsb18XaMUSiFiIIqBS8PPR31PdD7j/;20:Ig1acGaGKk4+p7m8IJJdsRwjJO/KbLeT5/nz+4YQbNL9Y4G2bdi+u3XWKt3+gClWIX6oogNK7PRlS85955S0ebRdez2T0SHgtJGrVQr5cTD74Jv/TvkRuBchmP+1fdziW3BF7YMsLH9F+eT5RWM8mC4oKlUuBHtLY5AJox/zrPM=;4:1DrEFSoqHZMeM1RqUKqwltWYaOLGCyvVjD3Gq2n+8ie5UL9K7kiFFWck7ikqEUgZzxowbAHIesx4R59Q9kKfdBtFXO9jVtWOmdME/KXWkWuhloz0qgEIWt1zLI/oMOU/lIKJqiKWjhtELKUR892OH4dmmSGRPsMhXfAt35dszg8Q2a3zmYh1i858WnxhikIHFyHktpIbNJvZU+0lqqDv/wbfsLP2CoUGl7UGZVWwwVPFkKSMvgaOtUVK9+cQc6OfVMy1P6YiiB4ioL4xQ8nVsySiDPjqtKIHeIfWaCleASnMWvLNZVxyytIDHfIsaGkr3kYcWx+rrg4gdYBQlfEaCQePW5uPAtbKMo0JsHM2yoTAAtPadcvFOOGh01fqwtKrUc+68f8nmdakSztrmMfIadJqz5uVwZJPuoBK8oJ7wyu7/mgQRxZl4xx5uKOwJ/E8 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(67672495146484); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046);SRVR:BN6PR15MB1233;BCL:0;PCL:0;RULEID:;SRVR:BN6PR15MB1233; X-Forefront-PRVS: 0107098B6C X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(7916002)(24454002)(199003)(189002)(377454003)(305945005)(7846002)(4001350100001)(69596002)(6636002)(6666003)(101416001)(50466002)(3480700004)(54356999)(47776003)(76176999)(7736002)(68736007)(19580405001)(97736004)(50986999)(19580395003)(2950100002)(23726003)(189998001)(92566002)(6116002)(77096005)(1076002)(586003)(105586002)(83506001)(42186005)(2906002)(9686002)(4326007)(53416004)(5660300001)(86362001)(93886004)(81156014)(33656002)(8676002)(81166006)(110136003)(106356001)(18370500001)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:BN6PR15MB1233;H:clm-mbp.thefacebook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN6PR15MB1233;23:E55u/FUS+vPDezTIgYwN+zij4a1ov8k45fvbkMuJe?= =?us-ascii?Q?KyeXTCsUd0NSVftAYbh5Fa00g1ST7zm4vb7u+RwIB/ta59AMpmbCL4wFTskZ?= =?us-ascii?Q?nc63DI43TEIi9xd+GLpZe2RIodmuoMLsK71BzBytLmQ7+0pNP1pltrtAfSD0?= =?us-ascii?Q?HhTd+XlBTN5zODNDXuf2JmLqD9f7x2sGDfZrk8UediZdwg+L2JqJxZZjlX90?= =?us-ascii?Q?QUhSVt2CzZVz/ZqqWgfGcy8C3Eu/rN6+RXL75YVHbbruBibB4ORYk1aW8CCn?= =?us-ascii?Q?tjKjUcLqM6QHV9bBWtDdTrQ3mPvMTdNyRPAg6EtYs4DTbn4qqRb54fTouDSj?= =?us-ascii?Q?uSeAX+jNMmAfzn5eu6SOGgc3nociu09z+CMPh4Jug/UOH4ANhHVshQKOyamE?= =?us-ascii?Q?s6Y9wrK9XGmDkNY7HusZfPzO6bFYNAKNceCos3lFuLJ3pH7UHtDEJIyetnri?= =?us-ascii?Q?F4beq0CF3UaTQopJ4h9Orght209/OLHQE78Lh+ZeiiebpOze9vo6DJ+ncWqd?= =?us-ascii?Q?MUlAHDhdag7nzjKmajYqhJO/WsFV13brSUDa7299yOdzogn6CdylGxlJ/ovi?= =?us-ascii?Q?KwIqm5C7LforiSkMc108W+s6aZu+7TVrbSKd7hdYD4Y2o7ckxatxn1Cv2H5x?= =?us-ascii?Q?e/gfFRdVxHmxSqcDccy8epNXoxCoxD6BqYXdBrkx1i17qd0810hutaZlvGvZ?= =?us-ascii?Q?II0wkgzZWlQPhjd+Wg56J2gSxym1LcJUDYdghjSrQAux74wnsemXrAiGU3DH?= =?us-ascii?Q?5iib4OuMphU7ogVmp9I2K6IqYSJkIvRAgfngmm3DcNzTEIMGHqU62w4R9ORw?= =?us-ascii?Q?+bis1/mqiuB3hDHZ3QL19LvEf7D0WhPJkWGaRZmbQpM3DfBAESijVoZbHAJr?= =?us-ascii?Q?TmYT8myqOsfmdB38MH1Ofmq6bNngd/nAdcoW7TRaU5TVgtDBve7dRv2cXUU3?= =?us-ascii?Q?oq3Y53kBMxgPvFm4nFnQ9dkvOhcSgr9HWZvbJS73LYW/Gam+eDHIzgZv9cWY?= =?us-ascii?Q?nJRqgstjoGe8qQiigyv+I0Sjd+KIhTIFKEFbMdEsrPxApV32AzGg45CWS8PO?= =?us-ascii?Q?6r/V3o5STBajxDoxwjVE+4+jWv3D5FT3GVwcOfhJ/LHeVxM8FK3d6pf9Du+X?= =?us-ascii?Q?JcgA4n9PFapihec0eDPC2pO9KN6K1ghnsIRHgsdXYhLH9DaKBHQDQ51YqsNo?= =?us-ascii?Q?G9PAHEUPFsc+mnmOjEwt1WTKaZaBwouqnbotELGQvjFn1K331xaVUAHHMUDQ?= =?us-ascii?Q?jCUiXre6JFjXArTwaRSiCYCgFGnnPVHqRUE3zFX?= X-Microsoft-Exchange-Diagnostics: 1;BN6PR15MB1233;6:3Qo/Q6KaEOxaGqwZlJ2r7cuPcL21votm1C7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5n2Y/fYatjnXOSqqG8KqHYMKE1bL7EGrDbRISsb88yQa9w1YKoy62o41IprOvFXSRScLzTJJSAAD+x03Xcs= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Oct 2016 23:38:21.6507 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR15MB1233 X-OriginatorOrg: fb.com X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-10-26_15:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1390 Lines: 40 On Wed, Oct 26, 2016 at 05:20:01PM -0600, Jens Axboe wrote: >On 10/26/2016 05:08 PM, Linus Torvalds wrote: >>On Wed, Oct 26, 2016 at 4:03 PM, Jens Axboe wrote: >>> >>>Actually, I think I see what might trigger it. You are on nvme, iirc, >>>and that has a deep queue. >> >>Yes. I have long since moved on from slow disks, so all my systems are >>not just flash, but m.2 nvme ssd's. >> >>So at least that could explain why Dave sees it at bootup but I don't. > >Yep, you'd never sleep during normal boot. The original patch had a >problem, though... This one should be better. Too many 'data's, we'll >still need to assign ctx/hctx, we should just use the current ones, not >the original ones. > >diff --git a/block/blk-mq.c b/block/blk-mq.c >index ddc2eed64771..e56fec187ba6 100644 >--- a/block/blk-mq.c >+++ b/block/blk-mq.c >@@ -1217,9 +1224,9 @@ static struct request *blk_mq_map_request(struct >request_queue *q, > blk_mq_set_alloc_data(&alloc_data, q, 0, ctx, hctx); > rq = __blk_mq_alloc_request(&alloc_data, op, op_flags); > >- hctx->queued++; >- data->hctx = hctx; >- data->ctx = ctx; >+ data->hctx = alloc_data.hctx; >+ data->ctx = alloc_data.ctx; >+ data->hctx->queued++; > return rq; > } This made it through an entire dbench 2048 run on btrfs. My script has it running in a loop, but this is farther than I've gotten before. Looking great so far. -chris