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 8D05FC433EF for ; Wed, 19 Jan 2022 13:21:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354765AbiASNVk (ORCPT ); Wed, 19 Jan 2022 08:21:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232897AbiASNVj (ORCPT ); Wed, 19 Jan 2022 08:21:39 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9C69C061574; Wed, 19 Jan 2022 05:21:38 -0800 (PST) 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=+9su99qQAC8y6dKw8A2X//R/c9y7lfjPSaVbD0mlkIU=; b=E9ZM3eDC/vl/KH/yXJ7nUL6K/l NCWWJpsHYRu1Feq1U/7U3Dgps87a3su50/wTSrphRvKDrVOgB9onW0JgyDy/vWUXEEyBnzV09sV/v CjLzYgcKr9NmdAs+5tsVk4sPoXun8RfLC434MTzHuHdIZ5v8bNC5Yja1QEXMvMlb3u/TiVRKPRBXQ MFPBhW+gZ31Q8UGF4A7OHNlrmAUElpBpZGA/HkIJ/J7UdBGEsgdSgPD/3BVUxkb4in/WFk4NJkNjU ChPO1vBidjHj6rqG+FnVPCBrYCyERd3hp9apv88S/ATC6bT26oAkHbaWiVrg12fE3F3GBXn2Gy3i7 Uf5OpMKw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nAAtU-00AsCu-PA; Wed, 19 Jan 2022 13:20:56 +0000 Date: Wed, 19 Jan 2022 13:20:56 +0000 From: Matthew Wilcox To: JeffleXu Cc: dhowells@redhat.com, linux-cachefs@redhat.com, xiang@kernel.org, chao@kernel.org, linux-erofs@lists.ozlabs.org, linux-fsdevel@vger.kernel.org, joseph.qi@linux.alibaba.com, bo.liu@linux.alibaba.com, tao.peng@linux.alibaba.com, gerry@linux.alibaba.com, eguan@linux.alibaba.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 19/23] cachefiles: implement .demand_read() for demand read Message-ID: References: <20211227125444.21187-1-jefflexu@linux.alibaba.com> <20211227125444.21187-20-jefflexu@linux.alibaba.com> <47831875-4bdd-8398-9f2d-0466b31a4382@linux.alibaba.com> <99c94a78-58c4-f0af-e1d4-9aaa51bab281@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <99c94a78-58c4-f0af-e1d4-9aaa51bab281@linux.alibaba.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 12, 2022 at 05:02:13PM +0800, JeffleXu wrote: > I'm afraid IDR can't be replaced by xarray here. Because we need an 'ID' > for each pending read request, so that after fetching data from remote, > user daemon could notify kernel which read request has finished by this > 'ID'. > > Currently this 'ID' is get from idr_alloc(), and actually identifies the > position of corresponding read request inside the IDR tree. I can't find > similar API of xarray implementing similar function, i.e., returning an > 'ID'. xa_alloc(). 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D4888C433EF for ; Wed, 19 Jan 2022 13:21:46 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Jf5rn25n6z30Nx for ; Thu, 20 Jan 2022 00:21:45 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=casper.20170209 header.b=E9ZM3eDC; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=infradead.org (client-ip=2001:8b0:10b:1236::1; helo=casper.infradead.org; envelope-from=willy@infradead.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=casper.20170209 header.b=E9ZM3eDC; dkim-atps=neutral Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Jf5rb0Vvtz309W for ; Thu, 20 Jan 2022 00:21:34 +1100 (AEDT) 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=+9su99qQAC8y6dKw8A2X//R/c9y7lfjPSaVbD0mlkIU=; b=E9ZM3eDC/vl/KH/yXJ7nUL6K/l NCWWJpsHYRu1Feq1U/7U3Dgps87a3su50/wTSrphRvKDrVOgB9onW0JgyDy/vWUXEEyBnzV09sV/v CjLzYgcKr9NmdAs+5tsVk4sPoXun8RfLC434MTzHuHdIZ5v8bNC5Yja1QEXMvMlb3u/TiVRKPRBXQ MFPBhW+gZ31Q8UGF4A7OHNlrmAUElpBpZGA/HkIJ/J7UdBGEsgdSgPD/3BVUxkb4in/WFk4NJkNjU ChPO1vBidjHj6rqG+FnVPCBrYCyERd3hp9apv88S/ATC6bT26oAkHbaWiVrg12fE3F3GBXn2Gy3i7 Uf5OpMKw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nAAtU-00AsCu-PA; Wed, 19 Jan 2022 13:20:56 +0000 Date: Wed, 19 Jan 2022 13:20:56 +0000 From: Matthew Wilcox To: JeffleXu Subject: Re: [PATCH v1 19/23] cachefiles: implement .demand_read() for demand read Message-ID: References: <20211227125444.21187-1-jefflexu@linux.alibaba.com> <20211227125444.21187-20-jefflexu@linux.alibaba.com> <47831875-4bdd-8398-9f2d-0466b31a4382@linux.alibaba.com> <99c94a78-58c4-f0af-e1d4-9aaa51bab281@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <99c94a78-58c4-f0af-e1d4-9aaa51bab281@linux.alibaba.com> X-BeenThere: linux-erofs@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development of Linux EROFS file system List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, dhowells@redhat.com, joseph.qi@linux.alibaba.com, linux-cachefs@redhat.com, linux-fsdevel@vger.kernel.org, gerry@linux.alibaba.com, linux-erofs@lists.ozlabs.org Errors-To: linux-erofs-bounces+linux-erofs=archiver.kernel.org@lists.ozlabs.org Sender: "Linux-erofs" On Wed, Jan 12, 2022 at 05:02:13PM +0800, JeffleXu wrote: > I'm afraid IDR can't be replaced by xarray here. Because we need an 'ID' > for each pending read request, so that after fetching data from remote, > user daemon could notify kernel which read request has finished by this > 'ID'. > > Currently this 'ID' is get from idr_alloc(), and actually identifies the > position of corresponding read request inside the IDR tree. I can't find > similar API of xarray implementing similar function, i.e., returning an > 'ID'. xa_alloc().