2019-07-10 23:12:15 +03:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2017-10-06 01:41:44 +03:00
|
|
|
#ifndef _BCACHEFS_FS_IO_H
|
|
|
|
#define _BCACHEFS_FS_IO_H
|
2017-03-20 02:56:34 +03:00
|
|
|
|
2017-12-14 00:01:18 +03:00
|
|
|
#ifndef NO_BCACHEFS_FS
|
|
|
|
|
2017-03-20 02:56:34 +03:00
|
|
|
#include "buckets.h"
|
2017-12-14 00:01:18 +03:00
|
|
|
#include "io_types.h"
|
|
|
|
|
2017-03-20 02:56:34 +03:00
|
|
|
#include <linux/uio.h>
|
|
|
|
|
2019-08-21 20:17:42 +03:00
|
|
|
struct quota_res;
|
|
|
|
|
|
|
|
int __must_check bch2_write_inode_size(struct bch_fs *,
|
|
|
|
struct bch_inode_info *,
|
|
|
|
loff_t, unsigned);
|
|
|
|
|
2022-08-11 03:28:55 +03:00
|
|
|
int bch2_read_folio(struct file *, struct folio *);
|
2017-03-20 02:56:34 +03:00
|
|
|
|
|
|
|
int bch2_writepages(struct address_space *, struct writeback_control *);
|
2020-11-07 19:26:00 +03:00
|
|
|
void bch2_readahead(struct readahead_control *);
|
2017-03-20 02:56:34 +03:00
|
|
|
|
|
|
|
int bch2_write_begin(struct file *, struct address_space *, loff_t,
|
2022-08-11 03:28:55 +03:00
|
|
|
unsigned, struct page **, void **);
|
2017-03-20 02:56:34 +03:00
|
|
|
int bch2_write_end(struct file *, struct address_space *, loff_t,
|
|
|
|
unsigned, unsigned, struct page *, void *);
|
|
|
|
|
2019-11-10 06:49:03 +03:00
|
|
|
ssize_t bch2_read_iter(struct kiocb *, struct iov_iter *);
|
2017-03-20 02:56:34 +03:00
|
|
|
ssize_t bch2_write_iter(struct kiocb *, struct iov_iter *);
|
|
|
|
|
|
|
|
int bch2_fsync(struct file *, loff_t, loff_t, int);
|
|
|
|
|
2021-06-23 03:45:30 +03:00
|
|
|
int bch2_truncate(struct user_namespace *,
|
|
|
|
struct bch_inode_info *, struct iattr *);
|
2017-03-20 02:56:34 +03:00
|
|
|
long bch2_fallocate_dispatch(struct file *, int, loff_t, loff_t);
|
|
|
|
|
2019-08-21 20:17:42 +03:00
|
|
|
loff_t bch2_remap_file_range(struct file *, loff_t, struct file *,
|
|
|
|
loff_t, loff_t, unsigned);
|
|
|
|
|
2017-03-20 02:56:34 +03:00
|
|
|
loff_t bch2_llseek(struct file *, loff_t, int);
|
|
|
|
|
2019-11-10 06:49:03 +03:00
|
|
|
vm_fault_t bch2_page_fault(struct vm_fault *);
|
2019-07-10 23:12:15 +03:00
|
|
|
vm_fault_t bch2_page_mkwrite(struct vm_fault *);
|
2022-05-31 05:36:00 +03:00
|
|
|
void bch2_invalidate_folio(struct folio *, size_t, size_t);
|
2022-08-11 03:28:55 +03:00
|
|
|
bool bch2_release_folio(struct folio *, gfp_t);
|
2017-03-20 02:56:34 +03:00
|
|
|
|
2017-12-14 00:01:18 +03:00
|
|
|
void bch2_fs_fsio_exit(struct bch_fs *);
|
|
|
|
int bch2_fs_fsio_init(struct bch_fs *);
|
|
|
|
#else
|
|
|
|
static inline void bch2_fs_fsio_exit(struct bch_fs *c) {}
|
|
|
|
static inline int bch2_fs_fsio_init(struct bch_fs *c) { return 0; }
|
|
|
|
#endif
|
2017-03-20 02:56:34 +03:00
|
|
|
|
2017-10-06 01:41:44 +03:00
|
|
|
#endif /* _BCACHEFS_FS_IO_H */
|