diff options
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index cb20d0b0555a..1893af678779 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -353,7 +353,7 @@ static void md_submit_barrier(struct work_struct *ws) | |||
353 | /* an empty barrier - all done */ | 353 | /* an empty barrier - all done */ |
354 | bio_endio(bio, 0); | 354 | bio_endio(bio, 0); |
355 | else { | 355 | else { |
356 | bio->bi_rw &= ~(1<<BIO_RW_BARRIER); | 356 | bio->bi_rw &= ~REQ_HARDBARRIER; |
357 | if (mddev->pers->make_request(mddev, bio)) | 357 | if (mddev->pers->make_request(mddev, bio)) |
358 | generic_make_request(bio); | 358 | generic_make_request(bio); |
359 | mddev->barrier = POST_REQUEST_BARRIER; | 359 | mddev->barrier = POST_REQUEST_BARRIER; |
@@ -675,11 +675,11 @@ void md_super_write(mddev_t *mddev, mdk_rdev_t *rdev, | |||
675 | * if zero is reached. | 675 | * if zero is reached. |
676 | * If an error occurred, call md_error | 676 | * If an error occurred, call md_error |
677 | * | 677 | * |
678 | * As we might need to resubmit the request if BIO_RW_BARRIER | 678 | * As we might need to resubmit the request if REQ_HARDBARRIER |
679 | * causes ENOTSUPP, we allocate a spare bio... | 679 | * causes ENOTSUPP, we allocate a spare bio... |
680 | */ | 680 | */ |
681 | struct bio *bio = bio_alloc(GFP_NOIO, 1); | 681 | struct bio *bio = bio_alloc(GFP_NOIO, 1); |
682 | int rw = (1<<BIO_RW) | (1<<BIO_RW_SYNCIO) | (1<<BIO_RW_UNPLUG); | 682 | int rw = REQ_WRITE | REQ_SYNC | REQ_UNPLUG; |
683 | 683 | ||
684 | bio->bi_bdev = rdev->bdev; | 684 | bio->bi_bdev = rdev->bdev; |
685 | bio->bi_sector = sector; | 685 | bio->bi_sector = sector; |
@@ -691,7 +691,7 @@ void md_super_write(mddev_t *mddev, mdk_rdev_t *rdev, | |||
691 | atomic_inc(&mddev->pending_writes); | 691 | atomic_inc(&mddev->pending_writes); |
692 | if (!test_bit(BarriersNotsupp, &rdev->flags)) { | 692 | if (!test_bit(BarriersNotsupp, &rdev->flags)) { |
693 | struct bio *rbio; | 693 | struct bio *rbio; |
694 | rw |= (1<<BIO_RW_BARRIER); | 694 | rw |= REQ_HARDBARRIER; |
695 | rbio = bio_clone(bio, GFP_NOIO); | 695 | rbio = bio_clone(bio, GFP_NOIO); |
696 | rbio->bi_private = bio; | 696 | rbio->bi_private = bio; |
697 | rbio->bi_end_io = super_written_barrier; | 697 | rbio->bi_end_io = super_written_barrier; |
@@ -736,7 +736,7 @@ int sync_page_io(struct block_device *bdev, sector_t sector, int size, | |||
736 | struct completion event; | 736 | struct completion event; |
737 | int ret; | 737 | int ret; |
738 | 738 | ||
739 | rw |= (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG); | 739 | rw |= REQ_SYNC | REQ_UNPLUG; |
740 | 740 | ||
741 | bio->bi_bdev = bdev; | 741 | bio->bi_bdev = bdev; |
742 | bio->bi_sector = sector; | 742 | bio->bi_sector = sector; |