printf: Remove unused 'bprintf'
[drm/drm-misc.git] / fs / bcachefs / subvolume_format.h
blobe029df7ba89f5244b65c99d021252d753207d3bd
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _BCACHEFS_SUBVOLUME_FORMAT_H
3 #define _BCACHEFS_SUBVOLUME_FORMAT_H
5 #define SUBVOL_POS_MIN POS(0, 1)
6 #define SUBVOL_POS_MAX POS(0, S32_MAX)
7 #define BCACHEFS_ROOT_SUBVOL 1
9 struct bch_subvolume {
10 struct bch_val v;
11 __le32 flags;
12 __le32 snapshot;
13 __le64 inode;
15 * Snapshot subvolumes form a tree, separate from the snapshot nodes
16 * tree - if this subvolume is a snapshot, this is the ID of the
17 * subvolume it was created from:
19 * This is _not_ necessarily the subvolume of the directory containing
20 * this subvolume:
22 __le32 creation_parent;
23 __le32 fs_path_parent;
24 bch_le128 otime;
27 LE32_BITMASK(BCH_SUBVOLUME_RO, struct bch_subvolume, flags, 0, 1)
29 * We need to know whether a subvolume is a snapshot so we can know whether we
30 * can delete it (or whether it should just be rm -rf'd)
32 LE32_BITMASK(BCH_SUBVOLUME_SNAP, struct bch_subvolume, flags, 1, 2)
33 LE32_BITMASK(BCH_SUBVOLUME_UNLINKED, struct bch_subvolume, flags, 2, 3)
35 #endif /* _BCACHEFS_SUBVOLUME_FORMAT_H */