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
c6c4ff65
Commit
c6c4ff65
authored
Jan 21, 2024
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: subvolume_format.h
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
8fed323b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
32 deletions
+36
-32
fs/bcachefs/bcachefs_format.h
fs/bcachefs/bcachefs_format.h
+1
-32
fs/bcachefs/subvolume_format.h
fs/bcachefs/subvolume_format.h
+35
-0
No files found.
fs/bcachefs/bcachefs_format.h
View file @
c6c4ff65
...
...
@@ -773,38 +773,6 @@ struct bch_inline_data {
u8
data
[];
};
/* Subvolumes: */
#define SUBVOL_POS_MIN POS(0, 1)
#define SUBVOL_POS_MAX POS(0, S32_MAX)
#define BCACHEFS_ROOT_SUBVOL 1
struct
bch_subvolume
{
struct
bch_val
v
;
__le32
flags
;
__le32
snapshot
;
__le64
inode
;
/*
* Snapshot subvolumes form a tree, separate from the snapshot nodes
* tree - if this subvolume is a snapshot, this is the ID of the
* subvolume it was created from:
*
* This is _not_ necessarily the subvolume of the directory containing
* this subvolume:
*/
__le32
parent
;
__le32
pad
;
bch_le128
otime
;
};
LE32_BITMASK
(
BCH_SUBVOLUME_RO
,
struct
bch_subvolume
,
flags
,
0
,
1
)
/*
* We need to know whether a subvolume is a snapshot so we can know whether we
* can delete it (or whether it should just be rm -rf'd)
*/
LE32_BITMASK
(
BCH_SUBVOLUME_SNAP
,
struct
bch_subvolume
,
flags
,
1
,
2
)
LE32_BITMASK
(
BCH_SUBVOLUME_UNLINKED
,
struct
bch_subvolume
,
flags
,
2
,
3
)
/* LRU btree: */
struct
bch_lru
{
...
...
@@ -872,6 +840,7 @@ struct bch_sb_field {
#include "xattr_format.h"
#include "quota_format.h"
#include "snapshot_format.h"
#include "subvolume_format.h"
#include "sb-counters_format.h"
enum
bch_sb_field_type
{
...
...
fs/bcachefs/subvolume_format.h
0 → 100644
View file @
c6c4ff65
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _BCACHEFS_SUBVOLUME_FORMAT_H
#define _BCACHEFS_SUBVOLUME_FORMAT_H
#define SUBVOL_POS_MIN POS(0, 1)
#define SUBVOL_POS_MAX POS(0, S32_MAX)
#define BCACHEFS_ROOT_SUBVOL 1
struct
bch_subvolume
{
struct
bch_val
v
;
__le32
flags
;
__le32
snapshot
;
__le64
inode
;
/*
* Snapshot subvolumes form a tree, separate from the snapshot nodes
* tree - if this subvolume is a snapshot, this is the ID of the
* subvolume it was created from:
*
* This is _not_ necessarily the subvolume of the directory containing
* this subvolume:
*/
__le32
parent
;
__le32
pad
;
bch_le128
otime
;
};
LE32_BITMASK
(
BCH_SUBVOLUME_RO
,
struct
bch_subvolume
,
flags
,
0
,
1
)
/*
* We need to know whether a subvolume is a snapshot so we can know whether we
* can delete it (or whether it should just be rm -rf'd)
*/
LE32_BITMASK
(
BCH_SUBVOLUME_SNAP
,
struct
bch_subvolume
,
flags
,
1
,
2
)
LE32_BITMASK
(
BCH_SUBVOLUME_UNLINKED
,
struct
bch_subvolume
,
flags
,
2
,
3
)
#endif
/* _BCACHEFS_SUBVOLUME_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