From patchwork Wed Oct 5 21:39:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shaohua Li X-Patchwork-Id: 9363441 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A4FDF607D6 for ; Wed, 5 Oct 2016 21:39:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 960AD28608 for ; Wed, 5 Oct 2016 21:39:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8ACFC28D05; Wed, 5 Oct 2016 21:39:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2591628608 for ; Wed, 5 Oct 2016 21:39:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753207AbcJEVjv (ORCPT ); Wed, 5 Oct 2016 17:39:51 -0400 Received: from mail.kernel.org ([198.145.29.136]:45978 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753030AbcJEVju (ORCPT ); Wed, 5 Oct 2016 17:39:50 -0400 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A7FA520340; Wed, 5 Oct 2016 21:39:48 +0000 (UTC) Received: from kernel.org (unknown [199.201.64.2]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5E19520260; Wed, 5 Oct 2016 21:39:47 +0000 (UTC) Date: Wed, 5 Oct 2016 14:39:45 -0700 From: Shaohua Li To: Sitsofe Wheeler Cc: Jens Axboe , linux-raid@vger.kernel.org, linux-block@vger.kernel.org, "linux-kernel@vger.kernel.org" Subject: Re: kernel BUG at block/bio.c:1785 while trying to issue a discard to LVM on RAID1 md Message-ID: <20161005213945.GA84123@kernel.org> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Wed, Oct 05, 2016 at 10:31:11PM +0100, Sitsofe Wheeler wrote: > On 3 October 2016 at 17:47, Sitsofe Wheeler wrote: > > > > While trying to do a discard (via blkdiscard --length 1048576 > > /dev/) to an LVM device atop a two disk md RAID1 the > > following oops was generated: > > > > [ 103.306243] md: resync of RAID array md127 > > [ 103.306246] md: minimum _guaranteed_ speed: 1000 KB/sec/disk. > > [ 103.306248] md: using maximum available idle IO bandwidth (but not > > more than 200000 KB/sec) for resync. > > [ 103.306251] md: using 128k window, over a total of 244194432k. > > [ 103.308158] ------------[ cut here ]------------ > > [ 103.308205] kernel BUG at block/bio.c:1785! > > This still seems to be here but slightly modified with a 4.8.0 kernel: Does this fix the issue? Looks there is IO error --- To unsubscribe from this list: send the line "unsubscribe linux-block" 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/drivers/md/raid1.c b/drivers/md/raid1.c index 21dc00e..349eb11 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -2196,7 +2196,6 @@ static int narrow_write_error(struct r1bio *r1_bio, int i) wbio = bio_clone_mddev(r1_bio->master_bio, GFP_NOIO, mddev); } - bio_set_op_attrs(wbio, REQ_OP_WRITE, 0); wbio->bi_iter.bi_sector = r1_bio->sector; wbio->bi_iter.bi_size = r1_bio->sectors << 9;