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
242e2956
Commit
242e2956
authored
Jan 25, 2016
by
David Sterba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
btrfs: switch dev stats item to the permanent item key
Signed-off-by:
David Sterba
<
dsterba@suse.com
>
parent
50c2d5ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
fs/btrfs/ctree.h
fs/btrfs/ctree.h
+4
-1
fs/btrfs/volumes.c
fs/btrfs/volumes.c
+4
-4
No files found.
fs/btrfs/ctree.h
View file @
242e2956
...
...
@@ -100,6 +100,9 @@ struct btrfs_ordered_sum;
/* tracks free space in block groups. */
#define BTRFS_FREE_SPACE_TREE_OBJECTID 10ULL
/* device stats in the device tree */
#define BTRFS_DEV_STATS_OBJECTID 0ULL
/* for storing balance parameters in the root tree */
#define BTRFS_BALANCE_OBJECTID -4ULL
...
...
@@ -2219,7 +2222,7 @@ struct btrfs_ioctl_defrag_range_args {
*
* - device statistics, store IO stats in the device tree, one key for all
* stats
* (
0
, BTRFS_DEV_STATS_KEY, 0)
* (
BTRFS_DEV_STATS_OBJECTID
, BTRFS_DEV_STATS_KEY, 0)
*/
#define BTRFS_PERSISTENT_ITEM_KEY 249
...
...
fs/btrfs/volumes.c
View file @
242e2956
...
...
@@ -6705,8 +6705,8 @@ int btrfs_init_dev_stats(struct btrfs_fs_info *fs_info)
int
item_size
;
struct
btrfs_dev_stats_item
*
ptr
;
key
.
objectid
=
0
;
key
.
type
=
BTRFS_
DEV_STATS
_KEY
;
key
.
objectid
=
BTRFS_DEV_STATS_OBJECTID
;
key
.
type
=
BTRFS_
PERSISTENT_ITEM
_KEY
;
key
.
offset
=
device
->
devid
;
ret
=
btrfs_search_slot
(
NULL
,
dev_root
,
&
key
,
path
,
0
,
0
);
if
(
ret
)
{
...
...
@@ -6753,8 +6753,8 @@ static int update_dev_stat_item(struct btrfs_trans_handle *trans,
int
ret
;
int
i
;
key
.
objectid
=
0
;
key
.
type
=
BTRFS_
DEV_STATS
_KEY
;
key
.
objectid
=
BTRFS_DEV_STATS_OBJECTID
;
key
.
type
=
BTRFS_
PERSISTENT_ITEM
_KEY
;
key
.
offset
=
device
->
devid
;
path
=
btrfs_alloc_path
();
...
...
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