Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
96d2e8b5
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
96d2e8b5
编写于
1月 30, 2014
作者:
J
Jens Axboe
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'bcache-for-3.14' of
git://evilpiepirate.org/~kent/linux-bcache
into for-linus
上级
556ee818
e3b4825b
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
15 addition
and
10 deletion
+15
-10
drivers/md/bcache/bcache.h
drivers/md/bcache/bcache.h
+3
-1
drivers/md/bcache/bset.c
drivers/md/bcache/bset.c
+5
-2
drivers/md/bcache/btree.c
drivers/md/bcache/btree.c
+2
-2
drivers/md/bcache/extents.c
drivers/md/bcache/extents.c
+1
-1
drivers/md/bcache/request.c
drivers/md/bcache/request.c
+3
-3
drivers/md/bcache/sysfs.c
drivers/md/bcache/sysfs.c
+1
-1
未找到文件。
drivers/md/bcache/bcache.h
浏览文件 @
96d2e8b5
...
...
@@ -210,7 +210,9 @@ BITMASK(GC_MARK, struct bucket, gc_mark, 0, 2);
#define GC_MARK_RECLAIMABLE 0
#define GC_MARK_DIRTY 1
#define GC_MARK_METADATA 2
BITMASK
(
GC_SECTORS_USED
,
struct
bucket
,
gc_mark
,
2
,
13
);
#define GC_SECTORS_USED_SIZE 13
#define MAX_GC_SECTORS_USED (~(~0ULL << GC_SECTORS_USED_SIZE))
BITMASK
(
GC_SECTORS_USED
,
struct
bucket
,
gc_mark
,
2
,
GC_SECTORS_USED_SIZE
);
BITMASK
(
GC_MOVE
,
struct
bucket
,
gc_mark
,
15
,
1
);
#include "journal.h"
...
...
drivers/md/bcache/bset.c
浏览文件 @
96d2e8b5
...
...
@@ -23,7 +23,7 @@ void bch_dump_bset(struct btree_keys *b, struct bset *i, unsigned set)
for
(
k
=
i
->
start
;
k
<
bset_bkey_last
(
i
);
k
=
next
)
{
next
=
bkey_next
(
k
);
printk
(
KERN_ERR
"block %u key %
z
i/%u: "
,
set
,
printk
(
KERN_ERR
"block %u key %
l
i/%u: "
,
set
,
(
uint64_t
*
)
k
-
i
->
d
,
i
->
keys
);
if
(
b
->
ops
->
key_dump
)
...
...
@@ -1185,9 +1185,12 @@ static void __btree_sort(struct btree_keys *b, struct btree_iter *iter,
struct
bset
*
out
=
(
void
*
)
__get_free_pages
(
__GFP_NOWARN
|
GFP_NOIO
,
order
);
if
(
!
out
)
{
struct
page
*
outp
;
BUG_ON
(
order
>
state
->
page_order
);
out
=
page_address
(
mempool_alloc
(
state
->
pool
,
GFP_NOIO
));
outp
=
mempool_alloc
(
state
->
pool
,
GFP_NOIO
);
out
=
page_address
(
outp
);
used_mempool
=
true
;
order
=
state
->
page_order
;
}
...
...
drivers/md/bcache/btree.c
浏览文件 @
96d2e8b5
...
...
@@ -1167,7 +1167,7 @@ uint8_t __bch_btree_mark_key(struct cache_set *c, int level, struct bkey *k)
/* guard against overflow */
SET_GC_SECTORS_USED
(
g
,
min_t
(
unsigned
,
GC_SECTORS_USED
(
g
)
+
KEY_SIZE
(
k
),
(
1
<<
14
)
-
1
));
MAX_GC_SECTORS_USED
));
BUG_ON
(
!
GC_SECTORS_USED
(
g
));
}
...
...
@@ -1805,7 +1805,7 @@ static bool btree_insert_key(struct btree *b, struct bkey *k,
static
size_t
insert_u64s_remaining
(
struct
btree
*
b
)
{
ssize_t
ret
=
bch_btree_keys_u64s_remaining
(
&
b
->
keys
);
long
ret
=
bch_btree_keys_u64s_remaining
(
&
b
->
keys
);
/*
* Might land in the middle of an existing extent and have to split it
...
...
drivers/md/bcache/extents.c
浏览文件 @
96d2e8b5
...
...
@@ -194,7 +194,7 @@ static bool btree_ptr_bad_expensive(struct btree *b, const struct bkey *k)
mutex_unlock
(
&
b
->
c
->
bucket_lock
);
bch_extent_to_text
(
buf
,
sizeof
(
buf
),
k
);
btree_bug
(
b
,
"inconsistent btree pointer %s: bucket %
l
i pin %i prio %i gen %i last_gc %i mark %llu gc_gen %i"
,
"inconsistent btree pointer %s: bucket %
z
i pin %i prio %i gen %i last_gc %i mark %llu gc_gen %i"
,
buf
,
PTR_BUCKET_NR
(
b
->
c
,
k
,
i
),
atomic_read
(
&
g
->
pin
),
g
->
prio
,
g
->
gen
,
g
->
last_gc
,
GC_MARK
(
g
),
g
->
gc_gen
);
return
true
;
...
...
drivers/md/bcache/request.c
浏览文件 @
96d2e8b5
...
...
@@ -353,14 +353,14 @@ static void bch_data_insert_start(struct closure *cl)
struct
data_insert_op
*
op
=
container_of
(
cl
,
struct
data_insert_op
,
cl
);
struct
bio
*
bio
=
op
->
bio
,
*
n
;
if
(
op
->
bypass
)
return
bch_data_invalidate
(
cl
);
if
(
atomic_sub_return
(
bio_sectors
(
bio
),
&
op
->
c
->
sectors_to_gc
)
<
0
)
{
set_gc_sectors
(
op
->
c
);
wake_up_gc
(
op
->
c
);
}
if
(
op
->
bypass
)
return
bch_data_invalidate
(
cl
);
/*
* Journal writes are marked REQ_FLUSH; if the original write was a
* flush, it'll wait on the journal write.
...
...
drivers/md/bcache/sysfs.c
浏览文件 @
96d2e8b5
...
...
@@ -416,7 +416,7 @@ static int btree_bset_stats(struct btree_op *b_op, struct btree *b)
return
MAP_CONTINUE
;
}
int
bch_bset_print_stats
(
struct
cache_set
*
c
,
char
*
buf
)
static
int
bch_bset_print_stats
(
struct
cache_set
*
c
,
char
*
buf
)
{
struct
bset_stats_op
op
;
int
ret
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录