Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp497339imm; Mon, 2 Jul 2018 15:51:39 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcvZEVMvnvUuJ566oZ+HhlSXZA75/O4m+wYWmLSz3s0mRJDq0QcWvXnQ38XZ+/XNKBO4r1w X-Received: by 2002:a62:df82:: with SMTP id d2-v6mr26340186pfl.189.1530571899444; Mon, 02 Jul 2018 15:51:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530571899; cv=none; d=google.com; s=arc-20160816; b=hlxLPbnaacKDUaWzwXTVLBjiwTwWED4xjhkcBVXnDJuNtRshYSc/O453BjuNm2lfNO 6coZqsbNZFYgj9b+0rWagWIhMa4oJ2WNDGpyrCFGHSa5SaD7gly3QmvaZ/bUl/JpCMFZ LCiRVJF8rYh0APa0pgHCrXuUzwY12ZnZTQmZNgUmVQ36g7Wr14jTylhvD0tmKdCCjziv LQjHSqaohisSGL1tPRUY9gAf85EyN30ATuyo+TvkOgZzuEyZ5S7p0x7605p8BfAnTx8w HgywZdm++ycQqMoqgXLwCM4wQpeSS8uU8+lHlnJqSgAya/qUqJ0GA0qMG/YZyzGuv8e5 nFJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=thdfvkBfO0rndQtMZvWQlDX9PB2B4/kCovVJ9Pb0B44=; b=eUc+mYLV9QePei9sXsEWqmeADy0y89Q7hW7r4Uw84m5TfKpUgSyirJTv+8+r19r7pd hFnHjarZZ81buyaSyYHhqk54Mg4lGmA4XOVDU8s2j1cIcA7wkoOKMzgxJgH/Vi5D+mGv v/xrYGiHtdmd6TDkUAY6FEzsETFMpOS7HsZ39sHxDx+0N1h+dxJqXjZVcwX3JYJcGWI3 1fX8sEK8Cl+P1MXeB5ntLgr8in5gjx7XNoWuFH8bAeLwqzRrhgHcwOKtc7dm0MbqLuuw yBKP0r17IkoiZ+c72pC5Z4iYzL2lKHTw2IT3cAtduXTeQgzjy3T/LfHWDftT38Gdmi/z wEJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@thunk.org header.s=ef5046eb header.b=DdKCYJdR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v10-v6si15481611pgo.643.2018.07.02.15.51.24; Mon, 02 Jul 2018 15:51:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@thunk.org header.s=ef5046eb header.b=DdKCYJdR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932236AbeGBWus (ORCPT + 99 others); Mon, 2 Jul 2018 18:50:48 -0400 Received: from imap.thunk.org ([74.207.234.97]:52294 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753491AbeGBWuq (ORCPT ); Mon, 2 Jul 2018 18:50:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=thunk.org; s=ef5046eb; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=thdfvkBfO0rndQtMZvWQlDX9PB2B4/kCovVJ9Pb0B44=; b=DdKCYJdRz17SEO17zKJxquzSt8 3MiMp2RIAnektLnbS34Pusv2enCkuJZDTHT9RJ88iTvp7+ZZwRsMQqS3WRohEkZLxTPzJDQ+mZx+u 2iQb2FdwTYZbttIooEveIhvoLg4nWCiLho1h6Cz/aZEeatw5RcZI57kMquNYNos84+LM=; Received: from root (helo=callcc.thunk.org) by imap.thunk.org with local-esmtp (Exim 4.89) (envelope-from ) id 1fa7ed-0007EY-Lx; Mon, 02 Jul 2018 22:50:43 +0000 Received: by callcc.thunk.org (Postfix, from userid 15806) id DA6097A015F; Mon, 2 Jul 2018 18:50:42 -0400 (EDT) Date: Mon, 2 Jul 2018 18:50:42 -0400 From: "Theodore Y. Ts'o" To: Jon Derrick Cc: linux-ext4@vger.kernel.org, Andreas Dilger , linux-kernel@vger.kernel.org Subject: Re: [PATCH] ext4: Check superblock mapped prior to committing Message-ID: <20180702225042.GF30481@thunk.org> Mail-Followup-To: "Theodore Y. Ts'o" , Jon Derrick , linux-ext4@vger.kernel.org, Andreas Dilger , linux-kernel@vger.kernel.org References: <1530300995-25583-1-git-send-email-jonathan.derrick@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1530300995-25583-1-git-send-email-jonathan.derrick@intel.com> User-Agent: Mutt/1.10.0 (2018-05-17) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 29, 2018 at 01:36:35PM -0600, Jon Derrick wrote: > This patch attempts to close a hole leading to a BUG seen with hot > removals during writes [1]. > > A block device (NVME namespace in this test case) is formatted to EXT4 > without partitions. It's mounted and write I/O is run to a file, then > the device is hot removed from the slot. The superblock attempts to be > written to the drive which is no longer present. > > The typical chain of events leading to the BUG: > ext4_commit_super() > __sync_dirty_buffer() > submit_bh() > submit_bh_wbc() > BUG_ON(!buffer_mapped(bh)); > > This fix checks for the superblock's buffer head being mapped prior to > syncing. > > [1] https://www.spinics.net/lists/linux-ext4/msg56527.html > > Signed-off-by: Jon Derrick Thanks, applied. - Ted