Skip to content

Commit f18a378

Browse files
committed
netfs: Finish off rename of netfs_read_request to netfs_io_request
Adjust helper function names and comments after mass rename of struct netfs_read_*request to struct netfs_io_*request. Changes ======= ver #2) - Make the changes in the docs also. Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> cc: linux-cachefs@redhat.com Link: https://lore.kernel.org/r/164622992433.3564931.6684311087845150271.stgit@warthog.procyon.org.uk/ # v1 Link: https://lore.kernel.org/r/164678196111.1200972.5001114956865989528.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/164692892567.2099075.13895804222087028813.stgit@warthog.procyon.org.uk/ # v3
1 parent 6a19114 commit f18a378

7 files changed

Lines changed: 65 additions & 64 deletions

File tree

Documentation/filesystems/netfs_library.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ through which it can issue requests and negotiate::
250250
int (*begin_cache_operation)(struct netfs_io_request *rreq);
251251
void (*expand_readahead)(struct netfs_io_request *rreq);
252252
bool (*clamp_length)(struct netfs_io_subrequest *subreq);
253-
void (*issue_op)(struct netfs_io_subrequest *subreq);
253+
void (*issue_read)(struct netfs_io_subrequest *subreq);
254254
bool (*is_still_valid)(struct netfs_io_request *rreq);
255255
int (*check_write_begin)(struct file *file, loff_t pos, unsigned len,
256256
struct folio *folio, void **_fsdata);
@@ -305,7 +305,7 @@ The operations are as follows:
305305

306306
This should return 0 on success and an error code on error.
307307

308-
* ``issue_op()``
308+
* ``issue_read()``
309309

310310
[Required] The helpers use this to dispatch a subrequest to the server for
311311
reading. In the subrequest, ->start, ->len and ->transferred indicate what

fs/9p/vfs_addr.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
#include "fid.h"
2929

3030
/**
31-
* v9fs_req_issue_op - Issue a read from 9P
31+
* v9fs_issue_read - Issue a read from 9P
3232
* @subreq: The read to make
3333
*/
34-
static void v9fs_req_issue_op(struct netfs_io_subrequest *subreq)
34+
static void v9fs_issue_read(struct netfs_io_subrequest *subreq)
3535
{
3636
struct netfs_io_request *rreq = subreq->rreq;
3737
struct p9_fid *fid = rreq->netfs_priv;
@@ -106,7 +106,7 @@ static const struct netfs_request_ops v9fs_req_ops = {
106106
.init_request = v9fs_init_request,
107107
.is_cache_enabled = v9fs_is_cache_enabled,
108108
.begin_cache_operation = v9fs_begin_cache_operation,
109-
.issue_op = v9fs_req_issue_op,
109+
.issue_read = v9fs_issue_read,
110110
.cleanup = v9fs_req_cleanup,
111111
};
112112

fs/afs/file.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ int afs_fetch_data(struct afs_vnode *vnode, struct afs_read *req)
310310
return afs_do_sync_operation(op);
311311
}
312312

313-
static void afs_req_issue_op(struct netfs_io_subrequest *subreq)
313+
static void afs_issue_read(struct netfs_io_subrequest *subreq)
314314
{
315315
struct afs_vnode *vnode = AFS_FS_I(subreq->rreq->inode);
316316
struct afs_read *fsreq;
@@ -401,7 +401,7 @@ const struct netfs_request_ops afs_req_ops = {
401401
.is_cache_enabled = afs_is_cache_enabled,
402402
.begin_cache_operation = afs_begin_cache_operation,
403403
.check_write_begin = afs_check_write_begin,
404-
.issue_op = afs_req_issue_op,
404+
.issue_read = afs_issue_read,
405405
.cleanup = afs_priv_cleanup,
406406
};
407407

fs/cachefiles/io.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ static enum netfs_io_source cachefiles_prepare_read(struct netfs_io_subrequest *
406406
}
407407

408408
if (test_bit(FSCACHE_COOKIE_NO_DATA_TO_READ, &cookie->flags)) {
409-
__set_bit(NETFS_SREQ_WRITE_TO_CACHE, &subreq->flags);
409+
__set_bit(NETFS_SREQ_COPY_TO_CACHE, &subreq->flags);
410410
why = cachefiles_trace_read_no_data;
411411
goto out_no_object;
412412
}
@@ -475,7 +475,7 @@ static enum netfs_io_source cachefiles_prepare_read(struct netfs_io_subrequest *
475475
goto out;
476476

477477
download_and_store:
478-
__set_bit(NETFS_SREQ_WRITE_TO_CACHE, &subreq->flags);
478+
__set_bit(NETFS_SREQ_COPY_TO_CACHE, &subreq->flags);
479479
out:
480480
cachefiles_end_secure(cache, saved_cred);
481481
out_no_object:

fs/ceph/addr.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ static bool ceph_netfs_issue_op_inline(struct netfs_io_subrequest *subreq)
259259
size_t len;
260260

261261
__set_bit(NETFS_SREQ_CLEAR_TAIL, &subreq->flags);
262-
__clear_bit(NETFS_SREQ_WRITE_TO_CACHE, &subreq->flags);
262+
__clear_bit(NETFS_SREQ_COPY_TO_CACHE, &subreq->flags);
263263

264264
if (subreq->start >= inode->i_size)
265265
goto out;
@@ -298,7 +298,7 @@ static bool ceph_netfs_issue_op_inline(struct netfs_io_subrequest *subreq)
298298
return true;
299299
}
300300

301-
static void ceph_netfs_issue_op(struct netfs_io_subrequest *subreq)
301+
static void ceph_netfs_issue_read(struct netfs_io_subrequest *subreq)
302302
{
303303
struct netfs_io_request *rreq = subreq->rreq;
304304
struct inode *inode = rreq->inode;
@@ -367,7 +367,7 @@ static void ceph_readahead_cleanup(struct address_space *mapping, void *priv)
367367
static const struct netfs_request_ops ceph_netfs_read_ops = {
368368
.is_cache_enabled = ceph_is_cache_enabled,
369369
.begin_cache_operation = ceph_begin_cache_operation,
370-
.issue_op = ceph_netfs_issue_op,
370+
.issue_read = ceph_netfs_issue_read,
371371
.expand_readahead = ceph_netfs_expand_readahead,
372372
.clamp_length = ceph_netfs_clamp_length,
373373
.check_write_begin = ceph_netfs_check_write_begin,

0 commit comments

Comments
 (0)