From mboxrd@z Thu Jan 1 00:00:00 1970 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 317A1C433EF for ; Thu, 21 Apr 2022 06:07:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1384645AbiDUGKk (ORCPT ); Thu, 21 Apr 2022 02:10:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1384641AbiDUGKk (ORCPT ); Thu, 21 Apr 2022 02:10:40 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 436B010FE9; Wed, 20 Apr 2022 23:07:51 -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=jZM9msgDNeu7xI9NF/7peTFnK08gLMscQ4rYMQqGU2E=; b=nMkLeWmhfjkXKoni4Un4Mgw65Y PuRJLMdtiHJOV8lHmucaN5dQAqpvMlAkBKfObYoJbXRkV5cGiIW2OfUW+Mjl4F7vFGbijA9wLa2Ib RB6GGNoCBxpqVlWKQYaHumsW+0BbJUjEma05bxNjuPt9ZSRVF/aKCuxBGMAG2uU+9JMZFkGT1KDd4 gZNh2o1jMzxkayTHxp/w6gDANWDp469mrMjwgLgd/VovQXOhziczigxlfHnHiJwgiNsJQiUwg28h9 yv2iyhlad4GRwDgK4SL/noRlH+de37OLhfEpL//V6ic8cHniuQbO0ta4taELLZv5hb2tM9X9ls3ZH yZPnKfQQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhPym-00BdJE-UV; Thu, 21 Apr 2022 06:07:48 +0000 Date: Wed, 20 Apr 2022 23:07:48 -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 , Christoph Hellwig Subject: Re: [PATCH v2 01/12] md/raid5: Factor out ahead_of_reshape() function Message-ID: References: <20220420195425.34911-1-logang@deltatee.com> <20220420195425.34911-2-logang@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220420195425.34911-2-logang@deltatee.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-raid@vger.kernel.org On Wed, Apr 20, 2022 at 01:54:14PM -0600, Logan Gunthorpe wrote: > +static bool ahead_of_reshape(struct mddev *mddev, sector_t sector, > + sector_t reshape_sector) > +{ > + if (mddev->reshape_backwards) > + return sector < reshape_sector; > + else > + return sector >= reshape_sector; > +} No real eed for the else here. Otherwise looks good: Reviewed-by: Christoph Hellwig