From patchwork Wed Jul 27 21:05:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Logan Gunthorpe X-Patchwork-Id: 12930819 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7190C3F6B0 for ; Wed, 27 Jul 2022 21:08:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236003AbiG0VIt (ORCPT ); Wed, 27 Jul 2022 17:08:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236522AbiG0VIa (ORCPT ); Wed, 27 Jul 2022 17:08:30 -0400 Received: from ale.deltatee.com (ale.deltatee.com [204.191.154.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68DCB61B0E; Wed, 27 Jul 2022 14:06:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=deltatee.com; s=20200525; h=Subject:MIME-Version:Message-Id:Date:Cc:To:From :references:content-disposition:in-reply-to; bh=pbiuIq9jtjkddiglS5lYviW8nD5Vw/eI1dLbTz+VrxU=; b=LbKb5LqYGKVbOT8Nx2rV/kfSpI h50N439y/MEYnB/m9W4ZOEXAmoS4HFGi0CJY6hmF8CmcO+3bR+n7YA+Qq8gI94Tt9Ey3OIwSfa33a ctglrElWde7QZvkuuCc7ogCTP9FLFvTXFHzIx6aJUGo0BMxpzDhaa/QxCMjNZUTYtqksbltEY4PiH vhmw1VUAr3t5RRkrwjNN72+0o2KfKlCv4iVgW34Wv+V12kL7l6y+F+ohwnCvuf+biQqvXOnVP5gZp BkJu5Ti29gyrEfDFH2psv0ZS1lvmmtjFTRO+wKzB+K5olbph9sZaUFeLa2A3ia6p2gnjVteqj2hib EHv54lzg==; Received: from cgy1-donard.priv.deltatee.com ([172.16.1.31]) by ale.deltatee.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oGoEG-001pyC-GI; Wed, 27 Jul 2022 15:06:05 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.94.2) (envelope-from ) id 1oGoEE-000VHv-II; Wed, 27 Jul 2022 15:06:02 -0600 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, Song Liu Cc: Christoph Hellwig , Guoqing Jiang , Stephen Bates , Martin Oliveira , David Sloan , Logan Gunthorpe Date: Wed, 27 Jul 2022 15:05:55 -0600 Message-Id: <20220727210600.120221-1-logang@deltatee.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 172.16.1.31 X-SA-Exim-Rcpt-To: linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, song@kernel.org, hch@infradead.org, guoqing.jiang@linux.dev, sbates@raithlin.com, Martin.Oliveira@eideticom.com, David.Sloan@eideticom.com, logang@deltatee.com X-SA-Exim-Mail-From: gunthorp@deltatee.com Subject: [PATCH 0/5] Bug fix for recent batching change X-SA-Exim-Version: 4.2.1 (built Sat, 13 Feb 2021 17:57:42 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Precedence: bulk List-ID: X-Mailing-List: linux-raid@vger.kernel.org Hey, We hit another bug on my recent batching patch. In this case the bug has never been hit with the current md/md-next branch but some other patches we were working on changed the timing such that we hit this bug. It is theoretically possible to hit in the md/md-next batch so this patchset contains a fix. The fix is the last commit. The first four commits are some basic refactoring that makes the final commit a bit easier. A git repo is here and is based on current md/md-next (7a6f9e9cf1): https://github.com/sbates130272/linux-p2pmem raid5_batch_quiesce Thanks, Logan --- Logan Gunthorpe (5): md/raid5: Refactor raid5_get_active_stripe() md/raid5: Make is_inactive_blocked() helper md/raid5: Drop unnecessary call to r5c_check_stripe_cache_usage() md/raid5: Move stripe_request_ctx up md/raid5: Ensure batch_last is released before sleeping for quiesce drivers/md/raid5.c | 162 ++++++++++++++++++++++++++++----------------- drivers/md/raid5.h | 2 +- 2 files changed, 101 insertions(+), 63 deletions(-) base-commit: 7a6f9e9cf1befa0a1578501966d3c9b0cae46727 -- 2.30.2