Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp620018imw; Fri, 8 Jul 2022 08:44:44 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tsihnKVOLYORSDdCEi+8d3p/ODYpWfQ018yjvKuEol4PCqIlYorqEAK7FALALbwDC9gl0P X-Received: by 2002:a63:c006:0:b0:411:c33f:b4bb with SMTP id h6-20020a63c006000000b00411c33fb4bbmr3862219pgg.433.1657295084399; Fri, 08 Jul 2022 08:44:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657295084; cv=none; d=google.com; s=arc-20160816; b=D66O3+mmXx8umq0Wq2IsofvDCOnjratqbFiiR2TyHCEZPWapc0z8xM64RyywXWG2Q7 u/DKIMO9jCZQ5rC5kH0TBcanrLCjh6iZsOKx4Wnj70WqmP6u7d8/jJYwpw0OnIA4qjMS G77vGj9dlefMUk5SPWy4SMdn35tSbtZABvQPztOe8hVuWI3whJGMqjS1TQAgMGR24BJZ BPEKDfVLIm/hEstlQaT2Q/Atbg+TG4Ikfadw9yIx5ZMGaj6J5FrcKx0Sm3rixe3Cqq5F Q8k70OPwBjuITHgUdPHBUbjJbYBVAenn1x33rsHBnvPy/Bl6iH5LucWtcMG91+8C1m9T Fq0Q== 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=9/lkeRcGIhHu6UVP5xYmV7mYlWFVVjg4XhlUmR+XakU=; b=iOCuJxWdhYuLKwNVGPsikJ3yUyAVmnicYCdnp2HD41XGnKgM7Z05fDMQgbDvAy1aQQ weW4sSvyNmDbdD+WE22MdOHIc3L6Cti5HovtuZF1AW8M0af3Qo2fjtiYopcDmrUHpSMB 9qkTdkLLSWFbFDMEixdNe43iPeAQXL1wu+ljFNJEE5IYLNJS2w0fGlV8cmlIecNIoN0V 8mMbz1YxstCISAHqm/TFSFgKC1xw6TViv4sXAvfj8+8sDtbKT9DZ3c7p37F5iCDWoIgh U6TQHQihzXDVzKn+qS3O2MFmysKsvICUaxmf39BA4Mu8RChFe2q85Pqju8TE3GjCRO/z tgDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="u/hJU81h"; 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 bo6-20020a056a000e8600b0052895622672si1852948pfb.286.2022.07.08.08.44.31; Fri, 08 Jul 2022 08:44:44 -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=casper.20170209 header.b="u/hJU81h"; 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 S238184AbiGHOx5 (ORCPT + 99 others); Fri, 8 Jul 2022 10:53:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237623AbiGHOx4 (ORCPT ); Fri, 8 Jul 2022 10:53:56 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 997682A73D; Fri, 8 Jul 2022 07:53:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=9/lkeRcGIhHu6UVP5xYmV7mYlWFVVjg4XhlUmR+XakU=; b=u/hJU81hiwYxXnG04A+ldFArw5 FTQjbsTDMajhXO2rUfAsuJI5/r3v1zr7iPeLiKDX6NrmpYwS8sf/5S306VLzRoZFaBIwztvkTEkXm eUm4v4oYRwLM561NqYLJA1JF3xrDFVyWq9meyhaNJYzbINN0H+pDxN8ehYUW/hUtRd3BomZ6BuHhx w1GKs/7ZEFQf3u8WfpHzqdV2N1ch2jMDqeEICZKZfgnuXpbopkkQqToE1231YgyyF7abGsJNymMS4 rwxXRjkK5P4E5oT7IseYLrsfKCYMu4F76TCxKwWUCnUBPhXutUNM7GduKN+ZeGdWwcUOKY0ynubE/ IYEil3TQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1o9pMc-003a34-EH; Fri, 08 Jul 2022 14:53:50 +0000 Date: Fri, 8 Jul 2022 15:53:50 +0100 From: Matthew Wilcox To: ira.weiny@intel.com Cc: Dan Williams , Greg Kroah-Hartman , "Rafael J. Wysocki" , Alison Schofield , Vishal Verma , linux-kernel@vger.kernel.org, linux-cxl@vger.kernel.org, linux-pci@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [RFC PATCH 1/3] xarray: Introduce devm_xa_init() Message-ID: References: <20220705232159.2218958-1-ira.weiny@intel.com> <20220705232159.2218958-2-ira.weiny@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220705232159.2218958-2-ira.weiny@intel.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 Tue, Jul 05, 2022 at 04:21:57PM -0700, ira.weiny@intel.com wrote: > The main issue I see with this is defining devm_xa_init() in device.h. > This makes sense because a device is required to use the call. However, > I'm worried about if users will find the call there vs including it in > xarray.h? Honestly, I don't want users to find it. This only makes sense if you're already bought in to the devm cult. I worry people will think that they don't need to do anything else; that everything will be magically freed for them, and we'll leak the objects pointed to from the xarray. I don't even like having xa_destroy() in the API, because of exactly this.