Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5033808pxb; Mon, 15 Feb 2021 07:52:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJxLW2QehIO6ZwZ2eHTYxwk+tCCTER96nktYo7vjXfxx9QoU5AAP2FIiDnDjm+z0ZMIwjtLh X-Received: by 2002:a17:906:3f96:: with SMTP id b22mr15899666ejj.478.1613404325747; Mon, 15 Feb 2021 07:52:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613404325; cv=none; d=google.com; s=arc-20160816; b=Q+g7SPnM9kEQs5pKUKq3Nk6VlQTGoDFKt7xPk8V4biFjJD8eGx02O4T1CYs0Knvu1m F33pOLWX5OMnVdEkQ5DZVcIzUt1Us8O/vXPgkR+4tAWDg4qMWy2hIYMbV1duprIC0Sxq dJg8puTRQv5ZwbJJ0zp9B5C6HMrLK24cU9Co58K0TXtNcUefElNz1/xtirhRF7csV71q CgA7pGtXHfH40Kq5aKvniv4CYhPJ3ttLIZdNXc/OmQ3R6qBE4FDL1573F2JtJQLi8JgA SBkNaR9nTicjc1eq0LBPvDmwkjmWTQHuHzxgkml+6qHBcdiOkK02XIajySy5EpQZp8tn 6bfQ== 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=+LfM2EJONX4z+yqWB0bfNhcb8TeIK0udZvbEVRj8Fs8=; b=bW4I6naCXJ4FxQ/qn/cGZ8TRJun4iLOTsGr7ST9lSyXLUiId7RLGvs7YURkfqPdiQ5 qRjrJYlD9tZ+AlDvob8fv1ZdhHp2RxBo9oVzPZh3fZ9k2Zhd9oyaktz0cPhbw/NNnT/G iqjsjQn5DgtJhNXdGVzqFChwtuLiaFEPA4Diq1iMkag6sMvg3MIJfZrC4HVGaLtGZaSf p6CMwLVPmO6BGL67hW5uZwutqJqvGoHARkN/cqBS5I9f7bKV+6AuuGlQuVp6TTr3yOLg vPYhfH4ZtcKFU2QpK9UeN9RkPGuNrDiKwS4QCVQn0KaeCrj1NEJfsgfI8aniZXs5E6dF Hxdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QKrpqWhC; 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 x8si1513433edl.5.2021.02.15.07.51.42; Mon, 15 Feb 2021 07:52:05 -0800 (PST) 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=QKrpqWhC; 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 S231717AbhBOPtX (ORCPT + 99 others); Mon, 15 Feb 2021 10:49:23 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:30889 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231713AbhBOPrC (ORCPT ); Mon, 15 Feb 2021 10:47:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613403935; 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=+LfM2EJONX4z+yqWB0bfNhcb8TeIK0udZvbEVRj8Fs8=; b=QKrpqWhCEwOJoKS/eRfviMvLe+uQuFvIUgKZk/GbdRXlp31RYdJhsKIhhejDfKlAb4iu3K cAcfjnuFaBxtGMhinx/PQiCKyZDaErdsp6O1boftHGZp1yhKZi43d7Nqe5hFf4KejOFeAL N1Xmj8ilqXrlPhXf4oqUCfaHmrm3sQg= 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-396-p1buAmfhNqqEmdKSa54Mnw-1; Mon, 15 Feb 2021 10:45:33 -0500 X-MC-Unique: p1buAmfhNqqEmdKSa54Mnw-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 6F7B879EC1; Mon, 15 Feb 2021 15:45:30 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-119-68.rdu2.redhat.com [10.10.119.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4DC845D9C0; Mon, 15 Feb 2021 15:45:24 +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 06/33] netfs, mm: Move PG_fscache helper funcs to linux/netfs.h From: David Howells To: Trond Myklebust , Anna Schumaker , Steve French , Dominique Martinet Cc: Matthew Wilcox , linux-mm@kvack.org, linux-cachefs@redhat.com, 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, dhowells@redhat.com, Jeff Layton , David Wysochanski , "Matthew Wilcox (Oracle)" , Alexander Viro , linux-cachefs@redhat.com, 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, 15 Feb 2021 15:45:23 +0000 Message-ID: <161340392347.1303470.18065131603507621762.stgit@warthog.procyon.org.uk> In-Reply-To: <161340385320.1303470.2392622971006879777.stgit@warthog.procyon.org.uk> References: <161340385320.1303470.2392622971006879777.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 Move the PG_fscache related helper funcs (such as SetPageFsCache()) to linux/netfs.h rather than linux/fscache.h as the intention is to move to a model where they're used by the network filesystem and the helper library, but not by fscache/cachefiles itself. Signed-off-by: David Howells cc: Matthew Wilcox cc: linux-mm@kvack.org cc: linux-cachefs@redhat.com cc: linux-afs@lists.infradead.org cc: linux-nfs@vger.kernel.org cc: linux-cifs@vger.kernel.org cc: ceph-devel@vger.kernel.org cc: v9fs-developer@lists.sourceforge.net cc: linux-fsdevel@vger.kernel.org --- include/linux/fscache.h | 11 +---------- include/linux/netfs.h | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 10 deletions(-) create mode 100644 include/linux/netfs.h diff --git a/include/linux/fscache.h b/include/linux/fscache.h index a1c928fe98e7..1f8dc72369ee 100644 --- a/include/linux/fscache.h +++ b/include/linux/fscache.h @@ -19,6 +19,7 @@ #include #include #include +#include #if defined(CONFIG_FSCACHE) || defined(CONFIG_FSCACHE_MODULE) #define fscache_available() (1) @@ -29,16 +30,6 @@ #endif -/* - * overload PG_private_2 to give us PG_fscache - this is used to indicate that - * a page is currently backed by a local disk cache - */ -#define PageFsCache(page) PagePrivate2((page)) -#define SetPageFsCache(page) SetPagePrivate2((page)) -#define ClearPageFsCache(page) ClearPagePrivate2((page)) -#define TestSetPageFsCache(page) TestSetPagePrivate2((page)) -#define TestClearPageFsCache(page) TestClearPagePrivate2((page)) - /* pattern used to fill dead space in an index entry */ #define FSCACHE_INDEX_DEADFILL_PATTERN 0x79 diff --git a/include/linux/netfs.h b/include/linux/netfs.h new file mode 100644 index 000000000000..b3d869ec7d2a --- /dev/null +++ b/include/linux/netfs.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* Network filesystem support services. + * + * Copyright (C) 2021 Red Hat, Inc. All Rights Reserved. + * Written by David Howells (dhowells@redhat.com) + * + * for a description of the network filesystem interface declared here. + */ + +#ifndef _LINUX_NETFS_H +#define _LINUX_NETFS_H + +#include + +/* + * Overload PG_private_2 to give us PG_fscache - this is used to indicate that + * a page is currently backed by a local disk cache + */ +#define PageFsCache(page) PagePrivate2((page)) +#define SetPageFsCache(page) SetPagePrivate2((page)) +#define ClearPageFsCache(page) ClearPagePrivate2((page)) +#define TestSetPageFsCache(page) TestSetPagePrivate2((page)) +#define TestClearPageFsCache(page) TestClearPagePrivate2((page)) + +#endif /* _LINUX_NETFS_H */