summaryrefslogtreecommitdiff
path: root/fs/bcachefs/inode.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-10-09 12:50:39 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:29 -0400
commit9a3df993e15e0d44974d6ac7c5749c7028aa9e3c (patch)
tree40cf826c4c05f8b89e7c052db210d5289546b4ee /fs/bcachefs/inode.h
parent2e87eae1fb7a61e72d98af9c0ef8cbaad1a6d497 (diff)
bcachefs: Kill bchfs_extent_update()
The generic IO path now handles inode updates for i_size and i_sectors - this means we can drop a fair amount of code from fs-io.c. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/inode.h')
-rw-r--r--fs/bcachefs/inode.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/bcachefs/inode.h b/fs/bcachefs/inode.h
index b32c0a47c25d..bb759a46dc41 100644
--- a/fs/bcachefs/inode.h
+++ b/fs/bcachefs/inode.h
@@ -111,6 +111,15 @@ static inline u64 bch2_inode_opt_get(struct bch_inode_unpacked *inode,
}
}
+static inline struct bch_io_opts
+io_opts(struct bch_fs *c, struct bch_inode_unpacked *inode)
+{
+ struct bch_io_opts opts = bch2_opts_to_inode_opts(c->opts);
+
+ bch2_io_opts_apply(&opts, bch2_inode_opts_get(inode));
+ return opts;
+}
+
static inline u8 mode_to_type(umode_t mode)
{
return (mode >> 12) & 15;