aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-02-24 17:22:41 -0500
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-04-14 18:26:17 -0400
commit248e9f7539f8351cd857d12a74bd52133a3a900f (patch)
tree47be5eb59fb80d40f66c05da67713e8c0d806c9f
parent313d7b003ceceb797e8c0d18ab085ed0638b4aff (diff)
xen/blkback: Replace WRITE_BARRIER with (REQ_FLUSH | REQ_FUA)
TODO: Double check xen-blkfront.c
-rw-r--r--drivers/xen/blkback/blkback.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/xen/blkback/blkback.c b/drivers/xen/blkback/blkback.c
index 6d897664802d..cb844f734d91 100644
--- a/drivers/xen/blkback/blkback.c
+++ b/drivers/xen/blkback/blkback.c
@@ -405,7 +405,7 @@ static void dispatch_rw_block_io(blkif_t *blkif,
405 operation = WRITE; 405 operation = WRITE;
406 break; 406 break;
407 case BLKIF_OP_WRITE_BARRIER: 407 case BLKIF_OP_WRITE_BARRIER:
408 operation = WRITE_BARRIER; 408 operation = REQ_FLUSH | REQ_FUA;
409 break; 409 break;
410 default: 410 default:
411 operation = 0; /* make gcc happy */ 411 operation = 0; /* make gcc happy */
@@ -414,7 +414,7 @@ static void dispatch_rw_block_io(blkif_t *blkif,
414 414
415 /* Check that number of segments is sane. */ 415 /* Check that number of segments is sane. */
416 nseg = req->nr_segments; 416 nseg = req->nr_segments;
417 if (unlikely(nseg == 0 && operation != WRITE_BARRIER) || 417 if (unlikely(nseg == 0 && operation != (REQ_FLUSH | REQ_FUA)) ||
418 unlikely(nseg > BLKIF_MAX_SEGMENTS_PER_REQUEST)) { 418 unlikely(nseg > BLKIF_MAX_SEGMENTS_PER_REQUEST)) {
419 DPRINTK("Bad number of segments in request (%d)\n", nseg); 419 DPRINTK("Bad number of segments in request (%d)\n", nseg);
420 goto fail_response; 420 goto fail_response;
@@ -517,7 +517,7 @@ static void dispatch_rw_block_io(blkif_t *blkif,
517 } 517 }
518 518
519 if (!bio) { 519 if (!bio) {
520 BUG_ON(operation != WRITE_BARRIER); 520 BUG_ON(operation != (REQ_FLUSH | REQ_FUA));
521 bio = bio_alloc(GFP_KERNEL, 0); 521 bio = bio_alloc(GFP_KERNEL, 0);
522 if (unlikely(bio == NULL)) 522 if (unlikely(bio == NULL))
523 goto fail_put_bio; 523 goto fail_put_bio;
@@ -532,7 +532,7 @@ static void dispatch_rw_block_io(blkif_t *blkif,
532 532
533 if (operation == READ) 533 if (operation == READ)
534 blkif->st_rd_sect += preq.nr_sects; 534 blkif->st_rd_sect += preq.nr_sects;
535 else if (operation == WRITE || operation == WRITE_BARRIER) 535 else if (operation == WRITE || operation == (REQ_FLUSH | REQ_FUA))
536 blkif->st_wr_sect += preq.nr_sects; 536 blkif->st_wr_sect += preq.nr_sects;
537 537
538 return; 538 return;