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 1BD33C7EE24 for ; Thu, 18 May 2023 06:18:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229889AbjERGSq (ORCPT ); Thu, 18 May 2023 02:18:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229727AbjERGSp (ORCPT ); Thu, 18 May 2023 02:18:45 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B11A819BD; Wed, 17 May 2023 23:18:44 -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=TgRqJzfRjdhSbNWsQSWlFziGwe8zlARO66NTPhJDOmk=; b=J5hHY9glAWseO82ZSohq3JI15d RCQ63bqe2Q2vyKdiojEu9v3ZoE8azx6seERpbrQ9wcE3m0a3qh0WFwM8LGlkCq+VU2QumG3YRleH/ WPikub0I24ppnEohfpu72KiAycynQh26WrSDBDmvQa3fyLREMQf0S7oIxOhp4VXAtI75QLboo/9eV fj91Ob3a6ohkqMGvuy2XwwD7XXDvF9D4P1LmVIssToznR1Ihs64FIoH++tKkOrzlqoRcXP6F/4YoO c1VulrC11RgG9gYO+uw9U97zKclPHAisPAVP/pWOzPZXZfeB3yBbwdSVKQS+PC3whef8fRyHls7q6 hAuei82w==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1pzWyJ-00C3Ij-0y; Thu, 18 May 2023 06:18:43 +0000 Date: Wed, 17 May 2023 23:18:43 -0700 From: Christoph Hellwig To: "Ritesh Harjani (IBM)" Cc: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, Matthew Wilcox , Dave Chinner , Brian Foster , Ojaswin Mujoo , Disha Goel Subject: Re: [RFCv5 3/5] iomap: Add iop's uptodate state handling functions Message-ID: References: <5372f29f986052f37b45c368a0eb8eed25eb8fdb.1683485700.git.ritesh.list@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5372f29f986052f37b45c368a0eb8eed25eb8fdb.1683485700.git.ritesh.list@gmail.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-xfs@vger.kernel.org > + * inline helpers for bitmap operations on iop->state > + */ > +static inline void iop_set_range(struct iomap_page *iop, unsigned int start_blk, > + unsigned int nr_blks) > +{ > + bitmap_set(iop->state, start_blk, nr_blks); > +} > + > +static inline bool iop_test_block(struct iomap_page *iop, unsigned int block) > +{ > + return test_bit(block, iop->state); > +} > + > +static inline bool iop_bitmap_full(struct iomap_page *iop, > + unsigned int blks_per_folio) > +{ > + return bitmap_full(iop->state, blks_per_folio); > +} I don't really see much poin in these helpers, any particular reason for adding them? > +/* > + * iop related helpers for checking uptodate/dirty state of per-block > + * or range of blocks within a folio > + */ I'm also not sure this comment adds a whole lot of value. The rest looks good modulo the WARN_ONs already mentined by Brian.