Skip to content

Commit

Permalink
netfs: Add a hook to allow tell the netfs to update its i_size
Browse files Browse the repository at this point in the history
Add a hook for netfslib's write helpers to call to tell the network
filesystem that it should update its i_size.

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
cc: linux-cachefs@redhat.com
cc: linux-fsdevel@vger.kernel.org
cc: linux-mm@kvack.org
  • Loading branch information
David Howells committed Dec 28, 2023
1 parent 16af134 commit c6dc54d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/linux/netfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,17 @@ struct netfs_request_ops {
void (*free_request)(struct netfs_io_request *rreq);
void (*free_subrequest)(struct netfs_io_subrequest *rreq);

/* Read request handling */
void (*expand_readahead)(struct netfs_io_request *rreq);
bool (*clamp_length)(struct netfs_io_subrequest *subreq);
void (*issue_read)(struct netfs_io_subrequest *subreq);
bool (*is_still_valid)(struct netfs_io_request *rreq);
int (*check_write_begin)(struct file *file, loff_t pos, unsigned len,
struct folio **foliop, void **_fsdata);
void (*done)(struct netfs_io_request *rreq);

/* Modification handling */
void (*update_i_size)(struct inode *inode, loff_t i_size);
};

/*
Expand Down

0 comments on commit c6dc54d

Please sign in to comment.