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
be744175
Commit
be744175
authored
May 06, 2007
by
Chris Mason
Committed by
David Woodhouse
May 06, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Btrfs: more allocator enhancements
Signed-off-by:
Chris Mason
<
chris.mason@oracle.com
>
parent
be08c1b9
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
249 additions
and
85 deletions
+249
-85
fs/btrfs/bit-radix.c
fs/btrfs/bit-radix.c
+4
-2
fs/btrfs/ctree.h
fs/btrfs/ctree.h
+5
-2
fs/btrfs/disk-io.c
fs/btrfs/disk-io.c
+1
-1
fs/btrfs/extent-tree.c
fs/btrfs/extent-tree.c
+238
-79
fs/btrfs/super.c
fs/btrfs/super.c
+1
-1
No files found.
fs/btrfs/bit-radix.c
View file @
be744175
...
@@ -26,8 +26,10 @@ int set_radix_bit(struct radix_tree_root *radix, unsigned long bit)
...
@@ -26,8 +26,10 @@ int set_radix_bit(struct radix_tree_root *radix, unsigned long bit)
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
}
}
set_bit
(
bit_slot
,
bits
+
1
);
ret
=
test_and_set_bit
(
bit_slot
,
bits
+
1
);
return
0
;
if
(
ret
<
0
)
ret
=
1
;
return
ret
;
}
}
int
test_radix_bit
(
struct
radix_tree_root
*
radix
,
unsigned
long
bit
)
int
test_radix_bit
(
struct
radix_tree_root
*
radix
,
unsigned
long
bit
)
...
...
fs/btrfs/ctree.h
View file @
be744175
...
@@ -257,6 +257,8 @@ struct btrfs_block_group_cache {
...
@@ -257,6 +257,8 @@ struct btrfs_block_group_cache {
struct
btrfs_block_group_item
item
;
struct
btrfs_block_group_item
item
;
u64
first_free
;
u64
first_free
;
u64
last_alloc
;
u64
last_alloc
;
u64
pinned
;
int
data
;
};
};
struct
crypto_hash
;
struct
crypto_hash
;
...
@@ -264,12 +266,12 @@ struct btrfs_fs_info {
...
@@ -264,12 +266,12 @@ struct btrfs_fs_info {
struct
btrfs_root
*
extent_root
;
struct
btrfs_root
*
extent_root
;
struct
btrfs_root
*
tree_root
;
struct
btrfs_root
*
tree_root
;
struct
btrfs_root
*
dev_root
;
struct
btrfs_root
*
dev_root
;
struct
btrfs_block_group_cache
*
block_group_cache
;
struct
radix_tree_root
fs_roots_radix
;
struct
radix_tree_root
fs_roots_radix
;
struct
radix_tree_root
pending_del_radix
;
struct
radix_tree_root
pending_del_radix
;
struct
radix_tree_root
pinned_radix
;
struct
radix_tree_root
pinned_radix
;
struct
radix_tree_root
dev_radix
;
struct
radix_tree_root
dev_radix
;
struct
radix_tree_root
block_group_radix
;
struct
radix_tree_root
block_group_radix
;
struct
radix_tree_root
block_group_data_radix
;
u64
extent_tree_insert
[
BTRFS_MAX_LEVEL
*
3
];
u64
extent_tree_insert
[
BTRFS_MAX_LEVEL
*
3
];
int
extent_tree_insert_nr
;
int
extent_tree_insert_nr
;
...
@@ -1072,7 +1074,8 @@ static inline void btrfs_mark_buffer_dirty(struct buffer_head *bh)
...
@@ -1072,7 +1074,8 @@ static inline void btrfs_mark_buffer_dirty(struct buffer_head *bh)
/* extent-tree.c */
/* extent-tree.c */
struct
btrfs_block_group_cache
*
btrfs_find_block_group
(
struct
btrfs_root
*
root
,
struct
btrfs_block_group_cache
*
btrfs_find_block_group
(
struct
btrfs_root
*
root
,
struct
btrfs_block_group_cache
struct
btrfs_block_group_cache
*
hint
,
int
data
);
*
hint
,
u64
search_start
,
int
data
);
int
btrfs_inc_root_ref
(
struct
btrfs_trans_handle
*
trans
,
int
btrfs_inc_root_ref
(
struct
btrfs_trans_handle
*
trans
,
struct
btrfs_root
*
root
);
struct
btrfs_root
*
root
);
struct
buffer_head
*
btrfs_alloc_free_block
(
struct
btrfs_trans_handle
*
trans
,
struct
buffer_head
*
btrfs_alloc_free_block
(
struct
btrfs_trans_handle
*
trans
,
...
...
fs/btrfs/disk-io.c
View file @
be744175
...
@@ -554,6 +554,7 @@ struct btrfs_root *open_ctree(struct super_block *sb)
...
@@ -554,6 +554,7 @@ struct btrfs_root *open_ctree(struct super_block *sb)
INIT_RADIX_TREE
(
&
fs_info
->
fs_roots_radix
,
GFP_NOFS
);
INIT_RADIX_TREE
(
&
fs_info
->
fs_roots_radix
,
GFP_NOFS
);
INIT_RADIX_TREE
(
&
fs_info
->
dev_radix
,
GFP_NOFS
);
INIT_RADIX_TREE
(
&
fs_info
->
dev_radix
,
GFP_NOFS
);
INIT_RADIX_TREE
(
&
fs_info
->
block_group_radix
,
GFP_KERNEL
);
INIT_RADIX_TREE
(
&
fs_info
->
block_group_radix
,
GFP_KERNEL
);
INIT_RADIX_TREE
(
&
fs_info
->
block_group_data_radix
,
GFP_KERNEL
);
INIT_LIST_HEAD
(
&
fs_info
->
trans_list
);
INIT_LIST_HEAD
(
&
fs_info
->
trans_list
);
sb_set_blocksize
(
sb
,
4096
);
sb_set_blocksize
(
sb
,
4096
);
fs_info
->
running_transaction
=
NULL
;
fs_info
->
running_transaction
=
NULL
;
...
@@ -582,7 +583,6 @@ struct btrfs_root *open_ctree(struct super_block *sb)
...
@@ -582,7 +583,6 @@ struct btrfs_root *open_ctree(struct super_block *sb)
}
}
mutex_init
(
&
fs_info
->
trans_mutex
);
mutex_init
(
&
fs_info
->
trans_mutex
);
mutex_init
(
&
fs_info
->
fs_mutex
);
mutex_init
(
&
fs_info
->
fs_mutex
);
fs_info
->
block_group_cache
=
NULL
;
__setup_root
(
sb
->
s_blocksize
,
dev_root
,
__setup_root
(
sb
->
s_blocksize
,
dev_root
,
fs_info
,
BTRFS_DEV_TREE_OBJECTID
);
fs_info
,
BTRFS_DEV_TREE_OBJECTID
);
...
...
fs/btrfs/extent-tree.c
View file @
be744175
This diff is collapsed.
Click to expand it.
fs/btrfs/super.c
View file @
be744175
...
@@ -811,7 +811,7 @@ static struct inode *btrfs_new_inode(struct btrfs_trans_handle *trans,
...
@@ -811,7 +811,7 @@ static struct inode *btrfs_new_inode(struct btrfs_trans_handle *trans,
return
ERR_PTR
(
-
ENOMEM
);
return
ERR_PTR
(
-
ENOMEM
);
BTRFS_I
(
inode
)
->
root
=
root
;
BTRFS_I
(
inode
)
->
root
=
root
;
group
=
btrfs_find_block_group
(
root
,
group
,
0
);
group
=
btrfs_find_block_group
(
root
,
group
,
0
,
0
);
BTRFS_I
(
inode
)
->
block_group
=
group
;
BTRFS_I
(
inode
)
->
block_group
=
group
;
inode
->
i_uid
=
current
->
fsuid
;
inode
->
i_uid
=
current
->
fsuid
;
...
...
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