Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2287841pxp; Mon, 21 Mar 2022 15:58:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznjhL6PcSZGcmnsq0UNRQqY6z3/FXUDVUae9Hhrf+mfjsm0PFLhUKjwJJLc36pBNqSg6El X-Received: by 2002:a17:903:18c:b0:154:9ee:ced3 with SMTP id z12-20020a170903018c00b0015409eeced3mr15139101plg.170.1647903537256; Mon, 21 Mar 2022 15:58:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647903537; cv=none; d=google.com; s=arc-20160816; b=uVkfGvSUUdukz88szpHY/T5myDyYyTzxhz+Y/2ki8TcVDsvPjQfiTgpwk+i0Jsp9tr W/DfaVzQC4rsiBiRf6FY/gSA6lLWW01W4s6KnmwsHgkVajt6fUy+bLf+pQSPU4xDfXvm mr99dEmj+0tllWDi7Wf7QZX05gGqxn262yc8TQjKkbnGngDtOFRyU2jV/bcHG5FdDE70 S2M+EI6SXxghsGQTFt0CkIXQ377QAkb4aDA6dS+h+Ju4dDkMmMeoCmvY5AepZUxtYtjH twXCMhkouCHjFL4hy3a9mYQLRfwjWpRprHTwFY4uJRSSQ+5Qb2QHK58bBNfNtT+6C7LN rnzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-id:mime-version:subject :cc:to:references:in-reply-to:from:organization:dkim-signature; bh=vMaQn1UtCu/LKFHSjM1uVJme2UZeiOPTmAAuYyikU+M=; b=gBKwcZK8L8UUtvPr9l3gjVELyw9AxVEcHJE+ej7kZBz4vy9/ajkxe2JlZd9+KDasAJ Hv8H42I3uFPY7VfCDxr7WDUIfCqdyZ4a0tIbJsx0v0thHe1H2/aVXWXjHLtpQ3WEXWlM gmmuFAncwBzShpGdKVZTpCHM2W/f3gzieqAFA7YqDBB656h93cVVlV5Xi0AM91thoiFp drSpnyxXtAPyDJBHapsV75wb7/cEuhMCrpLTFQuVD0yWEf7LDpw17T0zqSiUPtOv4VPk zi2E/e2JOnimQhQF2vlAF0lV31QHeLFJzKDZkZI/pRSIvvTv7dRHCBZPFT7YbHEhck3U dH7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZjKWk5Z7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id p14-20020a17090b010e00b001c6ad84f9absi565005pjz.48.2022.03.21.15.58.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 15:58:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZjKWk5Z7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6D75059A69; Mon, 21 Mar 2022 15:12:06 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349217AbiCUOQg (ORCPT + 99 others); Mon, 21 Mar 2022 10:16:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351449AbiCUOLE (ORCPT ); Mon, 21 Mar 2022 10:11:04 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 87EE32E08D for ; Mon, 21 Mar 2022 07:07:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1647871550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=vMaQn1UtCu/LKFHSjM1uVJme2UZeiOPTmAAuYyikU+M=; b=ZjKWk5Z7QedUVITo3wigTlcyMralMRu0irKZCArEkk6j2tKr+OW/JGDmvN8dnaMR+oqAaK JcLcIWWJTtQ3vP8M6aTzvRPgf22dtL+3mtZrpkKQLpGhKkwkm6lHh/p5+ztyRMqIgqbFqh 559dGg3H8JHeATso5gEyzCqxx5be54Q= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-352-jh6NgncOPGSypXqW--5J5g-1; Mon, 21 Mar 2022 10:05:47 -0400 X-MC-Unique: jh6NgncOPGSypXqW--5J5g-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B525C1C05AFF; Mon, 21 Mar 2022 14:05:46 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.33.36.19]) by smtp.corp.redhat.com (Postfix) with ESMTP id 942011410F35; Mon, 21 Mar 2022 14:05:44 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20220316131723.111553-7-jefflexu@linux.alibaba.com> References: <20220316131723.111553-7-jefflexu@linux.alibaba.com> <20220316131723.111553-1-jefflexu@linux.alibaba.com> To: Jeffle Xu Cc: dhowells@redhat.com, linux-cachefs@redhat.com, xiang@kernel.org, chao@kernel.org, linux-erofs@lists.ozlabs.org, torvalds@linux-foundation.org, gregkh@linuxfoundation.org, willy@infradead.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, luodaowen.backend@bytedance.com Subject: Re: [PATCH v5 06/22] cachefiles: implement on-demand read MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1029511.1647871543.1@warthog.procyon.org.uk> Date: Mon, 21 Mar 2022 14:05:43 +0000 Message-ID: <1029512.1647871543@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Jeffle Xu wrote: > + { "cread", cachefiles_ondemand_cread }, Rather than adding the cread command, would it be better to use an ioctl on the anon fd as the /dev/cachefiles write op is serialised? > + /* Stop enqueuig request when daemon closes anon_fd prematurely. */ "Enqueuing" David