Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
d5bee775
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
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看板
提交
d5bee775
编写于
1月 31, 2006
作者:
L
Linus Torvalds
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'for-linus' of
git://brick.kernel.dk/data/git/linux-2.6-block
上级
0827f2b6
fddfdeaf
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
50 addition
and
37 deletion
+50
-37
block/elevator.c
block/elevator.c
+15
-30
block/ll_rw_blk.c
block/ll_rw_blk.c
+5
-2
drivers/scsi/libata-scsi.c
drivers/scsi/libata-scsi.c
+26
-1
fs/bio.c
fs/bio.c
+1
-0
include/linux/blkdev.h
include/linux/blkdev.h
+3
-3
include/scsi/scsi_host.h
include/scsi/scsi_host.h
+0
-1
未找到文件。
block/elevator.c
浏览文件 @
d5bee775
...
...
@@ -139,35 +139,16 @@ static int elevator_attach(request_queue_t *q, struct elevator_type *e,
static
char
chosen_elevator
[
16
];
static
void
elevator_setup_default
(
void
)
static
int
__init
elevator_setup
(
char
*
str
)
{
struct
elevator_type
*
e
;
/*
* If default has not been set, use the compiled-in selection.
*/
if
(
!
chosen_elevator
[
0
])
strcpy
(
chosen_elevator
,
CONFIG_DEFAULT_IOSCHED
);
/*
* Be backwards-compatible with previous kernels, so users
* won't get the wrong elevator.
*/
if
(
!
strcmp
(
chosen_elevato
r
,
"as"
))
if
(
!
strcmp
(
st
r
,
"as"
))
strcpy
(
chosen_elevator
,
"anticipatory"
);
/*
* If the given scheduler is not available, fall back to the default
*/
if
((
e
=
elevator_find
(
chosen_elevator
)))
elevator_put
(
e
);
else
strcpy
(
chosen_elevator
,
CONFIG_DEFAULT_IOSCHED
);
}
static
int
__init
elevator_setup
(
char
*
str
)
{
strncpy
(
chosen_elevator
,
str
,
sizeof
(
chosen_elevator
)
-
1
);
strncpy
(
chosen_elevator
,
str
,
sizeof
(
chosen_elevator
)
-
1
);
return
0
;
}
...
...
@@ -184,14 +165,16 @@ int elevator_init(request_queue_t *q, char *name)
q
->
end_sector
=
0
;
q
->
boundary_rq
=
NULL
;
elevator_setup_default
();
if
(
name
&&
!
(
e
=
elevator_get
(
name
)))
return
-
EINVAL
;
if
(
!
name
)
name
=
chosen_elevator
;
if
(
!
e
&&
*
chosen_elevator
&&
!
(
e
=
elevator_get
(
chosen_elevator
))
)
printk
(
"I/O scheduler %s not found
\n
"
,
chosen_elevator
)
;
e
=
elevator_get
(
name
);
if
(
!
e
)
return
-
EINVAL
;
if
(
!
e
&&
!
(
e
=
elevator_get
(
CONFIG_DEFAULT_IOSCHED
)))
{
printk
(
"Default I/O scheduler not found, using no-op
\n
"
);
e
=
elevator_get
(
"noop"
);
}
eq
=
kmalloc
(
sizeof
(
struct
elevator_queue
),
GFP_KERNEL
);
if
(
!
eq
)
{
...
...
@@ -669,8 +652,10 @@ int elv_register(struct elevator_type *e)
spin_unlock_irq
(
&
elv_list_lock
);
printk
(
KERN_INFO
"io scheduler %s registered"
,
e
->
elevator_name
);
if
(
!
strcmp
(
e
->
elevator_name
,
chosen_elevator
))
printk
(
" (default)"
);
if
(
!
strcmp
(
e
->
elevator_name
,
chosen_elevator
)
||
(
!*
chosen_elevator
&&
!
strcmp
(
e
->
elevator_name
,
CONFIG_DEFAULT_IOSCHED
)))
printk
(
" (default)"
);
printk
(
"
\n
"
);
return
0
;
}
...
...
block/ll_rw_blk.c
浏览文件 @
d5bee775
...
...
@@ -304,6 +304,7 @@ static inline void rq_init(request_queue_t *q, struct request *rq)
* blk_queue_ordered - does this queue support ordered writes
* @q: the request queue
* @ordered: one of QUEUE_ORDERED_*
* @prepare_flush_fn: rq setup helper for cache flush ordered writes
*
* Description:
* For journalled file systems, doing ordered writes on a commit
...
...
@@ -332,6 +333,7 @@ int blk_queue_ordered(request_queue_t *q, unsigned ordered,
return
-
EINVAL
;
}
q
->
ordered
=
ordered
;
q
->
next_ordered
=
ordered
;
q
->
prepare_flush_fn
=
prepare_flush_fn
;
...
...
@@ -662,7 +664,7 @@ EXPORT_SYMBOL(blk_queue_bounce_limit);
* Enables a low level driver to set an upper limit on the size of
* received requests.
**/
void
blk_queue_max_sectors
(
request_queue_t
*
q
,
unsigned
shor
t
max_sectors
)
void
blk_queue_max_sectors
(
request_queue_t
*
q
,
unsigned
in
t
max_sectors
)
{
if
((
max_sectors
<<
9
)
<
PAGE_CACHE_SIZE
)
{
max_sectors
=
1
<<
(
PAGE_CACHE_SHIFT
-
9
);
...
...
@@ -2632,6 +2634,7 @@ EXPORT_SYMBOL(blk_put_request);
/**
* blk_end_sync_rq - executes a completion event on a request
* @rq: request to complete
* @error: end io status of the request
*/
void
blk_end_sync_rq
(
struct
request
*
rq
,
int
error
)
{
...
...
@@ -3153,7 +3156,7 @@ static int __end_that_request_first(struct request *req, int uptodate,
if
(
blk_fs_request
(
req
)
&&
req
->
rq_disk
)
{
const
int
rw
=
rq_data_dir
(
req
);
__
disk_stat_add
(
req
->
rq_disk
,
sectors
[
rw
],
nr_bytes
>>
9
);
disk_stat_add
(
req
->
rq_disk
,
sectors
[
rw
],
nr_bytes
>>
9
);
}
total_bytes
=
bio_nbytes
=
0
;
...
...
drivers/scsi/libata-scsi.c
浏览文件 @
d5bee775
...
...
@@ -1700,6 +1700,31 @@ static unsigned int ata_msense_rw_recovery(u8 **ptr_io, const u8 *last)
return
sizeof
(
def_rw_recovery_mpage
);
}
/*
* We can turn this into a real blacklist if it's needed, for now just
* blacklist any Maxtor BANC1G10 revision firmware
*/
static
int
ata_dev_supports_fua
(
u16
*
id
)
{
unsigned
char
model
[
41
],
fw
[
9
];
if
(
!
ata_id_has_fua
(
id
))
return
0
;
model
[
40
]
=
'\0'
;
fw
[
8
]
=
'\0'
;
ata_dev_id_string
(
id
,
model
,
ATA_ID_PROD_OFS
,
sizeof
(
model
)
-
1
);
ata_dev_id_string
(
id
,
fw
,
ATA_ID_FW_REV_OFS
,
sizeof
(
fw
)
-
1
);
if
(
strncmp
(
model
,
"Maxtor"
,
6
))
return
1
;
if
(
strncmp
(
fw
,
"BANC1G10"
,
8
))
return
1
;
return
0
;
/* blacklisted */
}
/**
* ata_scsiop_mode_sense - Simulate MODE SENSE 6, 10 commands
* @args: device IDENTIFY data / SCSI command of interest.
...
...
@@ -1797,7 +1822,7 @@ unsigned int ata_scsiop_mode_sense(struct ata_scsi_args *args, u8 *rbuf,
return
0
;
dpofua
=
0
;
if
(
ata_
id_ha
s_fua
(
args
->
id
)
&&
dev
->
flags
&
ATA_DFLAG_LBA48
&&
if
(
ata_
dev_support
s_fua
(
args
->
id
)
&&
dev
->
flags
&
ATA_DFLAG_LBA48
&&
(
!
(
dev
->
flags
&
ATA_DFLAG_PIO
)
||
dev
->
multi_count
))
dpofua
=
1
<<
4
;
...
...
fs/bio.c
浏览文件 @
d5bee775
...
...
@@ -411,6 +411,7 @@ static int __bio_add_page(request_queue_t *q, struct bio *bio, struct page
/**
* bio_add_pc_page - attempt to add page to bio
* @q: the target queue
* @bio: destination bio
* @page: page to add
* @len: vec entry length
...
...
include/linux/blkdev.h
浏览文件 @
d5bee775
...
...
@@ -392,8 +392,8 @@ struct request_queue
unsigned
int
nr_congestion_off
;
unsigned
int
nr_batching
;
unsigned
shor
t
max_sectors
;
unsigned
shor
t
max_hw_sectors
;
unsigned
in
t
max_sectors
;
unsigned
in
t
max_hw_sectors
;
unsigned
short
max_phys_segments
;
unsigned
short
max_hw_segments
;
unsigned
short
hardsect_size
;
...
...
@@ -697,7 +697,7 @@ extern request_queue_t *blk_init_queue(request_fn_proc *, spinlock_t *);
extern
void
blk_cleanup_queue
(
request_queue_t
*
);
extern
void
blk_queue_make_request
(
request_queue_t
*
,
make_request_fn
*
);
extern
void
blk_queue_bounce_limit
(
request_queue_t
*
,
u64
);
extern
void
blk_queue_max_sectors
(
request_queue_t
*
,
unsigned
shor
t
);
extern
void
blk_queue_max_sectors
(
request_queue_t
*
,
unsigned
in
t
);
extern
void
blk_queue_max_phys_segments
(
request_queue_t
*
,
unsigned
short
);
extern
void
blk_queue_max_hw_segments
(
request_queue_t
*
,
unsigned
short
);
extern
void
blk_queue_max_segment_size
(
request_queue_t
*
,
unsigned
int
);
...
...
include/scsi/scsi_host.h
浏览文件 @
d5bee775
...
...
@@ -554,7 +554,6 @@ struct Scsi_Host {
/*
* ordered write support
*/
unsigned
ordered_flush
:
1
;
unsigned
ordered_tag
:
1
;
/*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录