#ifndef _LINUX_NETFS_H
#define _LINUX_NETFS_H
#include <linux/workqueue.h>
#include <linux/fs.h>
#include <linux/pagemap.h>
#include <linux/uio.h>
enum netfs_sreq_ref_trace;
mempool_t;
static inline void folio_start_private_2(struct folio *folio)
{ … }
#define NETFS_BUF_PUT_MARK …
#define NETFS_BUF_PAGECACHE_MARK …
enum netfs_io_source { … } __mode(…);
netfs_io_terminated_t;
struct netfs_inode { … };
struct netfs_group { … };
struct netfs_folio { … };
#define NETFS_FOLIO_INFO …
#define NETFS_FOLIO_COPY_TO_CACHE …
static inline bool netfs_is_folio_info(const void *priv)
{ … }
static inline struct netfs_folio *__netfs_folio_info(const void *priv)
{ … }
static inline struct netfs_folio *netfs_folio_info(struct folio *folio)
{ … }
static inline struct netfs_group *netfs_folio_group(struct folio *folio)
{ … }
struct netfs_io_stream { … };
struct netfs_cache_resources { … };
struct netfs_io_subrequest { … };
enum netfs_io_origin { … } __mode(…);
struct netfs_io_request { … };
struct netfs_request_ops { … };
enum netfs_read_from_hole { … };
struct netfs_cache_ops { … };
ssize_t netfs_unbuffered_read_iter_locked(struct kiocb *iocb, struct iov_iter *iter);
ssize_t netfs_unbuffered_read_iter(struct kiocb *iocb, struct iov_iter *iter);
ssize_t netfs_buffered_read_iter(struct kiocb *iocb, struct iov_iter *iter);
ssize_t netfs_file_read_iter(struct kiocb *iocb, struct iov_iter *iter);
ssize_t netfs_perform_write(struct kiocb *iocb, struct iov_iter *iter,
struct netfs_group *netfs_group);
ssize_t netfs_buffered_write_iter_locked(struct kiocb *iocb, struct iov_iter *from,
struct netfs_group *netfs_group);
ssize_t netfs_unbuffered_write_iter(struct kiocb *iocb, struct iov_iter *from);
ssize_t netfs_unbuffered_write_iter_locked(struct kiocb *iocb, struct iov_iter *iter,
struct netfs_group *netfs_group);
ssize_t netfs_file_write_iter(struct kiocb *iocb, struct iov_iter *from);
struct readahead_control;
void netfs_readahead(struct readahead_control *);
int netfs_read_folio(struct file *, struct folio *);
int netfs_write_begin(struct netfs_inode *, struct file *,
struct address_space *, loff_t pos, unsigned int len,
struct folio **, void **fsdata);
int netfs_writepages(struct address_space *mapping,
struct writeback_control *wbc);
bool netfs_dirty_folio(struct address_space *mapping, struct folio *folio);
int netfs_unpin_writeback(struct inode *inode, struct writeback_control *wbc);
void netfs_clear_inode_writeback(struct inode *inode, const void *aux);
void netfs_invalidate_folio(struct folio *folio, size_t offset, size_t length);
bool netfs_release_folio(struct folio *folio, gfp_t gfp);
vm_fault_t netfs_page_mkwrite(struct vm_fault *vmf, struct netfs_group *netfs_group);
void netfs_subreq_terminated(struct netfs_io_subrequest *, ssize_t, bool);
void netfs_get_subrequest(struct netfs_io_subrequest *subreq,
enum netfs_sreq_ref_trace what);
void netfs_put_subrequest(struct netfs_io_subrequest *subreq,
bool was_async, enum netfs_sreq_ref_trace what);
ssize_t netfs_extract_user_iter(struct iov_iter *orig, size_t orig_len,
struct iov_iter *new,
iov_iter_extraction_t extraction_flags);
size_t netfs_limit_iter(const struct iov_iter *iter, size_t start_offset,
size_t max_size, size_t max_segs);
void netfs_prepare_write_failed(struct netfs_io_subrequest *subreq);
void netfs_write_subrequest_terminated(void *_op, ssize_t transferred_or_error,
bool was_async);
void netfs_queue_write_request(struct netfs_io_subrequest *subreq);
int netfs_start_io_read(struct inode *inode);
void netfs_end_io_read(struct inode *inode);
int netfs_start_io_write(struct inode *inode);
void netfs_end_io_write(struct inode *inode);
int netfs_start_io_direct(struct inode *inode);
void netfs_end_io_direct(struct inode *inode);
static inline struct netfs_inode *netfs_inode(struct inode *inode)
{ … }
static inline void netfs_inode_init(struct netfs_inode *ctx,
const struct netfs_request_ops *ops,
bool use_zero_point)
{ … }
static inline void netfs_resize_file(struct netfs_inode *ctx, loff_t new_i_size,
bool changed_on_server)
{ … }
static inline struct fscache_cookie *netfs_i_cookie(struct netfs_inode *ctx)
{ … }
static inline void netfs_wait_for_outstanding_io(struct inode *inode)
{ … }
#endif