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
d42dd4ad
Commit
d42dd4ad
authored
Dec 13, 2018
by
Kent Overstreet
Committed by
Kent Overstreet
Oct 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: merge BCH_INODE_FIELDS_INHERIT/BCH_INODE_OPTS
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
a3e70fb2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
23 deletions
+17
-23
fs/bcachefs/bcachefs_format.h
fs/bcachefs/bcachefs_format.h
+11
-10
fs/bcachefs/inode.c
fs/bcachefs/inode.c
+2
-2
fs/bcachefs/opts.h
fs/bcachefs/opts.h
+4
-11
No files found.
fs/bcachefs/bcachefs_format.h
View file @
d42dd4ad
...
...
@@ -716,16 +716,17 @@ struct bch_inode_generation {
x(bi_background_target, 16) \
x(bi_erasure_code, 16)
#define BCH_INODE_FIELDS_INHERIT() \
x(bi_data_checksum) \
x(bi_compression) \
x(bi_project) \
x(bi_background_compression) \
x(bi_data_replicas) \
x(bi_promote_target) \
x(bi_foreground_target) \
x(bi_background_target) \
x(bi_erasure_code)
/* subset of BCH_INODE_FIELDS */
#define BCH_INODE_OPTS() \
x(data_checksum, 8) \
x(compression, 8) \
x(project, 32) \
x(background_compression, 8) \
x(data_replicas, 8) \
x(promote_target, 16) \
x(foreground_target, 16) \
x(background_target, 16) \
x(erasure_code, 16)
enum
{
/*
...
...
fs/bcachefs/inode.c
View file @
d42dd4ad
...
...
@@ -265,8 +265,8 @@ void bch2_inode_init(struct bch_fs *c, struct bch_inode_unpacked *inode_u,
inode_u
->
bi_otime
=
now
;
if
(
parent
)
{
#define x(_name
) inode_u->_name = parent->
_name;
BCH_INODE_
FIELDS_INHERIT
()
#define x(_name
, ...) inode_u->bi_##_name = parent->bi_##
_name;
BCH_INODE_
OPTS
()
#undef x
}
}
...
...
fs/bcachefs/opts.h
View file @
d42dd4ad
...
...
@@ -188,7 +188,10 @@ enum opt_type {
NO_SB_OPT, false) \
BCH_OPT(version_upgrade, u8, OPT_MOUNT, \
OPT_BOOL(), \
NO_SB_OPT, false)
NO_SB_OPT, false) \
BCH_OPT(project, u8, OPT_INTERNAL, \
OPT_BOOL(), \
NO_SB_OPT, false) \
struct
bch_opts
{
#define BCH_OPT(_name, _bits, ...) unsigned _name##_defined:1;
...
...
@@ -281,16 +284,6 @@ int bch2_parse_mount_opts(struct bch_opts *, char *);
/* inode opts: */
#define BCH_INODE_OPTS() \
x(data_checksum, 8) \
x(compression, 8) \
x(background_compression, 8) \
x(data_replicas, 8) \
x(promote_target, 16) \
x(foreground_target, 16) \
x(background_target, 16) \
x(erasure_code, 16)
struct
bch_io_opts
{
#define x(_name, _bits) unsigned _name##_defined:1;
BCH_INODE_OPTS
()
...
...
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