Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5347055ioo; Wed, 1 Jun 2022 03:45:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytij8fcH7TYUTMCj8zEEkcEUmP5kGKIaUe82e6TSsQxB1o2iNKDgkpdWoKqnDbGipHlOU4 X-Received: by 2002:a17:902:9a83:b0:15e:f718:4ced with SMTP id w3-20020a1709029a8300b0015ef7184cedmr64159899plp.69.1654080353752; Wed, 01 Jun 2022 03:45:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654080353; cv=none; d=google.com; s=arc-20160816; b=iYAKhXHpCrcfFsh+Eq+gE2NvUCRcJwDL9XRIs0f36Meg3GIDcpx+29oCNHEamys9T+ 19dQ0mXjYhpVKTl/3V/Yv52MgQOMm5BVLeX2BKUItMT1+Eh0IsJyknF4vwsj0SQjdAHK X6jY9ETIVyPuNNkhsSSjBXXy8iR++AwGQNQli0XX0Of6j5jSgGuVvre50jl101TutHDG sVawh8vgiIVDBOeZcmz0VBPUTwROVL92oX54LmY3UMrP/vYbnzuz7SZ2GvuFn2iM6Lmy wIzkHUDmtA7YnZBJO+Ix8wJ43E/4/KBTY26DMCsQU+Ih2Q4bwiYuapDxFgAQ2PBX1nPY LUfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:in-reply-to :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=lKFjGkfiY5hj8TVOJmM8ePrAfnXREdxwvXu9WgIHH+8=; b=wWeQydRZNo50Mhc3C/eISBFXjReQ4HKLzVjUYQRj5Xr0rg/jLh6StlZ02tsjNArImq rU0e51qVoLELE3pIzAWaeEN8qdWZYWhT+F+NfIr8tdHs5muuQQGTZ5NzYyd+HESS1o6s K9iYLNvGbJ3Unkk9ru5yIcWQfQZvwqVnfQtaUb2T/kUuL/ijpBqV1vjMuCJgFMB+k/a+ KZe5pvX1cdt0+q0hlsLWIhEgzNOKtBIX7ir7V7Brl2daY0/3/T6/LFgnHA1nbSaOeaht Lup41gUrbcW+MoK/yQa0RV75LDdbUaFRQvczR+l0sHqXGu+kmKc8X3QAoUc1vfVNwrdZ 0aTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=LMRmtAAb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=deltatee.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x67-20020a633146000000b003fc88542b01si1803990pgx.208.2022.06.01.03.45.41; Wed, 01 Jun 2022 03:45:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=LMRmtAAb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=deltatee.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242576AbiE3P5P (ORCPT + 99 others); Mon, 30 May 2022 11:57:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231726AbiE3P4x (ORCPT ); Mon, 30 May 2022 11:56:53 -0400 Received: from ale.deltatee.com (ale.deltatee.com [204.191.154.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B34983BF9A; Mon, 30 May 2022 08:43:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=deltatee.com; s=20200525; h=Subject:In-Reply-To:From:References:Cc:To: MIME-Version:Date:Message-ID:content-disposition; bh=lKFjGkfiY5hj8TVOJmM8ePrAfnXREdxwvXu9WgIHH+8=; b=LMRmtAAbxl5vyMFY+WDJQk6iM7 31JS8R6+Bf/KCzns5KZsWVt1Z9U8fQ2PQXoV9kHg20O77HsWgErlwLsGtyUJWlWEOZNoSq2p+plBV VkH0N7WrSGZ4SfGXdk2ak1Feme28gDTlRmVgEnTd9QHRb0yO3M6BPrcHTPk4+3+6mLtTV5sDrEzjD qg4P8GS9TG3fTauVrKO8dkR3klu5WF3JWfe1uHgT4ixp5q/WwrVgcFazSGZ4y9ray+coWtWtsRE/M qRw7Js+J0gTA6Cd8d87alSGclu70XyU3XAqXPEeMvz4s4692eljdzZ44yVT15/SLuwzBLAg7hV4YV dOcc7OtA==; Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1nvhYS-00Bju3-Gx; Mon, 30 May 2022 09:43:41 -0600 Message-ID: Date: Mon, 30 May 2022 09:43:36 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Content-Language: en-CA To: Christoph Hellwig Cc: linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, Song Liu , Donald Buczek , Guoqing Jiang , Xiao Ni , Stephen Bates , Martin Oliveira , David Sloan References: <20220526163604.32736-1-logang@deltatee.com> <20220526163604.32736-16-logang@deltatee.com> From: Logan Gunthorpe In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 172.16.1.162 X-SA-Exim-Rcpt-To: hch@infradead.org, linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, song@kernel.org, buczek@molgen.mpg.de, guoqing.jiang@linux.dev, xni@redhat.com, sbates@raithlin.com, Martin.Oliveira@eideticom.com, David.Sloan@eideticom.com X-SA-Exim-Mail-From: logang@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Subject: Re: [PATCH v2 15/17] md: Use enum for overloaded magic numbers used by mddev->curr_resync 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-kernel@vger.kernel.org On 2022-05-30 00:01, Christoph Hellwig wrote: > On Thu, May 26, 2022 at 10:36:02AM -0600, Logan Gunthorpe wrote: >> Comments in the code document special values used for >> mddev->curr_resync. Make this clearer by using an enum to label these >> values. >> >> The only functional change is a couple places use the wrong comparison >> operator that implied 3 is another special value. They are all >> fixed to imply that 3 or greater is an active resync. > > This already looks good, but shouldn't the curr_resync also be changed > to the new enum type? I thought not, seeing curr_resync actually represents a sector_t except for these handful of special values. Thanks, Logan