subvolume.h (a10195764901e0a41e64d596de57a957e7f982f0) subvolume.h (facafdcbc157686311dbe58649ef9d29fcf8e610)
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _BCACHEFS_SUBVOLUME_H
3#define _BCACHEFS_SUBVOLUME_H
4
5#include "darray.h"
6#include "subvolume_types.h"
7
8void bch2_snapshot_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c);
9int bch2_snapshot_invalid(const struct bch_fs *, struct bkey_s_c,
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _BCACHEFS_SUBVOLUME_H
3#define _BCACHEFS_SUBVOLUME_H
4
5#include "darray.h"
6#include "subvolume_types.h"
7
8void bch2_snapshot_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c);
9int bch2_snapshot_invalid(const struct bch_fs *, struct bkey_s_c,
10 int rw, struct printbuf *);
10 unsigned, struct printbuf *);
11
12#define bch2_bkey_ops_snapshot ((struct bkey_ops) { \
13 .key_invalid = bch2_snapshot_invalid, \
14 .val_to_text = bch2_snapshot_to_text, \
15})
16
17int bch2_mark_snapshot(struct btree_trans *, struct bkey_s_c,
18 struct bkey_s_c, unsigned);

--- 82 unchanged lines hidden (view full) ---

101
102int bch2_fs_check_snapshots(struct bch_fs *);
103int bch2_fs_check_subvols(struct bch_fs *);
104
105void bch2_fs_snapshots_exit(struct bch_fs *);
106int bch2_fs_snapshots_start(struct bch_fs *);
107
108int bch2_subvolume_invalid(const struct bch_fs *, struct bkey_s_c,
11
12#define bch2_bkey_ops_snapshot ((struct bkey_ops) { \
13 .key_invalid = bch2_snapshot_invalid, \
14 .val_to_text = bch2_snapshot_to_text, \
15})
16
17int bch2_mark_snapshot(struct btree_trans *, struct bkey_s_c,
18 struct bkey_s_c, unsigned);

--- 82 unchanged lines hidden (view full) ---

101
102int bch2_fs_check_snapshots(struct bch_fs *);
103int bch2_fs_check_subvols(struct bch_fs *);
104
105void bch2_fs_snapshots_exit(struct bch_fs *);
106int bch2_fs_snapshots_start(struct bch_fs *);
107
108int bch2_subvolume_invalid(const struct bch_fs *, struct bkey_s_c,
109 int rw, struct printbuf *);
109 unsigned, struct printbuf *);
110void bch2_subvolume_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c);
111
112#define bch2_bkey_ops_subvolume ((struct bkey_ops) { \
113 .key_invalid = bch2_subvolume_invalid, \
114 .val_to_text = bch2_subvolume_to_text, \
115})
116
117int bch2_subvolume_get(struct btree_trans *, unsigned,

--- 20 unchanged lines hidden ---
110void bch2_subvolume_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c);
111
112#define bch2_bkey_ops_subvolume ((struct bkey_ops) { \
113 .key_invalid = bch2_subvolume_invalid, \
114 .val_to_text = bch2_subvolume_to_text, \
115})
116
117int bch2_subvolume_get(struct btree_trans *, unsigned,

--- 20 unchanged lines hidden ---