From: Jingbo Xu <jefflexu@linux.alibaba.com>
To: dhowells@redhat.com, jlayton@kernel.org,
linux-cachefs@redhat.com, linux-erofs@lists.ozlabs.org
Cc: linux-cifs@vger.kernel.org, linux-nfs@vger.kernel.org,
linux-afs@lists.infradead.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 5/9] fscache,netfs: rename netfs_cache_ops as fscache_ops
Date: Thu, 27 Oct 2022 16:35:43 +0800 [thread overview]
Message-ID: <20221027083547.46933-6-jefflexu@linux.alibaba.com> (raw)
In-Reply-To: <20221027083547.46933-1-jefflexu@linux.alibaba.com>
Rename netfs_cache_ops as fscache_ops to make raw fscache APIs more
neutral independent on libnetfs.
This is a cleanup without logic change.
Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com>
---
fs/cachefiles/io.c | 4 ++--
include/linux/fscache.h | 8 ++++----
include/linux/netfs.h | 4 ++--
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/fs/cachefiles/io.c b/fs/cachefiles/io.c
index 2dce7af0fbcf..ff4d8a309d51 100644
--- a/fs/cachefiles/io.c
+++ b/fs/cachefiles/io.c
@@ -617,7 +617,7 @@ static void cachefiles_end_operation(struct netfs_cache_resources *cres)
fscache_end_cookie_access(fscache_cres_cookie(cres), fscache_access_io_end);
}
-static const struct netfs_cache_ops cachefiles_netfs_cache_ops = {
+static const struct fscache_ops cachefiles_fscache_ops = {
.end_operation = cachefiles_end_operation,
.read = cachefiles_read,
.write = cachefiles_write,
@@ -635,7 +635,7 @@ bool cachefiles_begin_operation(struct netfs_cache_resources *cres,
struct cachefiles_object *object = cachefiles_cres_object(cres);
if (!cachefiles_cres_file(cres)) {
- cres->ops = &cachefiles_netfs_cache_ops;
+ cres->ops = &cachefiles_fscache_ops;
if (object->file) {
spin_lock(&object->lock);
if (!cres->cache_priv2 && object->file)
diff --git a/include/linux/fscache.h b/include/linux/fscache.h
index 80455e00c520..d6546dc714b8 100644
--- a/include/linux/fscache.h
+++ b/include/linux/fscache.h
@@ -423,7 +423,7 @@ void fscache_invalidate(struct fscache_cookie *cookie,
* Returns a pointer to the operations table if usable or NULL if not.
*/
static inline
-const struct netfs_cache_ops *fscache_operation_valid(const struct netfs_cache_resources *cres)
+const struct fscache_ops *fscache_operation_valid(const struct netfs_cache_resources *cres)
{
return fscache_resources_valid(cres) ? cres->ops : NULL;
}
@@ -466,7 +466,7 @@ int fscache_begin_read_operation(struct netfs_cache_resources *cres,
*/
static inline void fscache_end_operation(struct netfs_cache_resources *cres)
{
- const struct netfs_cache_ops *ops = fscache_operation_valid(cres);
+ const struct fscache_ops *ops = fscache_operation_valid(cres);
if (ops)
ops->end_operation(cres);
@@ -511,7 +511,7 @@ int fscache_read(struct netfs_cache_resources *cres,
fscache_io_terminated_t term_func,
void *term_func_priv)
{
- const struct netfs_cache_ops *ops = fscache_operation_valid(cres);
+ const struct fscache_ops *ops = fscache_operation_valid(cres);
return ops->read(cres, start_pos, iter, read_hole,
term_func, term_func_priv);
}
@@ -569,7 +569,7 @@ int fscache_write(struct netfs_cache_resources *cres,
fscache_io_terminated_t term_func,
void *term_func_priv)
{
- const struct netfs_cache_ops *ops = fscache_operation_valid(cres);
+ const struct fscache_ops *ops = fscache_operation_valid(cres);
return ops->write(cres, start_pos, iter, term_func, term_func_priv);
}
diff --git a/include/linux/netfs.h b/include/linux/netfs.h
index 998402e34c00..2ff3a65458a6 100644
--- a/include/linux/netfs.h
+++ b/include/linux/netfs.h
@@ -134,7 +134,7 @@ struct netfs_inode {
* Resources required to do operations on a cache.
*/
struct netfs_cache_resources {
- const struct netfs_cache_ops *ops;
+ const struct fscache_ops *ops;
void *cache_priv;
void *cache_priv2;
unsigned int debug_id; /* Cookie debug ID */
@@ -231,7 +231,7 @@ enum fscache_read_from_hole {
* Table of operations for access to a cache. This is obtained by
* rreq->ops->begin_cache_operation().
*/
-struct netfs_cache_ops {
+struct fscache_ops {
/* End an operation */
void (*end_operation)(struct netfs_cache_resources *cres);
--
2.19.1.6.gb485710b
next prev parent reply other threads:[~2022-10-27 8:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-27 8:35 [PATCH 0/9] fscache,netfs: decouple raw fscache APIs from libnetfs Jingbo Xu
2022-10-27 8:35 ` [PATCH 1/9] fscache: decouple prepare_read() from netfs_io_subrequest Jingbo Xu
2022-10-27 8:35 ` [PATCH 2/9] fscache,netfs: rename netfs_io_source as fscache_io_source Jingbo Xu
2022-10-27 13:04 ` David Howells
2022-10-27 8:35 ` [PATCH 3/9] fscache,netfs: rename netfs_io_terminated_t as fscache_io_terminated_t Jingbo Xu
2022-10-27 13:06 ` David Howells
2022-10-27 8:35 ` [PATCH 4/9] fscache,netfs: rename netfs_read_from_hole as fscache_read_from_hole Jingbo Xu
2022-10-27 13:09 ` David Howells
2022-10-27 8:35 ` Jingbo Xu [this message]
2022-10-27 13:10 ` [PATCH 5/9] fscache,netfs: rename netfs_cache_ops as fscache_ops David Howells
2022-10-27 8:35 ` [PATCH 6/9] fscache,netfs: rename netfs_cache_resources as fscache_resources Jingbo Xu
2022-10-27 13:08 ` David Howells
2022-10-27 8:35 ` [PATCH 7/9] fscache,netfs: define flags for prepare_read() Jingbo Xu
2022-10-27 13:11 ` David Howells
2022-10-27 8:35 ` [PATCH 8/9] fscache,netfs: move PageFsCache() family helpers to fscache.h Jingbo Xu
2022-10-27 13:06 ` David Howells
2022-10-27 8:35 ` [PATCH 9/9] fscache,netfs: move "fscache_" prefixed structures " Jingbo Xu
2022-10-27 13:13 ` David Howells
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221027083547.46933-6-jefflexu@linux.alibaba.com \
--to=jefflexu@linux.alibaba.com \
--cc=dhowells@redhat.com \
--cc=jlayton@kernel.org \
--cc=linux-afs@lists.infradead.org \
--cc=linux-cachefs@redhat.com \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox