Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp3641431ioo; Mon, 30 May 2022 06:38:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQJ2LnThuuSHkriBU9dhnQdHOUmDqoF62KS+Z3qHhvBPYHYcf/NTCjY5vOLB4ahpVd/908 X-Received: by 2002:a17:906:b0c5:b0:6f3:bb5e:54a8 with SMTP id bk5-20020a170906b0c500b006f3bb5e54a8mr50718260ejb.534.1653917903657; Mon, 30 May 2022 06:38:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653917903; cv=none; d=google.com; s=arc-20160816; b=ECPfcnDR7cEBdg8HQi9WYaA/+5VkzqWnVaWSN/G4xJkdJdGflhHj68FkrKKnFY6NET og3FTEWNmoCz3b0LpSkPWHLD4YR6AabbQq86kVCEGe2t1ZRcBKgY2o6517zJSw+mAFii za8TZgRFSZw0oZmYsItSrBBv+jH8Uxs2ofjc13N1n346vdc2WBJ4lDQnWKdWKXY6m7ux TVHp38VgPbpCdiOZCGI0qcXb1pOSSDPjvgDAcExtcna9l/hPrrkB3oLG/Ibvo2WR3hti SiU1Vfv94ecYbonyrjNxAYq0NIcoBT/wMS6yHwxqppj2dszAsMBJw4t5tf6WuCAnnD4e Ma5A== 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=gALyP/CMA6emj8d/vZKE9o5rrBEKx+kILp+mMDTKqmQ=; b=TbfKv17Q8OxKZG1b8rliFRJJtuau2heaVTWPC3bftoxIZMsHLjSY2F8RqDSLRWt5qv 5fJ5uTaMBOkNAH6ah8o+mvQeHbW+I/ubFGwOlqk1ebNbvWXT3bBt4iRNti6fW54M1unw VuewMNoOucdLredi2gI9dljAsQVrGxP25ELfI+VouNKkzXz+3LULldJDhuF8uuPMmdXz jz0EfHQkgj/9ah5CRVYZiziGMmkJAbunuV4q45wc5AcToBUh6uUcameoxmG9vE05Gq4l LUNjOrq0rr/YZ1WDphAQizs+kDJY3O0KJmk6tWt1cAkEbOG7H8IOKwOeFYwM+YCmjOuF qlPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=IUrcmREB; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dd17-20020a1709069b9100b006fef357e1c0si13296413ejc.119.2022.05.30.06.37.57; Mon, 30 May 2022 06:38:23 -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=@infradead.org header.s=bombadil.20210309 header.b=IUrcmREB; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232411AbiE3GCM (ORCPT + 99 others); Mon, 30 May 2022 02:02:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232689AbiE3GCD (ORCPT ); Mon, 30 May 2022 02:02:03 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C45891117A; Sun, 29 May 2022 23:02:00 -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=gALyP/CMA6emj8d/vZKE9o5rrBEKx+kILp+mMDTKqmQ=; b=IUrcmREBTTE/w8QfgnZ/hEOkOT 18B5s3XuAXNJYul7S8WaoOxQVEcnygbbwAciZL8LKbZs9slKqIKjzVeV9JHtVyfMmeDmaU2cet53w OHf0+P0GOp1akbb82wSR1nJRnKSmrEeGE+I5/CL9qjUgCQh+K+RCs+w46/1y9Z6onAUo82TBp06Dd Vti72+i0wgol2U47RMaKXkWq6GC/zl60eIYxaUm+U9ae9ZNkOtTH6a1kHCfhb9ob3HlnK1/Lk01BQ YeA8Lp7WrpJjuDYFBQoJAxzRpH4v1nBT/JS/PKuZvJZ87MM1dLXZQ6v6p6rICE55DIBunpVY4rHD7 1hprkNhw==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvYTX-005Ude-OH; Mon, 30 May 2022 06:02:00 +0000 Date: Sun, 29 May 2022 23:01:59 -0700 From: Christoph Hellwig To: Logan Gunthorpe Cc: linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, Song Liu , Christoph Hellwig , Donald Buczek , Guoqing Jiang , Xiao Ni , Stephen Bates , Martin Oliveira , David Sloan Subject: Re: [PATCH v2 15/17] md: Use enum for overloaded magic numbers used by mddev->curr_resync Message-ID: References: <20220526163604.32736-1-logang@deltatee.com> <20220526163604.32736-16-logang@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220526163604.32736-16-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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham 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 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? Reviewed-by: Christoph Hellwig