aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/osd
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2010-08-07 12:20:39 -0400
committerJens Axboe <jaxboe@fusionio.com>2010-08-07 12:20:39 -0400
commit7b6d91daee5cac6402186ff224c3af39d79f4a0e (patch)
treeb1518cf0b6c301178e0a320f80610cd5b3aa7625 /drivers/scsi/osd
parent33659ebbae262228eef4e0fe990f393d1f0ed941 (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/scsi/osd')
-rw-r--r--drivers/scsi/osd/osd_initiator.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c
index ee4b6914667f..fda4de3440c4 100644
--- a/drivers/scsi/osd/osd_initiator.c
+++ b/drivers/scsi/osd/osd_initiator.c
@@ -716,7 +716,7 @@ static int _osd_req_list_objects(struct osd_request *or,
716 return PTR_ERR(bio); 716 return PTR_ERR(bio);
717 } 717 }
718 718
719 bio->bi_rw &= ~(1 << BIO_RW); 719 bio->bi_rw &= ~REQ_WRITE;
720 or->in.bio = bio; 720 or->in.bio = bio;
721 or->in.total_bytes = bio->bi_size; 721 or->in.total_bytes = bio->bi_size;
722 return 0; 722 return 0;
@@ -814,7 +814,7 @@ void osd_req_write(struct osd_request *or,
814{ 814{
815 _osd_req_encode_common(or, OSD_ACT_WRITE, obj, offset, len); 815 _osd_req_encode_common(or, OSD_ACT_WRITE, obj, offset, len);
816 WARN_ON(or->out.bio || or->out.total_bytes); 816 WARN_ON(or->out.bio || or->out.total_bytes);
817 WARN_ON(0 == bio_rw_flagged(bio, BIO_RW)); 817 WARN_ON(0 == (bio->bi_rw & REQ_WRITE));
818 or->out.bio = bio; 818 or->out.bio = bio;
819 or->out.total_bytes = len; 819 or->out.total_bytes = len;
820} 820}
@@ -829,7 +829,7 @@ int osd_req_write_kern(struct osd_request *or,
829 if (IS_ERR(bio)) 829 if (IS_ERR(bio))
830 return PTR_ERR(bio); 830 return PTR_ERR(bio);
831 831
832 bio->bi_rw |= (1 << BIO_RW); /* FIXME: bio_set_dir() */ 832 bio->bi_rw |= REQ_WRITE; /* FIXME: bio_set_dir() */
833 osd_req_write(or, obj, offset, bio, len); 833 osd_req_write(or, obj, offset, bio, len);
834 return 0; 834 return 0;
835} 835}
@@ -865,7 +865,7 @@ void osd_req_read(struct osd_request *or,
865{ 865{
866 _osd_req_encode_common(or, OSD_ACT_READ, obj, offset, len); 866 _osd_req_encode_common(or, OSD_ACT_READ, obj, offset, len);
867 WARN_ON(or->in.bio || or->in.total_bytes); 867 WARN_ON(or->in.bio || or->in.total_bytes);
868 WARN_ON(1 == bio_rw_flagged(bio, BIO_RW)); 868 WARN_ON(1 == (bio->bi_rw & REQ_WRITE));
869 or->in.bio = bio; 869 or->in.bio = bio;
870 or->in.total_bytes = len; 870 or->in.total_bytes = len;
871} 871}