]> git.sesse.net Git - bcachefs-tools-debian/blob - libbcachefs/fs-io.h
check if fs is mounted before running fsck
[bcachefs-tools-debian] / libbcachefs / fs-io.h
1 #ifndef _BCACHEFS_FS_IO_H
2 #define _BCACHEFS_FS_IO_H
3
4 #ifndef NO_BCACHEFS_FS
5
6 #include "buckets.h"
7 #include "io_types.h"
8
9 #include <linux/uio.h>
10
11 int bch2_set_page_dirty(struct page *);
12
13 int bch2_writepage(struct page *, struct writeback_control *);
14 int bch2_readpage(struct file *, struct page *);
15
16 int bch2_writepages(struct address_space *, struct writeback_control *);
17 int bch2_readpages(struct file *, struct address_space *,
18                    struct list_head *, unsigned);
19
20 int bch2_write_begin(struct file *, struct address_space *, loff_t,
21                      unsigned, unsigned, struct page **, void **);
22 int bch2_write_end(struct file *, struct address_space *, loff_t,
23                    unsigned, unsigned, struct page *, void *);
24
25 ssize_t bch2_direct_IO(struct kiocb *, struct iov_iter *);
26
27 ssize_t bch2_write_iter(struct kiocb *, struct iov_iter *);
28
29 int bch2_fsync(struct file *, loff_t, loff_t, int);
30
31 int bch2_truncate(struct bch_inode_info *, struct iattr *);
32 long bch2_fallocate_dispatch(struct file *, int, loff_t, loff_t);
33
34 loff_t bch2_llseek(struct file *, loff_t, int);
35
36 int bch2_page_mkwrite(struct vm_fault *);
37 void bch2_invalidatepage(struct page *, unsigned int, unsigned int);
38 int bch2_releasepage(struct page *, gfp_t);
39 int bch2_migrate_page(struct address_space *, struct page *,
40                       struct page *, enum migrate_mode);
41
42 void bch2_fs_fsio_exit(struct bch_fs *);
43 int bch2_fs_fsio_init(struct bch_fs *);
44 #else
45 static inline void bch2_fs_fsio_exit(struct bch_fs *c) {}
46 static inline int bch2_fs_fsio_init(struct bch_fs *c) { return 0; }
47 #endif
48
49 #endif /* _BCACHEFS_FS_IO_H */