Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
8fed323b
Commit
8fed323b
authored
Jan 21, 2024
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: snapshot_format.h
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
d455179f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
33 deletions
+37
-33
fs/bcachefs/bcachefs_format.h
fs/bcachefs/bcachefs_format.h
+1
-33
fs/bcachefs/snapshot_format.h
fs/bcachefs/snapshot_format.h
+36
-0
No files found.
fs/bcachefs/bcachefs_format.h
View file @
8fed323b
...
...
@@ -805,39 +805,6 @@ LE32_BITMASK(BCH_SUBVOLUME_RO, struct bch_subvolume, flags, 0, 1)
LE32_BITMASK
(
BCH_SUBVOLUME_SNAP
,
struct
bch_subvolume
,
flags
,
1
,
2
)
LE32_BITMASK
(
BCH_SUBVOLUME_UNLINKED
,
struct
bch_subvolume
,
flags
,
2
,
3
)
/* Snapshots */
struct
bch_snapshot
{
struct
bch_val
v
;
__le32
flags
;
__le32
parent
;
__le32
children
[
2
];
__le32
subvol
;
/* corresponds to a bch_snapshot_tree in BTREE_ID_snapshot_trees */
__le32
tree
;
__le32
depth
;
__le32
skip
[
3
];
bch_le128
btime
;
};
LE32_BITMASK
(
BCH_SNAPSHOT_DELETED
,
struct
bch_snapshot
,
flags
,
0
,
1
)
/* True if a subvolume points to this snapshot node: */
LE32_BITMASK
(
BCH_SNAPSHOT_SUBVOL
,
struct
bch_snapshot
,
flags
,
1
,
2
)
/*
* Snapshot trees:
*
* The snapshot_trees btree gives us persistent indentifier for each tree of
* bch_snapshot nodes, and allow us to record and easily find the root/master
* subvolume that other snapshots were created from:
*/
struct
bch_snapshot_tree
{
struct
bch_val
v
;
__le32
master_subvol
;
__le32
root_snapshot
;
};
/* LRU btree: */
struct
bch_lru
{
...
...
@@ -904,6 +871,7 @@ struct bch_sb_field {
#include "dirent_format.h"
#include "xattr_format.h"
#include "quota_format.h"
#include "snapshot_format.h"
#include "sb-counters_format.h"
enum
bch_sb_field_type
{
...
...
fs/bcachefs/snapshot_format.h
0 → 100644
View file @
8fed323b
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _BCACHEFS_SNAPSHOT_FORMAT_H
#define _BCACHEFS_SNAPSHOT_FORMAT_H
struct
bch_snapshot
{
struct
bch_val
v
;
__le32
flags
;
__le32
parent
;
__le32
children
[
2
];
__le32
subvol
;
/* corresponds to a bch_snapshot_tree in BTREE_ID_snapshot_trees */
__le32
tree
;
__le32
depth
;
__le32
skip
[
3
];
bch_le128
btime
;
};
LE32_BITMASK
(
BCH_SNAPSHOT_DELETED
,
struct
bch_snapshot
,
flags
,
0
,
1
)
/* True if a subvolume points to this snapshot node: */
LE32_BITMASK
(
BCH_SNAPSHOT_SUBVOL
,
struct
bch_snapshot
,
flags
,
1
,
2
)
/*
* Snapshot trees:
*
* The snapshot_trees btree gives us persistent indentifier for each tree of
* bch_snapshot nodes, and allow us to record and easily find the root/master
* subvolume that other snapshots were created from:
*/
struct
bch_snapshot_tree
{
struct
bch_val
v
;
__le32
master_subvol
;
__le32
root_snapshot
;
};
#endif
/* _BCACHEFS_SNAPSHOT_FORMAT_H */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment