Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1166826pxb; Fri, 21 Jan 2022 11:16:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJxh19+gmROt/aqRCC+zkp9DmpgNzty9LZOzrxfCdONwuw5VCXXEqQL+wnye1pc+Ae7iLAoJ X-Received: by 2002:a17:90a:5d13:: with SMTP id s19mr2115257pji.117.1642792574350; Fri, 21 Jan 2022 11:16:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642792574; cv=none; d=google.com; s=arc-20160816; b=c7HBICii/gVN4y4QixsigI4oW0TZxOhiRv2/c6ahvHYlG3kFseE86ZMrMLKRKYmKFB 2tvFIcgnRDdaM4S+ODt0ZMAGs5qGE/UEShSqucwPOOEMkw6BSZ3Eq1+c4ZrU8cqrSOgI mu3bkyHhzVKxU0yc6nG9vMaeAVD1ohOl41JZxi7BMH5+XJRdQqYaaDtvhpNyiXTZx4sH Kx4euuF/JXWOPuHVmdnQKv4Yf/miYfMZGHifU4m4rr8wWdYv36HwbO5YOzNp8J6lG/9q AXEmKjWkRxwlZ19F2CsTK+wLKlhfTEcwhrO3RDJvUnzkduQiy5PKk7B0H7yisySUPx9Q KdmQ== 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=+9su99qQAC8y6dKw8A2X//R/c9y7lfjPSaVbD0mlkIU=; b=vvlJLxNVFYryDWhwR/DxtnZnfyyV2Xre6jsCCBqV5+euIgHoBnr23RDdcuY8UREeKa bOeYep0E5oROi5YzF8FkHZKKrdWT1AB10+Qz6iwuQs624FbMKUsuT/Q80dIIDipTLNuP zx0tNJOsxftxEyj7aMVUKPy3NIl0aixTqvHeDgcOaLx0HNURc5gqZ3F6bge/ZieRiA8y vAwgACNnPyE3AzTK/6SgZEaEfoV0YskgxO2EUSD8tvFOTdz42h9YZUlbL0RgMdV+zU4y id8AZLhGfuXK7ztWDh3HJJEJTsWAgKn14Us12iVya8JT2meZTLVXShTpjTRXx2OcgR4n WOVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=E9ZM3eDC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l12si5514469pga.479.2022.01.21.11.16.02; Fri, 21 Jan 2022 11:16:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=E9ZM3eDC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354760AbiASNVk (ORCPT + 99 others); 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().