diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-02-16 04:25:40 -0500 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-02-18 04:32:00 -0500 |
commit | 93dbb393503d53cd226e5e1f0088fe8f4dbaa2b8 (patch) | |
tree | 790365e207951cf6810e8995f3141ddc0b74519b /drivers | |
parent | c1c201200a359cf3b6e2e36a4236cdca77a3cd8e (diff) |
block: fix bad definition of BIO_RW_SYNC
We can't OR shift values, so get rid of BIO_RW_SYNC and use BIO_RW_SYNCIO
and BIO_RW_UNPLUG explicitly. This brings back the behaviour from before
213d9417fec62ef4c3675621b9364a667954d4dd.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/dm-io.c | 2 | ||||
-rw-r--r-- | drivers/md/dm-kcopyd.c | 2 | ||||
-rw-r--r-- | drivers/md/md.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/drivers/md/dm-io.c b/drivers/md/dm-io.c index a34338567a2a..f14813be4eff 100644 --- a/drivers/md/dm-io.c +++ b/drivers/md/dm-io.c | |||
@@ -328,7 +328,7 @@ static void dispatch_io(int rw, unsigned int num_regions, | |||
328 | struct dpages old_pages = *dp; | 328 | struct dpages old_pages = *dp; |
329 | 329 | ||
330 | if (sync) | 330 | if (sync) |
331 | rw |= (1 << BIO_RW_SYNC); | 331 | rw |= (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG); |
332 | 332 | ||
333 | /* | 333 | /* |
334 | * For multiple regions we need to be careful to rewind | 334 | * For multiple regions we need to be careful to rewind |
diff --git a/drivers/md/dm-kcopyd.c b/drivers/md/dm-kcopyd.c index 3073618269ea..0a225da21272 100644 --- a/drivers/md/dm-kcopyd.c +++ b/drivers/md/dm-kcopyd.c | |||
@@ -344,7 +344,7 @@ static int run_io_job(struct kcopyd_job *job) | |||
344 | { | 344 | { |
345 | int r; | 345 | int r; |
346 | struct dm_io_request io_req = { | 346 | struct dm_io_request io_req = { |
347 | .bi_rw = job->rw | (1 << BIO_RW_SYNC), | 347 | .bi_rw = job->rw | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG), |
348 | .mem.type = DM_IO_PAGE_LIST, | 348 | .mem.type = DM_IO_PAGE_LIST, |
349 | .mem.ptr.pl = job->pages, | 349 | .mem.ptr.pl = job->pages, |
350 | .mem.offset = job->offset, | 350 | .mem.offset = job->offset, |
diff --git a/drivers/md/md.c b/drivers/md/md.c index 4495104f6c9f..03b4cd0a6344 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -474,7 +474,7 @@ void md_super_write(mddev_t *mddev, mdk_rdev_t *rdev, | |||
474 | * causes ENOTSUPP, we allocate a spare bio... | 474 | * causes ENOTSUPP, we allocate a spare bio... |
475 | */ | 475 | */ |
476 | struct bio *bio = bio_alloc(GFP_NOIO, 1); | 476 | struct bio *bio = bio_alloc(GFP_NOIO, 1); |
477 | int rw = (1<<BIO_RW) | (1<<BIO_RW_SYNC); | 477 | int rw = (1<<BIO_RW) | (1<<BIO_RW_SYNCIO) | (1<<BIO_RW_UNPLUG); |
478 | 478 | ||
479 | bio->bi_bdev = rdev->bdev; | 479 | bio->bi_bdev = rdev->bdev; |
480 | bio->bi_sector = sector; | 480 | bio->bi_sector = sector; |
@@ -531,7 +531,7 @@ int sync_page_io(struct block_device *bdev, sector_t sector, int size, | |||
531 | struct completion event; | 531 | struct completion event; |
532 | int ret; | 532 | int ret; |
533 | 533 | ||
534 | rw |= (1 << BIO_RW_SYNC); | 534 | rw |= (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG); |
535 | 535 | ||
536 | bio->bi_bdev = bdev; | 536 | bio->bi_bdev = bdev; |
537 | bio->bi_sector = sector; | 537 | bio->bi_sector = sector; |