]> git.sesse.net Git - bcachefs-tools-debian/blob - libbcachefs/fs-io.h
Update bcachefs sources to b1a4dc53be bcachefs: Set lost+found mode to 0700
[bcachefs-tools-debian] / libbcachefs / fs-io.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _BCACHEFS_FS_IO_H
3 #define _BCACHEFS_FS_IO_H
4
5 #ifndef NO_BCACHEFS_FS
6
7 #include "buckets.h"
8 #include "io_types.h"
9
10 #include <linux/uio.h>
11
12 struct quota_res;
13
14 int __must_check bch2_write_inode_size(struct bch_fs *,
15                                        struct bch_inode_info *,
16                                        loff_t, unsigned);
17
18 int bch2_writepage(struct page *, struct writeback_control *);
19 int bch2_readpage(struct file *, struct page *);
20
21 int bch2_writepages(struct address_space *, struct writeback_control *);
22 int bch2_readpages(struct file *, struct address_space *,
23                    struct list_head *, unsigned);
24
25 int bch2_write_begin(struct file *, struct address_space *, loff_t,
26                      unsigned, unsigned, struct page **, void **);
27 int bch2_write_end(struct file *, struct address_space *, loff_t,
28                    unsigned, unsigned, struct page *, void *);
29
30 ssize_t bch2_read_iter(struct kiocb *, struct iov_iter *);
31 ssize_t bch2_write_iter(struct kiocb *, struct iov_iter *);
32
33 int bch2_fsync(struct file *, loff_t, loff_t, int);
34
35 int bch2_truncate(struct bch_inode_info *, struct iattr *);
36 long bch2_fallocate_dispatch(struct file *, int, loff_t, loff_t);
37
38 loff_t bch2_remap_file_range(struct file *, loff_t, struct file *,
39                              loff_t, loff_t, unsigned);
40
41 loff_t bch2_llseek(struct file *, loff_t, int);
42
43 vm_fault_t bch2_page_fault(struct vm_fault *);
44 vm_fault_t bch2_page_mkwrite(struct vm_fault *);
45 void bch2_invalidatepage(struct page *, unsigned int, unsigned int);
46 int bch2_releasepage(struct page *, gfp_t);
47 int bch2_migrate_page(struct address_space *, struct page *,
48                       struct page *, enum migrate_mode);
49
50 void bch2_fs_fsio_exit(struct bch_fs *);
51 int bch2_fs_fsio_init(struct bch_fs *);
52 #else
53 static inline void bch2_fs_fsio_exit(struct bch_fs *c) {}
54 static inline int bch2_fs_fsio_init(struct bch_fs *c) { return 0; }
55 #endif
56
57 #endif /* _BCACHEFS_FS_IO_H */