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
f29021b2
Commit
f29021b2
authored
May 16, 2012
by
Jan Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Btrfs: add tree mod log to fs_info
Signed-off-by:
Jan Schmidt
<
list.btrfs@jan-o-sch.net
>
parent
815a51c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
fs/btrfs/ctree.h
fs/btrfs/ctree.h
+9
-0
fs/btrfs/disk-io.c
fs/btrfs/disk-io.c
+5
-0
No files found.
fs/btrfs/ctree.h
View file @
f29021b2
...
@@ -1129,6 +1129,15 @@ struct btrfs_fs_info {
...
@@ -1129,6 +1129,15 @@ struct btrfs_fs_info {
spinlock_t
delayed_iput_lock
;
spinlock_t
delayed_iput_lock
;
struct
list_head
delayed_iputs
;
struct
list_head
delayed_iputs
;
/* this protects tree_mod_seq_list */
spinlock_t
tree_mod_seq_lock
;
atomic_t
tree_mod_seq
;
struct
list_head
tree_mod_seq_list
;
/* this protects tree_mod_log */
rwlock_t
tree_mod_log_lock
;
struct
rb_root
tree_mod_log
;
atomic_t
nr_async_submits
;
atomic_t
nr_async_submits
;
atomic_t
async_submit_draining
;
atomic_t
async_submit_draining
;
atomic_t
nr_async_bios
;
atomic_t
nr_async_bios
;
...
...
fs/btrfs/disk-io.c
View file @
f29021b2
...
@@ -1914,11 +1914,14 @@ int open_ctree(struct super_block *sb,
...
@@ -1914,11 +1914,14 @@ int open_ctree(struct super_block *sb,
spin_lock_init
(
&
fs_info
->
delayed_iput_lock
);
spin_lock_init
(
&
fs_info
->
delayed_iput_lock
);
spin_lock_init
(
&
fs_info
->
defrag_inodes_lock
);
spin_lock_init
(
&
fs_info
->
defrag_inodes_lock
);
spin_lock_init
(
&
fs_info
->
free_chunk_lock
);
spin_lock_init
(
&
fs_info
->
free_chunk_lock
);
spin_lock_init
(
&
fs_info
->
tree_mod_seq_lock
);
rwlock_init
(
&
fs_info
->
tree_mod_log_lock
);
mutex_init
(
&
fs_info
->
reloc_mutex
);
mutex_init
(
&
fs_info
->
reloc_mutex
);
init_completion
(
&
fs_info
->
kobj_unregister
);
init_completion
(
&
fs_info
->
kobj_unregister
);
INIT_LIST_HEAD
(
&
fs_info
->
dirty_cowonly_roots
);
INIT_LIST_HEAD
(
&
fs_info
->
dirty_cowonly_roots
);
INIT_LIST_HEAD
(
&
fs_info
->
space_info
);
INIT_LIST_HEAD
(
&
fs_info
->
space_info
);
INIT_LIST_HEAD
(
&
fs_info
->
tree_mod_seq_list
);
btrfs_mapping_init
(
&
fs_info
->
mapping_tree
);
btrfs_mapping_init
(
&
fs_info
->
mapping_tree
);
btrfs_init_block_rsv
(
&
fs_info
->
global_block_rsv
);
btrfs_init_block_rsv
(
&
fs_info
->
global_block_rsv
);
btrfs_init_block_rsv
(
&
fs_info
->
delalloc_block_rsv
);
btrfs_init_block_rsv
(
&
fs_info
->
delalloc_block_rsv
);
...
@@ -1931,12 +1934,14 @@ int open_ctree(struct super_block *sb,
...
@@ -1931,12 +1934,14 @@ int open_ctree(struct super_block *sb,
atomic_set
(
&
fs_info
->
async_submit_draining
,
0
);
atomic_set
(
&
fs_info
->
async_submit_draining
,
0
);
atomic_set
(
&
fs_info
->
nr_async_bios
,
0
);
atomic_set
(
&
fs_info
->
nr_async_bios
,
0
);
atomic_set
(
&
fs_info
->
defrag_running
,
0
);
atomic_set
(
&
fs_info
->
defrag_running
,
0
);
atomic_set
(
&
fs_info
->
tree_mod_seq
,
0
);
fs_info
->
sb
=
sb
;
fs_info
->
sb
=
sb
;
fs_info
->
max_inline
=
8192
*
1024
;
fs_info
->
max_inline
=
8192
*
1024
;
fs_info
->
metadata_ratio
=
0
;
fs_info
->
metadata_ratio
=
0
;
fs_info
->
defrag_inodes
=
RB_ROOT
;
fs_info
->
defrag_inodes
=
RB_ROOT
;
fs_info
->
trans_no_join
=
0
;
fs_info
->
trans_no_join
=
0
;
fs_info
->
free_chunk_space
=
0
;
fs_info
->
free_chunk_space
=
0
;
fs_info
->
tree_mod_log
=
RB_ROOT
;
/* readahead state */
/* readahead state */
INIT_RADIX_TREE
(
&
fs_info
->
reada_tree
,
GFP_NOFS
&
~
__GFP_WAIT
);
INIT_RADIX_TREE
(
&
fs_info
->
reada_tree
,
GFP_NOFS
&
~
__GFP_WAIT
);
...
...
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