Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp894912pxb; Fri, 22 Apr 2022 13:40:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzjcaBj6QIIVMy2a2MnvWtOK1yIvGKGmUv3goKt4r9T/+jyRFMo0XwVfBLvV7JdUkuDDAK X-Received: by 2002:a17:902:6bc9:b0:158:a0d3:d080 with SMTP id m9-20020a1709026bc900b00158a0d3d080mr6474856plt.24.1650660009373; Fri, 22 Apr 2022 13:40:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650660009; cv=none; d=google.com; s=arc-20160816; b=un3xCTKW/WHdTfuyVQvBgkH37TDHqPPGsuxQpqMadCzsS7ZMfrW9DzDmXx6woPfghx EqrMxax15k1yA4D4zxFHy1+cfzlpSPGKYlcNN+rB43b5sdkqx0trkNuKy5Fbj+go3sUa yRAotqyQ3iEAS8For+TJRZF5zgRG3ruQll6NTEAZbHkAnEh9uo4c1VchJl519H1PVsJ1 Ni6oTSi7CrNnxStHHG4cFN9wt/YmOd8s0gpBr2NUbpxorI0wDgBCUosWAdCW/3BaHbIu 0RLneN+fjny3GLjD/zMkdq4qBQDBg1ExbJEslHWMXgeX3GWGKlSfW41F6i+A+UJrQ+Pq mWEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=LJdfKH17SuEaJzlyMwbOL6nCjZoX11A6xpvP5YZSpq8=; b=Eu/LMqgPbcTJ9FbjO3JMF4COc3B8T0pryiv2nspEm84mU9Lo1B+UEHBwOw9RjWeNW0 WJ1W8lTyAwZLY6eUlu3HMFFUiYWa1oQMrBVh3WfxeA/qumJ2UWt+23nVwolxnc7DckrM 5Bb8KB1otn3/QZgXQJVmJNmOSZF4VTepn5LnwBl5PHiD6nKwhgEFaaYZjDL8DpsLpGGG +xUwOkEoa9vZp7arvhYAk6SQ0HCMFpkZOdKHKen43hzDT/JvEt2LerS5lKSjNG87BS7C OTDe4Aa+4p15QrXq5yicItr+N1sixiECAmKfU2dPMK1asxUl8lTwZyBw38XrGSjNJvXD Rx+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=QaBr4Cmh; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id j18-20020a170902da9200b0015827ec0073si10023771plx.452.2022.04.22.13.40.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 13:40:09 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=QaBr4Cmh; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2302918806D; Fri, 22 Apr 2022 12:25:35 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1384714AbiDUGTq (ORCPT + 99 others); Thu, 21 Apr 2022 02:19:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381512AbiDUGTm (ORCPT ); Thu, 21 Apr 2022 02:19:42 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A77813DC6; Wed, 20 Apr 2022 23:16:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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; bh=LJdfKH17SuEaJzlyMwbOL6nCjZoX11A6xpvP5YZSpq8=; b=QaBr4CmhpNuFzZ1LLNkoRnRUEN FCCoag2DYMAoQG0INxffncotG+uufY3iZblojfrjUG/2ufmv5rnq+Sr2LU3E1Ys4h5Yj0BdXxAmg/ UZEjP1RASx5eVhq7J4IT/YgtMtbUnAT+cnOxtIOInXXY+TvBIgye8LDwiJGCLVwrorwdgaG63ilm1 p4oBM3w19n+lbL61HLjX5AqfTsF9QT/6QmABRdwejtgPQVZpKCTwdgzCLYfdWAw2Nhmrl+cnZsdmb fl8Wl8jmIShKxZF03f80fxwoOxh0iFwiEziETkfUfbEnoGHp/LuL889O3ujZbVIAeiJXdJR0ncz4I 7VlRMLfA==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhQ7Y-00BesJ-PB; Thu, 21 Apr 2022 06:16:52 +0000 Date: Wed, 20 Apr 2022 23:16:52 -0700 From: Christoph Hellwig To: Logan Gunthorpe Cc: linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, Song Liu , Christoph Hellwig , Guoqing Jiang , Stephen Bates , Martin Oliveira , David Sloan Subject: Re: [PATCH v2 08/12] md/raid5: Refactor for loop in raid5_make_request() into while loop Message-ID: References: <20220420195425.34911-1-logang@deltatee.com> <20220420195425.34911-9-logang@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220420195425.34911-9-logang@deltatee.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 20, 2022 at 01:54:21PM -0600, Logan Gunthorpe wrote: > prepare_to_wait(&conf->wait_for_overlap, &w, TASK_UNINTERRUPTIBLE); > - for (; logical_sector < last_sector; logical_sector += RAID5_STRIPE_SECTORS(conf)) { > - retry: > + while (logical_sector < last_sector) { > res = make_stripe_request(mddev, conf, &ctx, logical_sector, > bi); > if (res == STRIPE_FAIL) { > break; > } else if (res == STRIPE_RETRY) { > - goto retry; > + continue; > } else if (res == STRIPE_SCHEDULE_AND_RETRY) { > schedule(); > prepare_to_wait(&conf->wait_for_overlap, &w, > TASK_UNINTERRUPTIBLE); > - goto retry; > + continue; > } All the else statements here aren't needed (this is really a comment for the earlier patch adding them). Otherwise looks good: Reviewed-by: Christoph Hellwig