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
248e9f75
Commit
248e9f75
authored
Feb 24, 2011
by
Konrad Rzeszutek Wilk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xen/blkback: Replace WRITE_BARRIER with (REQ_FLUSH | REQ_FUA)
TODO: Double check xen-blkfront.c
parent
313d7b00
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
drivers/xen/blkback/blkback.c
drivers/xen/blkback/blkback.c
+4
-4
No files found.
drivers/xen/blkback/blkback.c
View file @
248e9f75
...
...
@@ -405,7 +405,7 @@ static void dispatch_rw_block_io(blkif_t *blkif,
operation
=
WRITE
;
break
;
case
BLKIF_OP_WRITE_BARRIER
:
operation
=
WRITE_BARRIER
;
operation
=
REQ_FLUSH
|
REQ_FUA
;
break
;
default:
operation
=
0
;
/* make gcc happy */
...
...
@@ -414,7 +414,7 @@ static void dispatch_rw_block_io(blkif_t *blkif,
/* Check that number of segments is sane. */
nseg
=
req
->
nr_segments
;
if
(
unlikely
(
nseg
==
0
&&
operation
!=
WRITE_BARRIER
)
||
if
(
unlikely
(
nseg
==
0
&&
operation
!=
(
REQ_FLUSH
|
REQ_FUA
)
)
||
unlikely
(
nseg
>
BLKIF_MAX_SEGMENTS_PER_REQUEST
))
{
DPRINTK
(
"Bad number of segments in request (%d)
\n
"
,
nseg
);
goto
fail_response
;
...
...
@@ -517,7 +517,7 @@ static void dispatch_rw_block_io(blkif_t *blkif,
}
if
(
!
bio
)
{
BUG_ON
(
operation
!=
WRITE_BARRIER
);
BUG_ON
(
operation
!=
(
REQ_FLUSH
|
REQ_FUA
)
);
bio
=
bio_alloc
(
GFP_KERNEL
,
0
);
if
(
unlikely
(
bio
==
NULL
))
goto
fail_put_bio
;
...
...
@@ -532,7 +532,7 @@ static void dispatch_rw_block_io(blkif_t *blkif,
if
(
operation
==
READ
)
blkif
->
st_rd_sect
+=
preq
.
nr_sects
;
else
if
(
operation
==
WRITE
||
operation
==
WRITE_BARRIER
)
else
if
(
operation
==
WRITE
||
operation
==
(
REQ_FLUSH
|
REQ_FUA
)
)
blkif
->
st_wr_sect
+=
preq
.
nr_sects
;
return
;
...
...
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