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 18C11C38142 for ; Tue, 31 Jan 2023 15:10:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232502AbjAaPKs (ORCPT ); Tue, 31 Jan 2023 10:10:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233386AbjAaPKM (ORCPT ); Tue, 31 Jan 2023 10:10:12 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74EB41EFC8; Tue, 31 Jan 2023 07:07:59 -0800 (PST) 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=nnISUeD7Myml+nomxC97ujFe7tLxq4ETjq8I3WolSKc=; b=poi+M+FmKuNkElvagkC9xZC+es /lhFW1SI+9FfH4lFdcDIfXOTqZSd4LKnl4sq4+TOlLx50RVMaME14KWog5ULIUZ7xEDwdwP/lfkoG pvQggsCBbMLCz8+evhmJdgkRB9fhhGNYWKnzn6pieAuQb79gPYTCZgA4eKqkvpAONi14WjN8v+6Au vPnaIwwk57x+QuvnhFbjBr5lTZlbtLBml+UXw2tPxBdK+7ZCqESSfcUyZqBGl0ssUv+4EywbONDXA wVoutOqorSAxwY/5SgTIK3hYjraDkIkXQLqn5f5FRFDg4aV0iV5YM/0LHflJRWkYkbpSk1HD6iAq5 blCR7Elw==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pMsDt-008QMi-QF; Tue, 31 Jan 2023 15:07:01 +0000 Date: Tue, 31 Jan 2023 07:07:01 -0800 From: Christoph Hellwig To: Matthew Wilcox Cc: Dave Chinner , "Ritesh Harjani (IBM)" , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, Aravinda Herle Subject: Re: [RFCv2 2/3] iomap: Change uptodate variable name to state Message-ID: References: <20230130215623.GP360264@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 On Mon, Jan 30, 2023 at 10:24:59PM +0000, Matthew Wilcox wrote: > > a single bitmap of undefined length, then change the declaration and > > the structure size calculation away from using array notation and > > instead just use pointers to the individual bitmap regions within > > the allocated region. > > Hard to stomach that solution when the bitmap is usually 2 bytes long > (in Ritesh's case). Let's see a version of this patchset with > accessors before rendering judgement. Yes. I think what we need is proper helpers that are self-documenting for every bitmap update as I already suggsted last round. That keeps the efficient allocation, and keeps all the users self-documenting. It just adds a bit of boilerplate for all these helpers, but that should be worth having the clarity and performance benefits.