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
8f52316c
Commit
8f52316c
authored
Aug 02, 2019
by
David Sterba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
btrfs: sysfs: move type conversion helpers to sysfs.c
Signed-off-by:
David Sterba
<
dsterba@suse.com
>
parent
67715b20
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
18 deletions
+16
-18
fs/btrfs/sysfs.c
fs/btrfs/sysfs.c
+16
-0
fs/btrfs/sysfs.h
fs/btrfs/sysfs.h
+0
-18
No files found.
fs/btrfs/sysfs.c
View file @
8f52316c
...
@@ -21,6 +21,22 @@
...
@@ -21,6 +21,22 @@
static
inline
struct
btrfs_fs_info
*
to_fs_info
(
struct
kobject
*
kobj
);
static
inline
struct
btrfs_fs_info
*
to_fs_info
(
struct
kobject
*
kobj
);
static
inline
struct
btrfs_fs_devices
*
to_fs_devs
(
struct
kobject
*
kobj
);
static
inline
struct
btrfs_fs_devices
*
to_fs_devs
(
struct
kobject
*
kobj
);
static
struct
btrfs_feature_attr
*
to_btrfs_feature_attr
(
struct
kobj_attribute
*
a
)
{
return
container_of
(
a
,
struct
btrfs_feature_attr
,
kobj_attr
);
}
static
struct
kobj_attribute
*
attr_to_btrfs_attr
(
struct
attribute
*
attr
)
{
return
container_of
(
attr
,
struct
kobj_attribute
,
attr
);
}
static
struct
btrfs_feature_attr
*
attr_to_btrfs_feature_attr
(
struct
attribute
*
attr
)
{
return
to_btrfs_feature_attr
(
attr_to_btrfs_attr
(
attr
));
}
static
u64
get_features
(
struct
btrfs_fs_info
*
fs_info
,
static
u64
get_features
(
struct
btrfs_fs_info
*
fs_info
,
enum
btrfs_feature_set
set
)
enum
btrfs_feature_set
set
)
{
{
...
...
fs/btrfs/sysfs.h
View file @
8f52316c
...
@@ -61,24 +61,6 @@ static struct btrfs_feature_attr btrfs_attr_features_##_name = { \
...
@@ -61,24 +61,6 @@ static struct btrfs_feature_attr btrfs_attr_features_##_name = { \
#define BTRFS_FEAT_ATTR_INCOMPAT(name, feature) \
#define BTRFS_FEAT_ATTR_INCOMPAT(name, feature) \
BTRFS_FEAT_ATTR(name, FEAT_INCOMPAT, BTRFS_FEATURE_INCOMPAT, feature)
BTRFS_FEAT_ATTR(name, FEAT_INCOMPAT, BTRFS_FEATURE_INCOMPAT, feature)
/* convert from attribute */
static
inline
struct
btrfs_feature_attr
*
to_btrfs_feature_attr
(
struct
kobj_attribute
*
a
)
{
return
container_of
(
a
,
struct
btrfs_feature_attr
,
kobj_attr
);
}
static
inline
struct
kobj_attribute
*
attr_to_btrfs_attr
(
struct
attribute
*
attr
)
{
return
container_of
(
attr
,
struct
kobj_attribute
,
attr
);
}
static
inline
struct
btrfs_feature_attr
*
attr_to_btrfs_feature_attr
(
struct
attribute
*
attr
)
{
return
to_btrfs_feature_attr
(
attr_to_btrfs_attr
(
attr
));
}
char
*
btrfs_printable_features
(
enum
btrfs_feature_set
set
,
u64
flags
);
char
*
btrfs_printable_features
(
enum
btrfs_feature_set
set
,
u64
flags
);
const
char
*
const
btrfs_feature_set_name
(
enum
btrfs_feature_set
set
);
const
char
*
const
btrfs_feature_set_name
(
enum
btrfs_feature_set
set
);
int
btrfs_sysfs_add_device_link
(
struct
btrfs_fs_devices
*
fs_devices
,
int
btrfs_sysfs_add_device_link
(
struct
btrfs_fs_devices
*
fs_devices
,
...
...
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