From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6906429ACDB for ; Wed, 4 Mar 2026 14:51:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772635875; cv=none; b=eoDOuIbw2JAcVsoDFNabBCB1r72hgURi2fHwiraN8DvR7p0Ris9mHH8u57lDm9sGazs0WZDJGtRlU4wbKsoQ/KQ+/StSj6fJVrrBzq2/alj1xHPd/oTJ1eSGhlNyV4YBmbSCGglUeWIdo2+Ha9ZH7dzYXrKZlbsVt/t3YBaOmX8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772635875; c=relaxed/simple; bh=W8Cm5qIm4LQaWOvdq5hm44m3NqWwxLD5twkpvrzNyaE=; h=From:In-Reply-To:References:To:Cc:Subject:MIME-Version: Content-Type:Date:Message-ID; b=L/nqcbxMakXB86munXUNnJSpkBd28+m85B0XAUSUJdpA3VWqgYwksMtqpx+5rcPPlyrrB7tEN+SueDqKgu7EIci8u+3xP76B6v8G3ZEGVPt58Q3bu+AV3pHAAJwTNGuiebbW9XtLZoCb2OMkPW4V/Zn2179vU4i1wpxc2+e0dI4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=SWdHlaLl; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="SWdHlaLl" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772635873; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EIl/qIW2FbP2w2w5PevLs3/QQXME7hdmijpTZj9387g=; b=SWdHlaLlFUmh8I2A22XvyhElFBjIMGZYtuE+p9yMzPlF6Bsxg5xdngq0fzIrPDoipfzTS3 30hRKpe1xc+JxdxsJigGJMQgv+TxLHJ21INCgsM+rbl+DaZYcao2nXXJsmQIxXcvo0izHq DYSxgP9z4RaMI7yva+QaOFUyPAEfA28= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-261-1_qf4EzWN0Cw_Svt9tcqww-1; Wed, 04 Mar 2026 09:51:09 -0500 X-MC-Unique: 1_qf4EzWN0Cw_Svt9tcqww-1 X-Mimecast-MFC-AGG-ID: 1_qf4EzWN0Cw_Svt9tcqww_1772635867 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4EA601956060; Wed, 4 Mar 2026 14:51:07 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.44.32.194]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E3687195608E; Wed, 4 Mar 2026 14:51:02 +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: References: <20260304140328.112636-1-dhowells@redhat.com> <20260304140328.112636-18-dhowells@redhat.com> To: Christoph Hellwig Cc: dhowells@redhat.com, Matthew Wilcox , Jens Axboe , Leon Romanovsky , Christian Brauner , Paulo Alcantara , netfs@lists.linux.dev, linux-afs@lists.infradead.org, linux-cifs@vger.kernel.org, linux-nfs@vger.kernel.org, ceph-devel@vger.kernel.org, v9fs@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Paulo Alcantara Subject: Re: [RFC PATCH 17/17] netfs: Combine prepare and issue ops and grab the buffers on request Precedence: bulk X-Mailing-List: linux-cifs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <181469.1772635861.1@warthog.procyon.org.uk> Content-Transfer-Encoding: quoted-printable Date: Wed, 04 Mar 2026 14:51:01 +0000 Message-ID: <181470.1772635861@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 Christoph Hellwig wrote: > On Wed, Mar 04, 2026 at 02:03:24PM +0000, David Howells wrote: > > +/* > > + * Query the occupancy of the cache in a region, returning the extent= of the > > + * next chunk of cached data and the next hole. > > + */ > > +static int cachefiles_query_occupancy(struct netfs_cache_resources *c= res, > > + struct fscache_occupancy *occ) > > +{ > = > Independent of fiemap or not, how is this supposed to work? File > systems can create speculative preallocations any time they want, > so simply querying for holes vs data will corrupt your cache trivially. SEEK_DATA and SEEK_HOLE avoid preallocations, I presume? David