summaryrefslogtreecommitdiff
path: root/libbcachefs/fs.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-09-26 18:19:46 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2021-09-26 19:50:47 -0400
commite61b61c03bf1f1eedc5e2dbd6887f77e45144a31 (patch)
tree2c76026f16805aa1a3e15bab77415b7e7f84131b /libbcachefs/fs.h
parent9942fc82d43baf261342d2550cd22609bf4f81b1 (diff)
Update bcachefs sources to 386f00b639 bcachefs: Snapshot creation, deletion
Diffstat (limited to 'libbcachefs/fs.h')
-rw-r--r--libbcachefs/fs.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/libbcachefs/fs.h b/libbcachefs/fs.h
index 36cc6ba2..48fc504e 100644
--- a/libbcachefs/fs.h
+++ b/libbcachefs/fs.h
@@ -45,10 +45,20 @@ struct bch_inode_info {
struct mutex ei_quota_lock;
struct bch_qid ei_qid;
+ u32 ei_subvol;
+
/* copy of inode in btree: */
struct bch_inode_unpacked ei_inode;
};
+static inline subvol_inum inode_inum(struct bch_inode_info *inode)
+{
+ return (subvol_inum) {
+ .subvol = inode->ei_subvol,
+ .inum = inode->ei_inode.bi_inum,
+ };
+}
+
/*
* Set if we've gotten a btree error for this inode, and thus the vfs inode and
* btree inode may be inconsistent:
@@ -135,6 +145,10 @@ struct bch_inode_unpacked;
#ifndef NO_BCACHEFS_FS
+struct bch_inode_info *
+__bch2_create(struct user_namespace *, struct bch_inode_info *,
+ struct dentry *, umode_t, dev_t, subvol_inum, unsigned);
+
int bch2_fs_quota_transfer(struct bch_fs *,
struct bch_inode_info *,
struct bch_qid,
@@ -154,7 +168,7 @@ static inline int bch2_set_projid(struct bch_fs *c,
KEY_TYPE_QUOTA_PREALLOC);
}
-struct inode *bch2_vfs_inode_get(struct bch_fs *, u64);
+struct inode *bch2_vfs_inode_get(struct bch_fs *, subvol_inum);
/* returns 0 if we want to do the update, or error is passed up */
typedef int (*inode_set_fn)(struct bch_inode_info *,
@@ -170,6 +184,7 @@ int __must_check bch2_write_inode(struct bch_fs *, struct bch_inode_info *,
int bch2_setattr_nonsize(struct user_namespace *,
struct bch_inode_info *,
struct iattr *);
+int __bch2_unlink(struct inode *, struct dentry *, int);
void bch2_vfs_exit(void);
int bch2_vfs_init(void);