summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/subvolume.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-10-28 22:24:39 +0200
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 23:09:15 +0200
commit41f9b7d39fb11c9f306809681bb6991ac96f9b2e (patch)
tree7d5ca41936a26cee5f184f822cadb75c928e8ad1 /fs/bcachefs/subvolume.h
parentbcachefs: Don't do upgrades in nochanges mode (diff)
downloadlinux-41f9b7d39fb11c9f306809681bb6991ac96f9b2e.tar.xz
linux-41f9b7d39fb11c9f306809681bb6991ac96f9b2e.zip
bcachefs: Move bch2_evict_subvolume_inodes() to fs.c
This fixes building in userspace - code that's coupled to the kernel VFS interface should live in fs.c Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/subvolume.h')
-rw-r--r--fs/bcachefs/subvolume.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/bcachefs/subvolume.h b/fs/bcachefs/subvolume.h
index 45234c9de0f6..b5067dc68fc7 100644
--- a/fs/bcachefs/subvolume.h
+++ b/fs/bcachefs/subvolume.h
@@ -94,6 +94,16 @@ static inline int snapshots_seen_add(struct bch_fs *c, struct snapshots_seen *s,
return 0;
}
+static inline bool snapshot_list_has_id(struct snapshot_id_list *s, u32 id)
+{
+ unsigned i;
+
+ for (i = 0; i < s->nr; i++)
+ if (id == s->d[i])
+ return true;
+ return false;
+}
+
int bch2_fs_snapshots_check(struct bch_fs *);
void bch2_fs_snapshots_exit(struct bch_fs *);
int bch2_fs_snapshots_start(struct bch_fs *);