diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-08-25 16:01:33 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 12:02:33 -0700 |
commit | 8cd9c297a8ad1366789b934b0e4510c87beaf274 (patch) | |
tree | d1c67352a5843a0db2bb3d657d4b1759c4856526 /drivers | |
parent | dbda83255cf6a12d06527131214c123ee7ae96b9 (diff) | |
download | linux-8cd9c297a8ad1366789b934b0e4510c87beaf274.tar.gz linux-8cd9c297a8ad1366789b934b0e4510c87beaf274.tar.bz2 linux-8cd9c297a8ad1366789b934b0e4510c87beaf274.zip |
Staging: get cowloop to build properly
There has been some block api changes since the last
release of the cowloop code. This patch updates the code to
properly build.
Cc: "H.J. Thomassen" <hjt@ATComputing.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/cowloop/cowloop.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/staging/cowloop/cowloop.c b/drivers/staging/cowloop/cowloop.c index 23978012838a..c43654bc83cf 100644 --- a/drivers/staging/cowloop/cowloop.c +++ b/drivers/staging/cowloop/cowloop.c @@ -967,12 +967,12 @@ cowlo_request(request_queue_t *q) DEBUGP(DCOW "cowloop - request function called....\n"); - while((req = elv_next_request(q)) != NULL) { + while((req = blk_peek_request(q)) != NULL) { DEBUGP(DCOW "cowloop - got next request\n"); if (! blk_fs_request(req)) { /* this is not a normal file system request */ - end_request(req, 0); + __blk_end_request_cur(req, -EIO); continue; } cowdev = req->rq_disk->private_data; @@ -988,7 +988,7 @@ cowlo_request(request_queue_t *q) */ if (!cowdev->pid) { printk(KERN_ERR"cowloop - no thread available\n"); - end_request(req, 0); /* request failed */ + __blk_end_request_cur(req, -EIO); /* request failed */ cowdev->iobusy = 0; continue; } @@ -1058,7 +1058,7 @@ cowlo_daemon(struct cowloop_device *cowdev) */ spin_lock_irq(&cowdev->rqlock); - end_request(cowdev->req, rv); + __blk_end_request_cur(cowdev->req, rv); cowdev->iobusy = 0; /* @@ -1090,8 +1090,8 @@ cowlo_do_request(struct request *req) /* ** calculate some variables which are needed later on */ - len = req->current_nr_sectors << 9; - offset = (loff_t) req->sector << 9; + len = blk_rq_cur_sectors(req) << 9; + offset = (loff_t) blk_rq_pos(req) << 9; DEBUGP(DCOW"cowloop - req cmd=%d offset=%lld len=%lu addr=%p\n", *(req->cmd), offset, len, req->buffer); @@ -1918,7 +1918,7 @@ cowlo_openpair(char *rdof, char *cowf, int autorecover, int minor) return -EINVAL; } - blk_queue_hardsect_size(cowdev->rqueue, cowdev->blocksz); + blk_queue_logical_block_size(cowdev->rqueue, cowdev->blocksz); cowdev->gd->queue = cowdev->rqueue; /* @@ -2132,7 +2132,7 @@ cowlo_openrdo(struct cowloop_device *cowdev, char *rdof) if (cowdev->belowq) - cowdev->blocksz = cowdev->belowq->hardsect_size; + cowdev->blocksz = queue_logical_block_size(cowdev->belowq); if (cowdev->blocksz == 0) cowdev->blocksz = BLOCK_SIZE; /* default 2^10 */ |