Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2411854pxb; Sun, 30 Jan 2022 15:41:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJyJ8e91W1eycfNyICvUeKIzu8PflJNHlahak7+fRH/GCaw2xEAFLqv0UrnCLy2IcUb6cHzv X-Received: by 2002:a17:907:2d8d:: with SMTP id gt13mr15482880ejc.583.1643586064822; Sun, 30 Jan 2022 15:41:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643586064; cv=none; d=google.com; s=arc-20160816; b=lgPkfKPb9CMAmsOWx4Nc1n19+XMZA9aSObUvW24NxEOw0GUKFb8G66Cv+ke3EkrCtO d8JYpYqh8fbhMGdRP1VgC9uASxY94nKYvaXyGh+AkBKB/pMu8bpHAaGFqqJNKGVldd2W 6QbVCLEf8sBXC5+d7n2mN8dPhNGGzM4eGHwWeZOfpXIvnG4Fydithsgx163n7u5eRPmA gT+oHq8WvEWG6DDrPtmy16QTPubTMQol8gy1MtHvsulbGdeTszVfkaAuAvCtngw6Jamp 0abAKt9ZWghLDZ8Q4RjuYLs/dBVySy/Y6D1P+Rrj+Owftiw5t39hkH/F8EvMiLV2ifck hsOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=siBkrEMmM0yVZeg5sPXeXUnlvgxmcUXRd4JYIyhiWTs=; b=XeMQqjFf6iv3zT15TcKVfURSEIfvwDXcL+nxm7j0W4jfB0YnAXNd0aCxUk8N3mxA1H 1abUtkXsQvciImTSisXXJ3vA9eBvLkvboThZJfVia5x2eurHvMkNDGPXo7IGsyuWzdU/ arF4wb0ZgLyzX7eaMYi2A2l71rF7NM68IaeP0g0evnkBZNmHK0qV9dCmYl4Z7PzsZxt9 kG4g4GZD+33cQEUXE4XeE7qssN5le1PaHSuSGNZN+OV46GCyQRv9nRJHgJY+yx7n3cMB uzveI25ybhLMVrC8+w3eYar/cnEEakT8YgVnEn8zrz/FoRKjk9zOSI1Wzy3BDX69eCGp HdcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=n2GH3c7V; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gb35si6001377ejc.356.2022.01.30.15.40.40; Sun, 30 Jan 2022 15:41:04 -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=@kernel.org header.s=k20201202 header.b=n2GH3c7V; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347957AbiA1K6Y (ORCPT + 99 others); Fri, 28 Jan 2022 05:58:24 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:49924 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242852AbiA1K6X (ORCPT ); Fri, 28 Jan 2022 05:58:23 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1FCF561DFF; Fri, 28 Jan 2022 10:58:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF14CC340E0; Fri, 28 Jan 2022 10:58:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643367502; bh=+zWMkFDrZZM+qbNwpezGJFJ66XZ2aI38VXsj6i5zjVc=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=n2GH3c7VO+JatCdg0jYNo1RcnnnE6Tof8QDipRbmPk+HfcvlbFNLW3SMyMW3v9xDR XvcyPjQ+zoBMaFiIKbF/tqUDjVspc1G6LJwMKY4DtoSJ2KXnm/6PcxgIbMDlaMVZXi pb2+obmFd/8+yM0m5/GQrVyAKczJMz9xx29t4vVYf6gfmpiVY+kpqH13W7lmOVz5VY VW19GXitDz+VslMV9LqEoIE2wjWWnUmWV9G550P5RpLY/K7VmgePVtnpx7ceTzmX/J pQfwOpWyooISOPvAVxAcrCNdf/ZYURJx1w+rki4YAv7LBw6X1mzp5ceEXPFVJWonmp lNnYMldKZd+6A== Message-ID: Subject: Re: [PATCH 0/4] cifs: Use fscache I/O again after the rewrite disabled it From: Jeff Layton To: David Howells , Steve French Cc: Shyam Prasad N , linux-cifs@vger.kernel.org, linux-cachefs@redhat.com, Matthew Wilcox , Linus Torvalds , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Date: Fri, 28 Jan 2022 05:58:20 -0500 In-Reply-To: <164329930161.843658.7387773437540491743.stgit@warthog.procyon.org.uk> References: <164329930161.843658.7387773437540491743.stgit@warthog.procyon.org.uk> Content-Type: text/plain; charset="ISO-8859-15" User-Agent: Evolution 3.42.3 (3.42.3-1.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2022-01-27 at 16:01 +0000, David Howells wrote: > Hi Steve, > > Here are some patches to make cifs actually do I/O to the cache after it > got disabled in the fscache rewrite[1] plus a warning fix that you might > want to detach and take separately: > > (1) Fix a kernel doc warning. > > (2) Change cifs from using ->readpages() to using ->readahead(). > > (3) Provide a netfs cache op to query for the presence of data in the > cache.[*] > > (4) Make ->readahead() call > > The patches can be found here also: > > https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=fscache-rewrite > > David > > [*] Ideally, we would use the netfslib read helpers, but it's probably better > to roll iterators down into cifs's I/O layer before doing that[2]. > > Link: https://lore.kernel.org/r/164021479106.640689.17404516570194656552.stgit@warthog.procyon.org.uk/ [1] > Link: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=cifs-experimental [2] > > --- > David Howells (4): > Fix a warning about a malformed kernel doc comment in cifs by removing the > cifs: Transition from ->readpages() to ->readahead() > netfs, cachefiles: Add a method to query presence of data in the cache > cifs: Implement cache I/O by accessing the cache directly > > > Documentation/filesystems/netfs_library.rst | 16 ++ > fs/cachefiles/io.c | 59 ++++++ > fs/cifs/connect.c | 2 +- > fs/cifs/file.c | 221 ++++++++------------ > fs/cifs/fscache.c | 126 +++++++++-- > fs/cifs/fscache.h | 79 ++++--- > include/linux/netfs.h | 7 + > 7 files changed, 322 insertions(+), 188 deletions(-) > > Acked-by: Jeff Layton