diff options
author | Christoph Hellwig <hch@lst.de> | 2010-08-07 12:20:39 -0400 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-08-07 12:20:39 -0400 |
commit | 7b6d91daee5cac6402186ff224c3af39d79f4a0e (patch) | |
tree | b1518cf0b6c301178e0a320f80610cd5b3aa7625 /drivers/block/drbd/drbd_actlog.c | |
parent | 33659ebbae262228eef4e0fe990f393d1f0ed941 (diff) |
block: unify flags for struct bio and struct request
Remove the current bio flags and reuse the request flags for the bio, too.
This allows to more easily trace the type of I/O from the filesystem
down to the block driver. There were two flags in the bio that were
missing in the requests: BIO_RW_UNPLUG and BIO_RW_AHEAD. Also I've
renamed two request flags that had a superflous RW in them.
Note that the flags are in bio.h despite having the REQ_ name - as
blkdev.h includes bio.h that is the only way to go for now.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'drivers/block/drbd/drbd_actlog.c')
-rw-r--r-- | drivers/block/drbd/drbd_actlog.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/block/drbd/drbd_actlog.c b/drivers/block/drbd/drbd_actlog.c index df018990c422..9400845d602e 100644 --- a/drivers/block/drbd/drbd_actlog.c +++ b/drivers/block/drbd/drbd_actlog.c | |||
@@ -79,8 +79,8 @@ static int _drbd_md_sync_page_io(struct drbd_conf *mdev, | |||
79 | md_io.error = 0; | 79 | md_io.error = 0; |
80 | 80 | ||
81 | if ((rw & WRITE) && !test_bit(MD_NO_BARRIER, &mdev->flags)) | 81 | if ((rw & WRITE) && !test_bit(MD_NO_BARRIER, &mdev->flags)) |
82 | rw |= (1 << BIO_RW_BARRIER); | 82 | rw |= REQ_HARDBARRIER; |
83 | rw |= ((1<<BIO_RW_UNPLUG) | (1<<BIO_RW_SYNCIO)); | 83 | rw |= REQ_UNPLUG | REQ_SYNC; |
84 | 84 | ||
85 | retry: | 85 | retry: |
86 | bio = bio_alloc(GFP_NOIO, 1); | 86 | bio = bio_alloc(GFP_NOIO, 1); |
@@ -103,11 +103,11 @@ static int _drbd_md_sync_page_io(struct drbd_conf *mdev, | |||
103 | /* check for unsupported barrier op. | 103 | /* check for unsupported barrier op. |
104 | * would rather check on EOPNOTSUPP, but that is not reliable. | 104 | * would rather check on EOPNOTSUPP, but that is not reliable. |
105 | * don't try again for ANY return value != 0 */ | 105 | * don't try again for ANY return value != 0 */ |
106 | if (unlikely(bio_rw_flagged(bio, BIO_RW_BARRIER) && !ok)) { | 106 | if (unlikely((bio->bi_rw & REQ_HARDBARRIER) && !ok)) { |
107 | /* Try again with no barrier */ | 107 | /* Try again with no barrier */ |
108 | dev_warn(DEV, "Barriers not supported on meta data device - disabling\n"); | 108 | dev_warn(DEV, "Barriers not supported on meta data device - disabling\n"); |
109 | set_bit(MD_NO_BARRIER, &mdev->flags); | 109 | set_bit(MD_NO_BARRIER, &mdev->flags); |
110 | rw &= ~(1 << BIO_RW_BARRIER); | 110 | rw &= ~REQ_HARDBARRIER; |
111 | bio_put(bio); | 111 | bio_put(bio); |
112 | goto retry; | 112 | goto retry; |
113 | } | 113 | } |