diff options
author | Christoph Hellwig <hch@infradead.org> | 2011-09-12 06:12:01 -0400 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2011-09-12 06:12:01 -0400 |
commit | 5a7bbad27a410350e64a2d7f5ec18fc73836c14f (patch) | |
tree | 3447cd62dbcbd77b4071e2eb7576f1d7632ef2d3 /arch | |
parent | c20e8de27fef9f59869c81c288ad6cf28200e00c (diff) |
block: remove support for bio remapping from ->make_request
There is very little benefit in allowing to let a ->make_request
instance update the bios device and sector and loop around it in
__generic_make_request when we can archive the same through calling
generic_make_request from the driver and letting the loop in
generic_make_request handle it.
Note that various drivers got the return value from ->make_request and
returned non-zero values for errors.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: NeilBrown <neilb@suse.de>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/m68k/emu/nfblock.c | 3 | ||||
-rw-r--r-- | arch/powerpc/sysdev/axonram.c | 8 |
2 files changed, 3 insertions, 8 deletions
diff --git a/arch/m68k/emu/nfblock.c b/arch/m68k/emu/nfblock.c index 48e50f8c1c7e..e3011338ab40 100644 --- a/arch/m68k/emu/nfblock.c +++ b/arch/m68k/emu/nfblock.c | |||
@@ -59,7 +59,7 @@ struct nfhd_device { | |||
59 | struct gendisk *disk; | 59 | struct gendisk *disk; |
60 | }; | 60 | }; |
61 | 61 | ||
62 | static int nfhd_make_request(struct request_queue *queue, struct bio *bio) | 62 | static void nfhd_make_request(struct request_queue *queue, struct bio *bio) |
63 | { | 63 | { |
64 | struct nfhd_device *dev = queue->queuedata; | 64 | struct nfhd_device *dev = queue->queuedata; |
65 | struct bio_vec *bvec; | 65 | struct bio_vec *bvec; |
@@ -76,7 +76,6 @@ static int nfhd_make_request(struct request_queue *queue, struct bio *bio) | |||
76 | sec += len; | 76 | sec += len; |
77 | } | 77 | } |
78 | bio_endio(bio, 0); | 78 | bio_endio(bio, 0); |
79 | return 0; | ||
80 | } | 79 | } |
81 | 80 | ||
82 | static int nfhd_getgeo(struct block_device *bdev, struct hd_geometry *geo) | 81 | static int nfhd_getgeo(struct block_device *bdev, struct hd_geometry *geo) |
diff --git a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c index 265f0f09395a..ba4271919062 100644 --- a/arch/powerpc/sysdev/axonram.c +++ b/arch/powerpc/sysdev/axonram.c | |||
@@ -104,7 +104,7 @@ axon_ram_irq_handler(int irq, void *dev) | |||
104 | * axon_ram_make_request - make_request() method for block device | 104 | * axon_ram_make_request - make_request() method for block device |
105 | * @queue, @bio: see blk_queue_make_request() | 105 | * @queue, @bio: see blk_queue_make_request() |
106 | */ | 106 | */ |
107 | static int | 107 | static void |
108 | axon_ram_make_request(struct request_queue *queue, struct bio *bio) | 108 | axon_ram_make_request(struct request_queue *queue, struct bio *bio) |
109 | { | 109 | { |
110 | struct axon_ram_bank *bank = bio->bi_bdev->bd_disk->private_data; | 110 | struct axon_ram_bank *bank = bio->bi_bdev->bd_disk->private_data; |
@@ -113,7 +113,6 @@ axon_ram_make_request(struct request_queue *queue, struct bio *bio) | |||
113 | struct bio_vec *vec; | 113 | struct bio_vec *vec; |
114 | unsigned int transfered; | 114 | unsigned int transfered; |
115 | unsigned short idx; | 115 | unsigned short idx; |
116 | int rc = 0; | ||
117 | 116 | ||
118 | phys_mem = bank->io_addr + (bio->bi_sector << AXON_RAM_SECTOR_SHIFT); | 117 | phys_mem = bank->io_addr + (bio->bi_sector << AXON_RAM_SECTOR_SHIFT); |
119 | phys_end = bank->io_addr + bank->size; | 118 | phys_end = bank->io_addr + bank->size; |
@@ -121,8 +120,7 @@ axon_ram_make_request(struct request_queue *queue, struct bio *bio) | |||
121 | bio_for_each_segment(vec, bio, idx) { | 120 | bio_for_each_segment(vec, bio, idx) { |
122 | if (unlikely(phys_mem + vec->bv_len > phys_end)) { | 121 | if (unlikely(phys_mem + vec->bv_len > phys_end)) { |
123 | bio_io_error(bio); | 122 | bio_io_error(bio); |
124 | rc = -ERANGE; | 123 | return; |
125 | break; | ||
126 | } | 124 | } |
127 | 125 | ||
128 | user_mem = page_address(vec->bv_page) + vec->bv_offset; | 126 | user_mem = page_address(vec->bv_page) + vec->bv_offset; |
@@ -135,8 +133,6 @@ axon_ram_make_request(struct request_queue *queue, struct bio *bio) | |||
135 | transfered += vec->bv_len; | 133 | transfered += vec->bv_len; |
136 | } | 134 | } |
137 | bio_endio(bio, 0); | 135 | bio_endio(bio, 0); |
138 | |||
139 | return rc; | ||
140 | } | 136 | } |
141 | 137 | ||
142 | /** | 138 | /** |