Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
8f662a76
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
8f662a76
编写于
1月 02, 2008
作者:
C
Chris Mason
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Btrfs: Add readahead to the online shrinker, and a mount -o alloc_start= for testing
Signed-off-by:
N
Chris Mason
<
chris.mason@oracle.com
>
上级
e52ec0eb
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
28 addition
and
9 deletion
+28
-9
fs/btrfs/ctree.c
fs/btrfs/ctree.c
+6
-3
fs/btrfs/ctree.h
fs/btrfs/ctree.h
+1
-0
fs/btrfs/extent-tree.c
fs/btrfs/extent-tree.c
+5
-4
fs/btrfs/inode.c
fs/btrfs/inode.c
+1
-1
fs/btrfs/super.c
fs/btrfs/super.c
+15
-1
未找到文件。
fs/btrfs/ctree.c
浏览文件 @
8f662a76
...
...
@@ -2654,9 +2654,9 @@ int btrfs_del_item(struct btrfs_trans_handle *trans, struct btrfs_root *root,
*/
int
btrfs_prev_leaf
(
struct
btrfs_root
*
root
,
struct
btrfs_path
*
path
)
{
u64
bytenr
;
int
slot
;
int
level
=
1
;
u64
bytenr
;
struct
extent_buffer
*
c
;
struct
extent_buffer
*
next
=
NULL
;
...
...
@@ -2687,11 +2687,14 @@ int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path)
level
--
;
c
=
path
->
nodes
[
level
];
free_extent_buffer
(
c
);
slot
=
btrfs_header_nritems
(
next
);
if
(
slot
!=
0
)
slot
--
;
path
->
nodes
[
level
]
=
next
;
path
->
slots
[
level
]
=
0
;
path
->
slots
[
level
]
=
slot
;
if
(
!
level
)
break
;
next
=
read_tree_block
(
root
,
btrfs_node_blockptr
(
next
,
0
),
next
=
read_tree_block
(
root
,
btrfs_node_blockptr
(
next
,
slot
),
btrfs_level_size
(
root
,
level
-
1
));
}
return
0
;
...
...
fs/btrfs/ctree.h
浏览文件 @
8f662a76
...
...
@@ -324,6 +324,7 @@ struct btrfs_fs_info {
u64
last_trans_committed
;
unsigned
long
mount_opt
;
u64
max_extent
;
u64
alloc_start
;
struct
btrfs_transaction
*
running_transaction
;
struct
btrfs_super_block
super_copy
;
struct
extent_buffer
*
sb_buffer
;
...
...
fs/btrfs/extent-tree.c
浏览文件 @
8f662a76
...
...
@@ -1630,11 +1630,11 @@ int btrfs_alloc_extent(struct btrfs_trans_handle *trans,
struct
btrfs_path
*
path
;
btrfs_set_stack_extent_refs
(
&
extent_item
,
1
);
#if 0
new_hint = max(hint_byte,
16ULL * 1024 * 1024 * 1024
);
new_hint
=
max
(
hint_byte
,
root
->
fs_info
->
alloc_start
);
if
(
new_hint
<
btrfs_super_total_bytes
(
&
info
->
super_copy
))
hint_byte
=
new_hint
;
#endif
WARN_ON
(
num_bytes
<
root
->
sectorsize
);
ret
=
find_free_extent
(
trans
,
root
,
num_bytes
,
empty_size
,
search_start
,
search_end
,
hint_byte
,
ins
,
...
...
@@ -2239,7 +2239,7 @@ static int relocate_one_reference(struct btrfs_root *extent_root,
free_extent_buffer
(
eb
);
path
->
lowest_level
=
level
;
path
->
reada
=
0
;
path
->
reada
=
2
;
ret
=
btrfs_search_slot
(
trans
,
found_root
,
&
found_key
,
path
,
0
,
1
);
path
->
lowest_level
=
0
;
...
...
@@ -2372,6 +2372,7 @@ int btrfs_shrink_extent_tree(struct btrfs_root *root, u64 new_size)
block_group_cache
=
&
info
->
block_group_cache
;
path
=
btrfs_alloc_path
();
root
=
root
->
fs_info
->
extent_root
;
path
->
reada
=
2
;
again:
total_found
=
0
;
...
...
fs/btrfs/inode.c
浏览文件 @
8f662a76
...
...
@@ -2058,7 +2058,7 @@ int btrfs_page_mkwrite(struct vm_area_struct *vma, struct page *page)
mutex_lock
(
&
root
->
fs_info
->
fs_mutex
);
ret
=
btrfs_check_free_space
(
root
,
PAGE_CACHE_SIZE
,
0
);
mutex_lock
(
&
root
->
fs_info
->
fs_mutex
);
mutex_
un
lock
(
&
root
->
fs_info
->
fs_mutex
);
if
(
ret
)
goto
out
;
...
...
fs/btrfs/super.c
浏览文件 @
8f662a76
...
...
@@ -63,7 +63,8 @@ static void btrfs_put_super (struct super_block * sb)
}
enum
{
Opt_subvol
,
Opt_nodatasum
,
Opt_nodatacow
,
Opt_max_extent
,
Opt_err
,
Opt_subvol
,
Opt_nodatasum
,
Opt_nodatacow
,
Opt_max_extent
,
Opt_alloc_start
,
Opt_err
,
};
static
match_table_t
tokens
=
{
...
...
@@ -71,6 +72,7 @@ static match_table_t tokens = {
{
Opt_nodatasum
,
"nodatasum"
},
{
Opt_nodatacow
,
"nodatacow"
},
{
Opt_max_extent
,
"max_extent=%s"
},
{
Opt_alloc_start
,
"alloc_start=%s"
},
{
Opt_err
,
NULL
}
};
...
...
@@ -162,6 +164,18 @@ static int parse_options (char * options,
}
}
break
;
case
Opt_alloc_start
:
if
(
info
)
{
char
*
num
=
match_strdup
(
&
args
[
0
]);
if
(
num
)
{
info
->
alloc_start
=
btrfs_parse_size
(
num
);
kfree
(
num
);
printk
(
"btrfs: allocations start at "
"%Lu
\n
"
,
info
->
alloc_start
);
}
}
break
;
default:
break
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录