Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp324303imm; Fri, 6 Jul 2018 21:11:19 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeYWqjTFJuHKA+YZ7kj19WtnA1tIHAmpSZ2URin0lxs5QqmTCLpgfC6+vZ/ekAUMRTd9KYs X-Received: by 2002:a17:902:a24:: with SMTP id 33-v6mr12523577plo.88.1530936679518; Fri, 06 Jul 2018 21:11:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530936679; cv=none; d=google.com; s=arc-20160816; b=sYCG27axEC4kS3ghjjm5Ch+mUdQMXSqEna57xaqLbe5Id64xJ3NunNb+PmJBU3YIWe ggBM8ju4zIlsvndjeZDORo5Q5ASqYBd5ORngNTJ3tHj1/vE0VPjpx6ILkOgmK2snkd5j 8+OUMn19FaoTCLXJp0ysV3X+YUUrLJZd2vxIUI4JLIhmbCKkhafo5z8XUqq8oU1JbVXw mRzHwqSp3SF4cQo2VSh1raC3gClTqoXRhltVF85zmTUsWOwM6BbGv3CEiOgK/p7txVQl CAZHyMP6blvY/PtzErx2F+5Y1V+zAtSP0HQBdBy0PF1E69DRjwZvvMhbUIpfYW3wX09G 0aPw== 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=0g7Fg8uw/4lQG/plZHQOvd5U5LHioe+tUj11+r4r0WY=; b=PWt8oP8h0C9W4hujINQ4+rcuXBPKaFtyA930BAKWi/IpZuVDsjFS0kkrtHdEnn+jJt DN4iKJ8G4TvMdEAq0OmVeHEsdHXAL5h0YLjdqTCQmbhHl06MmY7pM7aKVF5WqU/zoao8 r7Pb44pcpsMEhEDGXel00Q+ptuYwtcSaqKK6v4Kd98zN/83PbYC7zsUn8t+tduooxGNl GZ/qVJUXxBG/KxSGfmIzjPElcDOyAVYD8ZJTriGo661o+PN8PbmpGPiLOjUG+PpOdcYi VCKkYR9cZayu/TlZhnOUm/DuakUC9fnVxH1tcIcXBj+Bo/CAPlR1NWCaSxGG7FVJCe78 Uhhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@thunk.org header.s=ef5046eb header.b=pjHJWmAG; 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 z28-v6si6732921pfa.161.2018.07.06.21.11.04; Fri, 06 Jul 2018 21:11:19 -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=pjHJWmAG; 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 S1750861AbeGGEK0 (ORCPT + 99 others); Sat, 7 Jul 2018 00:10:26 -0400 Received: from imap.thunk.org ([74.207.234.97]:42160 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750718AbeGGEKZ (ORCPT ); Sat, 7 Jul 2018 00:10:25 -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=0g7Fg8uw/4lQG/plZHQOvd5U5LHioe+tUj11+r4r0WY=; b=pjHJWmAGT6VxhdTpDT4iULPXoe oy1+cOgGp7oykzf0MP6BngqbCz52VyZhSRyWrptl7X2jh77RTcVQRIeOcHcpv7AwkHZhvOdnBLvhY 4oShEKyx/3isFlTdBRhzq/cPMDU9Zbo/D9TMrbxdFgoZbLz4QUnYcCP4Edky2oJp1aDs=; Received: from root (helo=callcc.thunk.org) by imap.thunk.org with local-esmtp (Exim 4.89) (envelope-from ) id 1fbeY7-00065V-PE; Sat, 07 Jul 2018 04:10:19 +0000 Received: by callcc.thunk.org (Postfix, from userid 15806) id 8BBCE7A552B; Sat, 7 Jul 2018 00:10:18 -0400 (EDT) Date: Sat, 7 Jul 2018 00:10:18 -0400 From: "Theodore Y. Ts'o" To: dann frazier Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, yanaijie@huawei.com, colin.king@canonical.com, kamal.mostafa@canonical.com, ike.pan@canonical.com Subject: Re: [Bisect] ext4_validate_inode_bitmap:98: comm stress-ng: Corrupt inode bitmap Message-ID: <20180707041018.GB3546@thunk.org> Mail-Followup-To: "Theodore Y. Ts'o" , dann frazier , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, yanaijie@huawei.com, colin.king@canonical.com, kamal.mostafa@canonical.com, ike.pan@canonical.com References: <20180706174324.GA3049@xps13.dannf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180706174324.GA3049@xps13.dannf> 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, Jul 06, 2018 at 11:43:24AM -0600, dann frazier wrote: > Hi, > We're seeing a regression triggered by the stress-ng[*] "chdir" test > that I've bisected to: > > 044e6e3d74a3 ext4: don't update checksum of new initialized bitmaps > > So far we've only seen failures on servers based on HiSilicon's family > of ARM64 SoCs (D05/Hi1616 SoC, D06/Hi1620 SoC). On these systems it is > very reproducible. Thanks for the report. Can you verify whether or not this patch fixes things for you? - Ted diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index da6c10c1e37a..1cfb74bc4dca 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c @@ -90,6 +90,8 @@ static int ext4_validate_inode_bitmap(struct super_block *sb, return -EFSCORRUPTED; ext4_lock_group(sb, block_group); + if (buffer_verified(bh)) + goto verified; blk = ext4_inode_bitmap(sb, desc); if (!ext4_inode_bitmap_csum_verify(sb, block_group, desc, bh, EXT4_INODES_PER_GROUP(sb) / 8)) { @@ -101,6 +103,7 @@ static int ext4_validate_inode_bitmap(struct super_block *sb, return -EFSBADCRC; } set_buffer_verified(bh); +verified: ext4_unlock_group(sb, block_group); return 0; }