Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
26b8256e
Commit
26b8256e
authored
Jan 29, 2008
by
Jens Axboe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
block: get rid of unnecessary forward declarations in blk-core.c
Signed-off-by:
Jens Axboe
<
jens.axboe@oracle.com
>
parent
86db1e29
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
32 deletions
+30
-32
block/blk-core.c
block/blk-core.c
+30
-32
No files found.
block/blk-core.c
View file @
26b8256e
...
...
@@ -33,9 +33,7 @@
#include "blk.h"
static
void
drive_stat_acct
(
struct
request
*
rq
,
int
new_io
);
static
int
__make_request
(
struct
request_queue
*
q
,
struct
bio
*
bio
);
static
void
blk_recalc_rq_segments
(
struct
request
*
rq
);
/*
* For the allocated request tables
...
...
@@ -54,6 +52,21 @@ static struct workqueue_struct *kblockd_workqueue;
static
DEFINE_PER_CPU
(
struct
list_head
,
blk_cpu_done
);
static
void
drive_stat_acct
(
struct
request
*
rq
,
int
new_io
)
{
int
rw
=
rq_data_dir
(
rq
);
if
(
!
blk_fs_request
(
rq
)
||
!
rq
->
rq_disk
)
return
;
if
(
!
new_io
)
{
__disk_stat_inc
(
rq
->
rq_disk
,
merges
[
rw
]);
}
else
{
disk_round_stats
(
rq
->
rq_disk
);
rq
->
rq_disk
->
in_flight
++
;
}
}
void
blk_queue_congestion_threshold
(
struct
request_queue
*
q
)
{
int
nr
;
...
...
@@ -168,21 +181,6 @@ void blk_dump_rq_flags(struct request *rq, char *msg)
EXPORT_SYMBOL
(
blk_dump_rq_flags
);
void
blk_recount_segments
(
struct
request_queue
*
q
,
struct
bio
*
bio
)
{
struct
request
rq
;
struct
bio
*
nxt
=
bio
->
bi_next
;
rq
.
q
=
q
;
rq
.
bio
=
rq
.
biotail
=
bio
;
bio
->
bi_next
=
NULL
;
blk_recalc_rq_segments
(
&
rq
);
bio
->
bi_next
=
nxt
;
bio
->
bi_phys_segments
=
rq
.
nr_phys_segments
;
bio
->
bi_hw_segments
=
rq
.
nr_hw_segments
;
bio
->
bi_flags
|=
(
1
<<
BIO_SEG_VALID
);
}
EXPORT_SYMBOL
(
blk_recount_segments
);
static
void
blk_recalc_rq_segments
(
struct
request
*
rq
)
{
int
nr_phys_segs
;
...
...
@@ -255,6 +253,21 @@ new_hw_segment:
rq
->
nr_hw_segments
=
nr_hw_segs
;
}
void
blk_recount_segments
(
struct
request_queue
*
q
,
struct
bio
*
bio
)
{
struct
request
rq
;
struct
bio
*
nxt
=
bio
->
bi_next
;
rq
.
q
=
q
;
rq
.
bio
=
rq
.
biotail
=
bio
;
bio
->
bi_next
=
NULL
;
blk_recalc_rq_segments
(
&
rq
);
bio
->
bi_next
=
nxt
;
bio
->
bi_phys_segments
=
rq
.
nr_phys_segments
;
bio
->
bi_hw_segments
=
rq
.
nr_hw_segments
;
bio
->
bi_flags
|=
(
1
<<
BIO_SEG_VALID
);
}
EXPORT_SYMBOL
(
blk_recount_segments
);
static
int
blk_phys_contig_segment
(
struct
request_queue
*
q
,
struct
bio
*
bio
,
struct
bio
*
nxt
)
{
...
...
@@ -1305,21 +1318,6 @@ void blk_insert_request(struct request_queue *q, struct request *rq,
EXPORT_SYMBOL
(
blk_insert_request
);
static
void
drive_stat_acct
(
struct
request
*
rq
,
int
new_io
)
{
int
rw
=
rq_data_dir
(
rq
);
if
(
!
blk_fs_request
(
rq
)
||
!
rq
->
rq_disk
)
return
;
if
(
!
new_io
)
{
__disk_stat_inc
(
rq
->
rq_disk
,
merges
[
rw
]);
}
else
{
disk_round_stats
(
rq
->
rq_disk
);
rq
->
rq_disk
->
in_flight
++
;
}
}
/*
* add-request adds a request to the linked list.
* queue lock is held and interrupts disabled, as we muck with the
...
...
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