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 6F571C433F5 for ; Thu, 20 Jan 2022 12:44:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242973AbiATMoH (ORCPT ); Thu, 20 Jan 2022 07:44:07 -0500 Received: from out30-44.freemail.mail.aliyun.com ([115.124.30.44]:34658 "EHLO out30-44.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242871AbiATMoF (ORCPT ); Thu, 20 Jan 2022 07:44:05 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04394;MF=jefflexu@linux.alibaba.com;NM=1;PH=DS;RN=13;SR=0;TI=SMTPD_---0V2MYYzM_1642682637; Received: from 192.168.31.65(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0V2MYYzM_1642682637) by smtp.aliyun-inc.com(127.0.0.1); Thu, 20 Jan 2022 20:43:59 +0800 Message-ID: Date: Thu, 20 Jan 2022 20:43:57 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: [PATCH v1 19/23] cachefiles: implement .demand_read() for demand read Content-Language: en-US To: Matthew Wilcox 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 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> From: JeffleXu In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/19/22 9:20 PM, Matthew Wilcox wrote: > 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(). > Oh yes. Thanks. I will try to convert to xarray API... -- Thanks, Jeffle