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 bch2_extent_update(struct btree_trans *,
|
|
|
|
struct bch_inode_info *,
|
|
|
|
struct disk_reservation *,
|
|
|
|
struct quota_res *,
|
|
|
|
struct btree_iter *,
|
|
|
|
struct bkey_i *,
|
|
|
|
u64, bool, bool, s64 *);
|
|
|
|
int bch2_fpunch_at(struct btree_trans *, struct btree_iter *,
|
|
|
|
struct bpos, struct bch_inode_info *, u64);
|
|
|
|
|
|
|
|
int __must_check bch2_write_inode_size(struct bch_fs *,
|
|
|
|
struct bch_inode_info *,
|
|
|
|
loff_t, unsigned);
|
|
|
|
|
2017-03-20 02:56:34 +03:00
|
|
|
int bch2_writepage(struct page *, struct writeback_control *);
|
|
|
|
int bch2_readpage(struct file *, struct page *);
|
|
|
|
|
|
|
|
int bch2_writepages(struct address_space *, struct writeback_control *);
|
|
|
|
int bch2_readpages(struct file *, struct address_space *,
|
|
|
|
struct list_head *, unsigned);
|
|
|
|
|
|
|
|
int bch2_write_begin(struct file *, struct address_space *, loff_t,
|
|
|
|
unsigned, unsigned, struct page **, void **);
|
|
|
|
int bch2_write_end(struct file *, struct address_space *, loff_t,
|
|
|
|
unsigned, unsigned, struct page *, void *);
|
|
|
|
|
|
|
|
ssize_t bch2_direct_IO(struct kiocb *, struct iov_iter *);
|
|
|
|
|
|
|
|
ssize_t bch2_write_iter(struct kiocb *, struct iov_iter *);
|
|
|
|
|
|
|
|
int bch2_fsync(struct file *, loff_t, loff_t, int);
|
|
|
|
|
2017-11-05 01:32:07 +03:00
|
|
|
int bch2_truncate(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-07-10 23:12:15 +03:00
|
|
|
vm_fault_t bch2_page_mkwrite(struct vm_fault *);
|
2017-03-20 02:56:34 +03:00
|
|
|
void bch2_invalidatepage(struct page *, unsigned int, unsigned int);
|
|
|
|
int bch2_releasepage(struct page *, gfp_t);
|
|
|
|
int bch2_migrate_page(struct address_space *, struct page *,
|
|
|
|
struct page *, enum migrate_mode);
|
|
|
|
|
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 */
|