diff options
author | Tejun Heo <tj@kernel.org> | 2009-05-07 09:24:39 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-05-11 03:50:54 -0400 |
commit | 83096ebf1263b2c1ee5e653ba37d993d02e3eb7b (patch) | |
tree | 2226b71a616ec1cb2d37511c6a09ba9507a1cd69 /drivers/s390/char | |
parent | 5b93629b4509c03ffa87a9316412fedf6f58cb37 (diff) |
block: convert to pos and nr_sectors accessors
With recent cleanups, there is no place where low level driver
directly manipulates request fields. This means that the 'hard'
request fields always equal the !hard fields. Convert all
rq->sectors, nr_sectors and current_nr_sectors references to
accessors.
While at it, drop superflous blk_rq_pos() < 0 test in swim.c.
[ Impact: use pos and nr_sectors accessors ]
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Tested-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Tested-by: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Acked-by: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Acked-by: Mike Miller <mike.miller@hp.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Borislav Petkov <petkovbb@googlemail.com>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Eric Moore <Eric.Moore@lsi.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Paul Clements <paul.clements@steeleye.com>
Cc: Tim Waugh <tim@cyberelk.net>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Alex Dubov <oakad@yahoo.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Dario Ballabio <ballabio_dario@emc.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: unsik Kim <donari75@gmail.com>
Cc: Laurent Vivier <Laurent@lvivier.info>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/s390/char')
-rw-r--r-- | drivers/s390/char/tape_34xx.c | 2 | ||||
-rw-r--r-- | drivers/s390/char/tape_3590.c | 2 | ||||
-rw-r--r-- | drivers/s390/char/tape_block.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/s390/char/tape_34xx.c b/drivers/s390/char/tape_34xx.c index 5f8e8ef43dd3..2d00a383a475 100644 --- a/drivers/s390/char/tape_34xx.c +++ b/drivers/s390/char/tape_34xx.c | |||
@@ -1134,7 +1134,7 @@ tape_34xx_bread(struct tape_device *device, struct request *req) | |||
1134 | /* Setup ccws. */ | 1134 | /* Setup ccws. */ |
1135 | request->op = TO_BLOCK; | 1135 | request->op = TO_BLOCK; |
1136 | start_block = (struct tape_34xx_block_id *) request->cpdata; | 1136 | start_block = (struct tape_34xx_block_id *) request->cpdata; |
1137 | start_block->block = req->sector >> TAPEBLOCK_HSEC_S2B; | 1137 | start_block->block = blk_rq_pos(req) >> TAPEBLOCK_HSEC_S2B; |
1138 | DBF_EVENT(6, "start_block = %i\n", start_block->block); | 1138 | DBF_EVENT(6, "start_block = %i\n", start_block->block); |
1139 | 1139 | ||
1140 | ccw = request->cpaddr; | 1140 | ccw = request->cpaddr; |
diff --git a/drivers/s390/char/tape_3590.c b/drivers/s390/char/tape_3590.c index 823b05bd0dd7..c453b2f3e9f4 100644 --- a/drivers/s390/char/tape_3590.c +++ b/drivers/s390/char/tape_3590.c | |||
@@ -633,7 +633,7 @@ tape_3590_bread(struct tape_device *device, struct request *req) | |||
633 | struct req_iterator iter; | 633 | struct req_iterator iter; |
634 | 634 | ||
635 | DBF_EVENT(6, "xBREDid:"); | 635 | DBF_EVENT(6, "xBREDid:"); |
636 | start_block = req->sector >> TAPEBLOCK_HSEC_S2B; | 636 | start_block = blk_rq_pos(req) >> TAPEBLOCK_HSEC_S2B; |
637 | DBF_EVENT(6, "start_block = %i\n", start_block); | 637 | DBF_EVENT(6, "start_block = %i\n", start_block); |
638 | 638 | ||
639 | rq_for_each_segment(bv, req, iter) | 639 | rq_for_each_segment(bv, req, iter) |
diff --git a/drivers/s390/char/tape_block.c b/drivers/s390/char/tape_block.c index 86596d3813b5..5d035e4939dc 100644 --- a/drivers/s390/char/tape_block.c +++ b/drivers/s390/char/tape_block.c | |||
@@ -87,7 +87,7 @@ __tapeblock_end_request(struct tape_request *ccw_req, void *data) | |||
87 | if (ccw_req->rc == 0) | 87 | if (ccw_req->rc == 0) |
88 | /* Update position. */ | 88 | /* Update position. */ |
89 | device->blk_data.block_position = | 89 | device->blk_data.block_position = |
90 | (req->sector + req->nr_sectors) >> TAPEBLOCK_HSEC_S2B; | 90 | (blk_rq_pos(req) + blk_rq_sectors(req)) >> TAPEBLOCK_HSEC_S2B; |
91 | else | 91 | else |
92 | /* We lost the position information due to an error. */ | 92 | /* We lost the position information due to an error. */ |
93 | device->blk_data.block_position = -1; | 93 | device->blk_data.block_position = -1; |