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
478a82b0
Commit
478a82b0
authored
Mar 18, 2006
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] switch to use of ->key to get cfq_data by cfq_io_context
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
7670876d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
11 deletions
+15
-11
block/cfq-iosched.c
block/cfq-iosched.c
+15
-11
No files found.
block/cfq-iosched.c
View file @
478a82b0
...
@@ -1212,7 +1212,7 @@ static void cfq_free_io_context(struct cfq_io_context *cic)
...
@@ -1212,7 +1212,7 @@ static void cfq_free_io_context(struct cfq_io_context *cic)
*/
*/
static
void
cfq_exit_single_io_context
(
struct
cfq_io_context
*
cic
)
static
void
cfq_exit_single_io_context
(
struct
cfq_io_context
*
cic
)
{
{
struct
cfq_data
*
cfqd
=
cic
->
cfqq
->
cfqd
;
struct
cfq_data
*
cfqd
=
cic
->
key
;
request_queue_t
*
q
=
cfqd
->
queue
;
request_queue_t
*
q
=
cfqd
->
queue
;
WARN_ON
(
!
irqs_disabled
());
WARN_ON
(
!
irqs_disabled
());
...
@@ -1224,6 +1224,7 @@ static void cfq_exit_single_io_context(struct cfq_io_context *cic)
...
@@ -1224,6 +1224,7 @@ static void cfq_exit_single_io_context(struct cfq_io_context *cic)
cfq_put_queue
(
cic
->
cfqq
);
cfq_put_queue
(
cic
->
cfqq
);
cic
->
cfqq
=
NULL
;
cic
->
cfqq
=
NULL
;
cic
->
key
=
NULL
;
spin_unlock
(
q
->
queue_lock
);
spin_unlock
(
q
->
queue_lock
);
}
}
...
@@ -1318,14 +1319,17 @@ static void cfq_init_prio_data(struct cfq_queue *cfqq)
...
@@ -1318,14 +1319,17 @@ static void cfq_init_prio_data(struct cfq_queue *cfqq)
cfq_clear_cfqq_prio_changed
(
cfqq
);
cfq_clear_cfqq_prio_changed
(
cfqq
);
}
}
static
inline
void
changed_ioprio
(
struct
cfq_
queue
*
cfqq
)
static
inline
void
changed_ioprio
(
struct
cfq_
io_context
*
cic
)
{
{
if
(
cfqq
)
{
struct
cfq_data
*
cfqd
=
cic
->
key
;
struct
cfq_data
*
cfqd
=
cfqq
->
cfqd
;
struct
cfq_queue
*
cfqq
;
if
(
cfqd
)
{
spin_lock
(
cfqd
->
queue
->
queue_lock
);
spin_lock
(
cfqd
->
queue
->
queue_lock
);
cfq_mark_cfqq_prio_changed
(
cfqq
);
cfqq
=
cic
->
cfqq
;
cfq_init_prio_data
(
cfqq
);
if
(
cfqq
)
{
cfq_mark_cfqq_prio_changed
(
cfqq
);
cfq_init_prio_data
(
cfqq
);
}
spin_unlock
(
cfqd
->
queue
->
queue_lock
);
spin_unlock
(
cfqd
->
queue
->
queue_lock
);
}
}
}
}
...
@@ -1337,10 +1341,10 @@ static int cfq_ioc_set_ioprio(struct io_context *ioc, unsigned int ioprio)
...
@@ -1337,10 +1341,10 @@ static int cfq_ioc_set_ioprio(struct io_context *ioc, unsigned int ioprio)
{
{
struct
cfq_io_context
*
cic
=
ioc
->
cic
;
struct
cfq_io_context
*
cic
=
ioc
->
cic
;
changed_ioprio
(
cic
->
cfqq
);
changed_ioprio
(
cic
);
list_for_each_entry
(
cic
,
&
cic
->
list
,
list
)
list_for_each_entry
(
cic
,
&
cic
->
list
,
list
)
changed_ioprio
(
cic
->
cfqq
);
changed_ioprio
(
cic
);
return
0
;
return
0
;
}
}
...
@@ -1429,10 +1433,10 @@ cfq_get_io_context(struct cfq_data *cfqd, pid_t pid, gfp_t gfp_mask)
...
@@ -1429,10 +1433,10 @@ cfq_get_io_context(struct cfq_data *cfqd, pid_t pid, gfp_t gfp_mask)
* manually increment generic io_context usage count, it
* manually increment generic io_context usage count, it
* cannot go away since we are already holding one ref to it
* cannot go away since we are already holding one ref to it
*/
*/
ioc
->
cic
=
cic
;
ioc
->
set_ioprio
=
cfq_ioc_set_ioprio
;
cic
->
ioc
=
ioc
;
cic
->
ioc
=
ioc
;
cic
->
key
=
cfqd
;
cic
->
key
=
cfqd
;
ioc
->
set_ioprio
=
cfq_ioc_set_ioprio
;
ioc
->
cic
=
cic
;
}
else
{
}
else
{
struct
cfq_io_context
*
__cic
;
struct
cfq_io_context
*
__cic
;
...
...
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