Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
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
Kirill Smelkov
mariadb
Commits
4fed8f71
Commit
4fed8f71
authored
Jan 09, 2009
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: buf_flush_try_page(): Move some common code from each
switch case before the switch block.
parent
673ef6e1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
31 deletions
+9
-31
buf/buf0flu.c
buf/buf0flu.c
+9
-31
No files found.
buf/buf0flu.c
View file @
4fed8f71
...
...
@@ -790,8 +790,6 @@ buf_flush_try_page(
return
(
0
);
}
switch
(
flush_type
)
{
case
BUF_FLUSH_LIST
:
buf_page_set_io_fix
(
bpage
,
BUF_IO_WRITE
);
buf_page_set_flush_type
(
bpage
,
flush_type
);
...
...
@@ -803,6 +801,8 @@ buf_flush_try_page(
buf_pool
->
n_flush
[
flush_type
]
++
;
switch
(
flush_type
)
{
case
BUF_FLUSH_LIST
:
/* If the simulated aio thread is not running, we must
not wait for any latch, as we may end up in a deadlock:
if buf_fix_count == 0, then we know we need not wait */
...
...
@@ -835,18 +835,7 @@ buf_flush_try_page(
s-lock is acquired on the page without waiting: this is
accomplished because in the if-condition above we require
the page not to be bufferfixed (in function
..._ready_for_flush). */
buf_page_set_io_fix
(
bpage
,
BUF_IO_WRITE
);
buf_page_set_flush_type
(
bpage
,
flush_type
);
if
(
buf_pool
->
n_flush
[
flush_type
]
==
0
)
{
os_event_reset
(
buf_pool
->
no_flush
[
flush_type
]);
}
buf_pool
->
n_flush
[
flush_type
]
++
;
buf_flush_ready_for_flush). */
if
(
buf_page_get_state
(
bpage
)
==
BUF_BLOCK_FILE_PAGE
)
{
rw_lock_s_lock_gen
(
&
((
buf_block_t
*
)
bpage
)
->
lock
,
...
...
@@ -862,17 +851,6 @@ buf_flush_try_page(
break
;
case
BUF_FLUSH_SINGLE_PAGE
:
buf_page_set_io_fix
(
bpage
,
BUF_IO_WRITE
);
buf_page_set_flush_type
(
bpage
,
flush_type
);
if
(
buf_pool
->
n_flush
[
flush_type
]
==
0
)
{
os_event_reset
(
buf_pool
->
no_flush
[
flush_type
]);
}
buf_pool
->
n_flush
[
flush_type
]
++
;
mutex_exit
(
block_mutex
);
buf_pool_mutex_exit
();
...
...
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