Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3082621pxb; Mon, 18 Oct 2021 07:55:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7uW9LwFtYGHhCRzPjO1xLtsmCXenVNIMVnNpvQ2rA1DvHO48jtilP6HmdIGhOdUg4KzJO X-Received: by 2002:a17:906:5d6:: with SMTP id t22mr29674923ejt.98.1634568933078; Mon, 18 Oct 2021 07:55:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634568933; cv=none; d=google.com; s=arc-20160816; b=kTAix2MVRAOBn8W+TnZ6X8RnbzI4yLs/enb5jbFEEz8WDkxaqpwQGdQbYvadgQqVVd saJDb1zgbeB2zDTnyp93scyXHspj0uavbnZUy8EkkjUxj4s4sKBkn4czgZ4sJbq6YJ7b RuN1Ls2UM4+lFshyYfL6v3RI8cAb9LJ4ji/7n4gneDWNigmAm7Sg7Ls7nu663wY2yEF9 jHLavgIrbq4pv6AphWzYX0oJYZEuyPIUWwKo2HP/1DHekBqcMkX4DiWovxM+C9F3+Ija apeWxE/4BL947Sosohi4knWXpzCMobGo2B6sKxg8AMrXHBDDqgKy/MgqbqyyLcJtZMd9 Oh1Q== 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:message-id:date:cc:to:from :subject:organization:dkim-signature; bh=HLyJpHLHgdEk/dLhjAzTgQqnW46fpcyamO0/BfGexg0=; b=wWnNWoUg8cnaAOjXIB9yNHwueC3oG1AB3q9Usg/+f6L54gq+BSX5nmJtQ8l/AmvKZS CvtwTVD8olyIBxubsYJwKUDHvOjXtOvn3rsKMkpNXyo/z00Bzl1E13DY313NdZzn1tar mPUdAPCrZ93l0++1tsFOThz24bYOxDoDRdriDcgwk4tzTtHQH/ysnf2b/aLYvzdWr/NQ FdehWwtP3e5YXMBnwp5q4tg8acRquPDMe/MlNOWF99YJ3/8BAvcIKv9+0yd9DPYB0chC L13+e/kTkUvS4N3Rmo8cNn+SC4Q70FhliZw+B0ZorJ+OvKY7MG6lMZUWucnXeZl99WOJ tskQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OtUHS+LK; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cw2si34085834ejc.730.2021.10.18.07.55.09; Mon, 18 Oct 2021 07:55:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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=@redhat.com header.s=mimecast20190719 header.b=OtUHS+LK; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232773AbhJRO5D (ORCPT + 99 others); Mon, 18 Oct 2021 10:57:03 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:43903 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232650AbhJRO5A (ORCPT ); Mon, 18 Oct 2021 10:57:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634568888; 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=HLyJpHLHgdEk/dLhjAzTgQqnW46fpcyamO0/BfGexg0=; b=OtUHS+LK6MCdR7OsylDBtzpSspNoJRuAKP9ejm4jnKoZQuHCQLSnUdtIcHwDiWXQHURghp 61cy44Bmnj9NUHAbdfh5fFwqEQOM5wehln97xA92mTBAUsMtj6Uwl7PWaSvclf5i2daccX HP2nQ0YeL9yrEaR/8MSvRtJEklqggsg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-490-4SBX_taHOHi2d4qgCr4dFg-1; Mon, 18 Oct 2021 10:54:45 -0400 X-MC-Unique: 4SBX_taHOHi2d4qgCr4dFg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3F116800685; Mon, 18 Oct 2021 14:54:43 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.33.36.19]) by smtp.corp.redhat.com (Postfix) with ESMTP id F03675DF21; Mon, 18 Oct 2021 14:54:39 +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 Subject: [PATCH 15/67] fscache: Disable fscache_begin_operation() From: David Howells To: linux-cachefs@redhat.com Cc: dhowells@redhat.com, Trond Myklebust , Anna Schumaker , Steve French , Dominique Martinet , Jeff Layton , Matthew Wilcox , Alexander Viro , Omar Sandoval , Linus Torvalds , linux-afs@lists.infradead.org, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, ceph-devel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 18 Oct 2021 15:54:39 +0100 Message-ID: <163456887921.2614702.840718814028578881.stgit@warthog.procyon.org.uk> In-Reply-To: <163456861570.2614702.14754548462706508617.stgit@warthog.procyon.org.uk> References: <163456861570.2614702.14754548462706508617.stgit@warthog.procyon.org.uk> User-Agent: StGit/0.23 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Disable fscache_begin_operation() so that the operation manager can be removed and replaced. Signed-off-by: David Howells --- fs/cachefiles/io.c | 13 ++++++++++++- fs/fscache/io.c | 2 ++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/fs/cachefiles/io.c b/fs/cachefiles/io.c index 5ead97de4bb7..4cc57be88f37 100644 --- a/fs/cachefiles/io.c +++ b/fs/cachefiles/io.c @@ -271,6 +271,7 @@ static int cachefiles_write(struct netfs_cache_resources *cres, static enum netfs_read_source cachefiles_prepare_read(struct netfs_read_subrequest *subreq, loff_t i_size) { +#if 0 struct fscache_operation *op = subreq->rreq->cache_resources.cache_priv; struct cachefiles_object *object; struct cachefiles_cache *cache; @@ -335,6 +336,9 @@ static enum netfs_read_source cachefiles_prepare_read(struct netfs_read_subreque out: cachefiles_end_secure(cache, saved_cred); return ret; +#endif + return subreq->start >= i_size ? + NETFS_FILL_WITH_ZEROES : NETFS_DOWNLOAD_FROM_SERVER; } /* @@ -359,6 +363,7 @@ static int cachefiles_prepare_write(struct netfs_cache_resources *cres, static int cachefiles_prepare_fallback_write(struct netfs_cache_resources *cres, pgoff_t index) { +#if 0 struct fscache_operation *op = cres->cache_priv; struct cachefiles_object *object; struct cachefiles_cache *cache; @@ -369,6 +374,8 @@ static int cachefiles_prepare_fallback_write(struct netfs_cache_resources *cres, cache = container_of(object->fscache.cache, struct cachefiles_cache, cache); return cachefiles_has_space(cache, 0, 1); +#endif + return -ENOBUFS; } /* @@ -376,6 +383,7 @@ static int cachefiles_prepare_fallback_write(struct netfs_cache_resources *cres, */ static void cachefiles_end_operation(struct netfs_cache_resources *cres) { +#if 0 struct fscache_operation *op = cres->cache_priv; struct file *file = cres->cache_priv2; @@ -387,8 +395,8 @@ static void cachefiles_end_operation(struct netfs_cache_resources *cres) fscache_op_complete(op, false); fscache_put_operation(op); } - _leave(""); +#endif } static const struct netfs_cache_ops cachefiles_netfs_cache_ops = { @@ -406,6 +414,7 @@ static const struct netfs_cache_ops cachefiles_netfs_cache_ops = { int cachefiles_begin_operation(struct netfs_cache_resources *cres, struct fscache_operation *op) { +#if 0 struct cachefiles_object *object; struct cachefiles_cache *cache; struct path path; @@ -441,5 +450,7 @@ int cachefiles_begin_operation(struct netfs_cache_resources *cres, error_file: fput(file); +#endif + cres->ops = &cachefiles_netfs_cache_ops; return -EIO; } diff --git a/fs/fscache/io.c b/fs/fscache/io.c index 7ac34c2e45fe..2547892a6064 100644 --- a/fs/fscache/io.c +++ b/fs/fscache/io.c @@ -31,6 +31,7 @@ int __fscache_begin_operation(struct netfs_cache_resources *cres, struct fscache_cookie *cookie, bool for_write) { +#if 0 struct fscache_operation *op; struct fscache_object *object; bool wake_cookie = false; @@ -144,6 +145,7 @@ int __fscache_begin_operation(struct netfs_cache_resources *cres, fscache_stat(&fscache_n_stores_nobufs); else fscache_stat(&fscache_n_retrievals_nobufs); +#endif _leave(" = -ENOBUFS"); return -ENOBUFS; }