Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
e3102b26
Commit
e3102b26
authored
Jun 02, 2002
by
Jens Axboe
Committed by
Linus Torvalds
Jun 02, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] misc generic block tag fixes
A buglet and a few adjustments.
parent
15283e97
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
drivers/block/ll_rw_blk.c
drivers/block/ll_rw_blk.c
+13
-5
No files found.
drivers/block/ll_rw_blk.c
View file @
e3102b26
...
@@ -336,8 +336,10 @@ int blk_queue_init_tags(request_queue_t *q, int depth)
...
@@ -336,8 +336,10 @@ int blk_queue_init_tags(request_queue_t *q, int depth)
struct
blk_queue_tag
*
tags
;
struct
blk_queue_tag
*
tags
;
int
bits
,
i
;
int
bits
,
i
;
if
(
depth
>
queue_nr_requests
)
if
(
depth
>
queue_nr_requests
)
{
depth
=
queue_nr_requests
;
depth
=
queue_nr_requests
;
printk
(
"blk_queue_init_tags: adjusted depth to %d
\n
"
,
depth
);
}
tags
=
kmalloc
(
sizeof
(
struct
blk_queue_tag
),
GFP_ATOMIC
);
tags
=
kmalloc
(
sizeof
(
struct
blk_queue_tag
),
GFP_ATOMIC
);
if
(
!
tags
)
if
(
!
tags
)
...
@@ -362,7 +364,7 @@ int blk_queue_init_tags(request_queue_t *q, int depth)
...
@@ -362,7 +364,7 @@ int blk_queue_init_tags(request_queue_t *q, int depth)
* set the upper bits if the depth isn't a multiple of the word size
* set the upper bits if the depth isn't a multiple of the word size
*/
*/
for
(
i
=
depth
;
i
<
bits
*
BLK_TAGS_PER_LONG
;
i
++
)
for
(
i
=
depth
;
i
<
bits
*
BLK_TAGS_PER_LONG
;
i
++
)
set_bit
(
i
,
tags
->
tag_map
);
__
set_bit
(
i
,
tags
->
tag_map
);
/*
/*
* assign it, all done
* assign it, all done
...
@@ -478,13 +480,19 @@ int blk_queue_start_tag(request_queue_t *q, struct request *rq)
...
@@ -478,13 +480,19 @@ int blk_queue_start_tag(request_queue_t *q, struct request *rq)
void
blk_queue_invalidate_tags
(
request_queue_t
*
q
)
void
blk_queue_invalidate_tags
(
request_queue_t
*
q
)
{
{
struct
blk_queue_tag
*
bqt
=
q
->
queue_tags
;
struct
blk_queue_tag
*
bqt
=
q
->
queue_tags
;
struct
list_head
*
tmp
;
struct
list_head
*
tmp
,
*
n
;
struct
request
*
rq
;
struct
request
*
rq
;
list_for_each
(
tmp
,
&
bqt
->
busy_list
)
{
list_for_each
_safe
(
tmp
,
n
,
&
bqt
->
busy_list
)
{
rq
=
list_entry_rq
(
tmp
);
rq
=
list_entry_rq
(
tmp
);
if
(
rq
->
tag
==
-
1
)
{
printk
(
"bad tag found on list
\n
"
);
list_del
(
&
rq
->
queue
);
rq
->
tagged
=
0
;
}
else
blk_queue_end_tag
(
q
,
rq
);
blk_queue_end_tag
(
q
,
rq
);
rq
->
flags
&=
~
REQ_STARTED
;
rq
->
flags
&=
~
REQ_STARTED
;
elv_add_request
(
q
,
rq
,
0
);
elv_add_request
(
q
,
rq
,
0
);
}
}
...
...
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