Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1271350pxb; Fri, 21 Jan 2022 14:00:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJzP3qNklYlbv+mSL4/2NfauL7hRY+LTPCXktrqPekpOa98P8s7CJE9ip8Pb9wPwpNof9imP X-Received: by 2002:a17:902:7405:b0:14a:d1da:131e with SMTP id g5-20020a170902740500b0014ad1da131emr5817743pll.116.1642802419059; Fri, 21 Jan 2022 14:00:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642802419; cv=none; d=google.com; s=arc-20160816; b=rTKcBuY/0esclah3CKEjJcwUIk+Cc/HGNuvTWIHNRbMnw/w6MkcxoCH2f+4QdawrHs 4GP0JWzSsSTRpmOfc9Zft5eOTdSebwPueJ/uGympFo9lhJKlwdbRI5OvZDTG/EFZO2D1 U5nt346IDZTBHWhUwXmIeBLVV/6iuM5S8Qqv+IXstlvCl0gyXyd3vNk2lWfVCSjV9tGT ClotcdWilXqGz4Bc1QC+9JqbeDKh/fWg2nIm0/Gu45rtoz6lz+XkDWXmj1MDbeLbR60S wKoQIrZIES2PoxDU7ziLQR6WDpGiiKp457XyQ1jQqmuS0mhnm1sn5lTeW+CaNKDEUY4Y X05A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=ENNc86Yw2yUoj2TRJlBeH13zrKpGNSucqIHr8M0RK6Y=; b=pjnwftgGpS4ugzxqH0PzFLcI2FOtrnBcuBvcceyTkae+CWzrXw5naDGmlXvechUaff FoYVzGyLA4j3fNwYDU4Cuo+GtvYGy0lwL5oD5UGDfYsBe8mpXuLVylNnEz2htULVCEVd LxmR4DCFgMOiY2ipPJFWBC+D3omB/KT3VBfMNPbLYpHEaXKbdUHm3qFQFrpkMm2OTnL0 z38uD1hZjpmsaWkkFS1VDOeo+IeQZByXVn4GLz2lIzaxSfTOxQZsihTkMdVBpT0ncTcg AY/uhTKVNkNpKBZQXSkIvbiPUN9eO4VyFUjMI5tvF45QtZPPftj34LPViw7NMucgtffe 0juQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j3si6887913pll.394.2022.01.21.14.00.06; Fri, 21 Jan 2022 14:00:19 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242955AbiATMoG (ORCPT + 99 others); Thu, 20 Jan 2022 07:44:06 -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