Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251214
b: refs/heads/master
c: 248e9f7
h: refs/heads/master
v: v3
  • Loading branch information
Konrad Rzeszutek Wilk committed Apr 14, 2011
1 parent 8c85c04 commit 116189c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 313d7b003ceceb797e8c0d18ab085ed0638b4aff
refs/heads/master: 248e9f7539f8351cd857d12a74bd52133a3a900f
8 changes: 4 additions & 4 deletions trunk/drivers/xen/blkback/blkback.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 116189c

Please sign in to comment.