Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
1329dfc8
K
Kernel
项目概览
openeuler
/
Kernel
12 个月 前同步成功
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1329dfc8
编写于
10月 05, 2013
作者:
C
Chris Mason
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'for-linus' into for-linus-3.12
上级
15c03dd4
1357272f
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
31 addition
and
17 deletion
+31
-17
fs/btrfs/async-thread.c
fs/btrfs/async-thread.c
+19
-6
fs/btrfs/async-thread.h
fs/btrfs/async-thread.h
+2
-0
fs/btrfs/dev-replace.c
fs/btrfs/dev-replace.c
+1
-4
fs/btrfs/extent_io.c
fs/btrfs/extent_io.c
+1
-1
fs/btrfs/transaction.c
fs/btrfs/transaction.c
+2
-5
fs/btrfs/volumes.c
fs/btrfs/volumes.c
+6
-1
未找到文件。
fs/btrfs/async-thread.c
浏览文件 @
1329dfc8
...
...
@@ -107,7 +107,8 @@ static void check_idle_worker(struct btrfs_worker_thread *worker)
worker
->
idle
=
1
;
/* the list may be empty if the worker is just starting */
if
(
!
list_empty
(
&
worker
->
worker_list
))
{
if
(
!
list_empty
(
&
worker
->
worker_list
)
&&
!
worker
->
workers
->
stopping
)
{
list_move
(
&
worker
->
worker_list
,
&
worker
->
workers
->
idle_list
);
}
...
...
@@ -127,7 +128,8 @@ static void check_busy_worker(struct btrfs_worker_thread *worker)
spin_lock_irqsave
(
&
worker
->
workers
->
lock
,
flags
);
worker
->
idle
=
0
;
if
(
!
list_empty
(
&
worker
->
worker_list
))
{
if
(
!
list_empty
(
&
worker
->
worker_list
)
&&
!
worker
->
workers
->
stopping
)
{
list_move_tail
(
&
worker
->
worker_list
,
&
worker
->
workers
->
worker_list
);
}
...
...
@@ -412,6 +414,7 @@ void btrfs_stop_workers(struct btrfs_workers *workers)
int
can_stop
;
spin_lock_irq
(
&
workers
->
lock
);
workers
->
stopping
=
1
;
list_splice_init
(
&
workers
->
idle_list
,
&
workers
->
worker_list
);
while
(
!
list_empty
(
&
workers
->
worker_list
))
{
cur
=
workers
->
worker_list
.
next
;
...
...
@@ -455,6 +458,7 @@ void btrfs_init_workers(struct btrfs_workers *workers, char *name, int max,
workers
->
ordered
=
0
;
workers
->
atomic_start_pending
=
0
;
workers
->
atomic_worker_start
=
async_helper
;
workers
->
stopping
=
0
;
}
/*
...
...
@@ -480,15 +484,19 @@ static int __btrfs_start_workers(struct btrfs_workers *workers)
atomic_set
(
&
worker
->
num_pending
,
0
);
atomic_set
(
&
worker
->
refs
,
1
);
worker
->
workers
=
workers
;
worker
->
task
=
kthread_
run
(
worker_loop
,
worker
,
"btrfs-%s-%d"
,
workers
->
name
,
workers
->
num_workers
+
1
);
worker
->
task
=
kthread_
create
(
worker_loop
,
worker
,
"btrfs-%s-%d"
,
workers
->
name
,
workers
->
num_workers
+
1
);
if
(
IS_ERR
(
worker
->
task
))
{
ret
=
PTR_ERR
(
worker
->
task
);
kfree
(
worker
);
goto
fail
;
}
spin_lock_irq
(
&
workers
->
lock
);
if
(
workers
->
stopping
)
{
spin_unlock_irq
(
&
workers
->
lock
);
goto
fail_kthread
;
}
list_add_tail
(
&
worker
->
worker_list
,
&
workers
->
idle_list
);
worker
->
idle
=
1
;
workers
->
num_workers
++
;
...
...
@@ -496,8 +504,13 @@ static int __btrfs_start_workers(struct btrfs_workers *workers)
WARN_ON
(
workers
->
num_workers_starting
<
0
);
spin_unlock_irq
(
&
workers
->
lock
);
wake_up_process
(
worker
->
task
);
return
0
;
fail_kthread:
kthread_stop
(
worker
->
task
);
fail:
kfree
(
worker
);
spin_lock_irq
(
&
workers
->
lock
);
workers
->
num_workers_starting
--
;
spin_unlock_irq
(
&
workers
->
lock
);
...
...
fs/btrfs/async-thread.h
浏览文件 @
1329dfc8
...
...
@@ -107,6 +107,8 @@ struct btrfs_workers {
/* extra name for this worker, used for current->name */
char
*
name
;
int
stopping
;
};
void
btrfs_queue_worker
(
struct
btrfs_workers
*
workers
,
struct
btrfs_work
*
work
);
...
...
fs/btrfs/dev-replace.c
浏览文件 @
1329dfc8
...
...
@@ -535,10 +535,7 @@ static int btrfs_dev_replace_finishing(struct btrfs_fs_info *fs_info,
list_add
(
&
tgt_device
->
dev_alloc_list
,
&
fs_info
->
fs_devices
->
alloc_list
);
btrfs_rm_dev_replace_srcdev
(
fs_info
,
src_device
);
if
(
src_device
->
bdev
)
{
/* zero out the old super */
btrfs_scratch_superblock
(
src_device
);
}
/*
* this is again a consistent state where no dev_replace procedure
* is running, the target device is part of the filesystem, the
...
...
fs/btrfs/extent_io.c
浏览文件 @
1329dfc8
...
...
@@ -1614,7 +1614,7 @@ static noinline u64 find_lock_delalloc_range(struct inode *inode,
*
start
=
delalloc_start
;
*
end
=
delalloc_end
;
free_extent_state
(
cached_state
);
return
found
;
return
0
;
}
/*
...
...
fs/btrfs/transaction.c
浏览文件 @
1329dfc8
...
...
@@ -1838,11 +1838,8 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
assert_qgroups_uptodate
(
trans
);
update_super_roots
(
root
);
if
(
!
root
->
fs_info
->
log_root_recovering
)
{
btrfs_set_super_log_root
(
root
->
fs_info
->
super_copy
,
0
);
btrfs_set_super_log_root_level
(
root
->
fs_info
->
super_copy
,
0
);
}
btrfs_set_super_log_root
(
root
->
fs_info
->
super_copy
,
0
);
btrfs_set_super_log_root_level
(
root
->
fs_info
->
super_copy
,
0
);
memcpy
(
root
->
fs_info
->
super_for_commit
,
root
->
fs_info
->
super_copy
,
sizeof
(
*
root
->
fs_info
->
super_copy
));
...
...
fs/btrfs/volumes.c
浏览文件 @
1329dfc8
...
...
@@ -1716,6 +1716,7 @@ void btrfs_rm_dev_replace_srcdev(struct btrfs_fs_info *fs_info,
struct
btrfs_device
*
srcdev
)
{
WARN_ON
(
!
mutex_is_locked
(
&
fs_info
->
fs_devices
->
device_list_mutex
));
list_del_rcu
(
&
srcdev
->
dev_list
);
list_del_rcu
(
&
srcdev
->
dev_alloc_list
);
fs_info
->
fs_devices
->
num_devices
--
;
...
...
@@ -1725,9 +1726,13 @@ void btrfs_rm_dev_replace_srcdev(struct btrfs_fs_info *fs_info,
}
if
(
srcdev
->
can_discard
)
fs_info
->
fs_devices
->
num_can_discard
--
;
if
(
srcdev
->
bdev
)
if
(
srcdev
->
bdev
)
{
fs_info
->
fs_devices
->
open_devices
--
;
/* zero out the old super */
btrfs_scratch_superblock
(
srcdev
);
}
call_rcu
(
&
srcdev
->
rcu
,
free_device
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录