aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-08-25 19:01:33 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-15 15:02:33 -0400
commit8cd9c297a8ad1366789b934b0e4510c87beaf274 (patch)
treed1c67352a5843a0db2bb3d657d4b1759c4856526 /drivers
parentdbda83255cf6a12d06527131214c123ee7ae96b9 (diff)
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.c16
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)
967 967
968 DEBUGP(DCOW "cowloop - request function called....\n"); 968 DEBUGP(DCOW "cowloop - request function called....\n");
969 969
970 while((req = elv_next_request(q)) != NULL) { 970 while((req = blk_peek_request(q)) != NULL) {
971 DEBUGP(DCOW "cowloop - got next request\n"); 971 DEBUGP(DCOW "cowloop - got next request\n");
972 972
973 if (! blk_fs_request(req)) { 973 if (! blk_fs_request(req)) {
974 /* this is not a normal file system request */ 974 /* this is not a normal file system request */
975 end_request(req, 0); 975 __blk_end_request_cur(req, -EIO);
976 continue; 976 continue;
977 } 977 }
978 cowdev = req->rq_disk->private_data; 978 cowdev = req->rq_disk->private_data;
@@ -988,7 +988,7 @@ cowlo_request(request_queue_t *q)
988 */ 988 */
989 if (!cowdev->pid) { 989 if (!cowdev->pid) {
990 printk(KERN_ERR"cowloop - no thread available\n"); 990 printk(KERN_ERR"cowloop - no thread available\n");
991 end_request(req, 0); /* request failed */ 991 __blk_end_request_cur(req, -EIO); /* request failed */
992 cowdev->iobusy = 0; 992 cowdev->iobusy = 0;
993 continue; 993 continue;
994 } 994 }
@@ -1058,7 +1058,7 @@ cowlo_daemon(struct cowloop_device *cowdev)
1058 */ 1058 */
1059 spin_lock_irq(&cowdev->rqlock); 1059 spin_lock_irq(&cowdev->rqlock);
1060 1060
1061 end_request(cowdev->req, rv); 1061 __blk_end_request_cur(cowdev->req, rv);
1062 cowdev->iobusy = 0; 1062 cowdev->iobusy = 0;
1063 1063
1064 /* 1064 /*
@@ -1090,8 +1090,8 @@ cowlo_do_request(struct request *req)
1090 /* 1090 /*
1091 ** calculate some variables which are needed later on 1091 ** calculate some variables which are needed later on
1092 */ 1092 */
1093 len = req->current_nr_sectors << 9; 1093 len = blk_rq_cur_sectors(req) << 9;
1094 offset = (loff_t) req->sector << 9; 1094 offset = (loff_t) blk_rq_pos(req) << 9;
1095 1095
1096 DEBUGP(DCOW"cowloop - req cmd=%d offset=%lld len=%lu addr=%p\n", 1096 DEBUGP(DCOW"cowloop - req cmd=%d offset=%lld len=%lu addr=%p\n",
1097 *(req->cmd), offset, len, req->buffer); 1097 *(req->cmd), offset, len, req->buffer);
@@ -1918,7 +1918,7 @@ cowlo_openpair(char *rdof, char *cowf, int autorecover, int minor)
1918 return -EINVAL; 1918 return -EINVAL;
1919 } 1919 }
1920 1920
1921 blk_queue_hardsect_size(cowdev->rqueue, cowdev->blocksz); 1921 blk_queue_logical_block_size(cowdev->rqueue, cowdev->blocksz);
1922 cowdev->gd->queue = cowdev->rqueue; 1922 cowdev->gd->queue = cowdev->rqueue;
1923 1923
1924 /* 1924 /*
@@ -2132,7 +2132,7 @@ cowlo_openrdo(struct cowloop_device *cowdev, char *rdof)
2132 2132
2133 2133
2134 if (cowdev->belowq) 2134 if (cowdev->belowq)
2135 cowdev->blocksz = cowdev->belowq->hardsect_size; 2135 cowdev->blocksz = queue_logical_block_size(cowdev->belowq);
2136 2136
2137 if (cowdev->blocksz == 0) 2137 if (cowdev->blocksz == 0)
2138 cowdev->blocksz = BLOCK_SIZE; /* default 2^10 */ 2138 cowdev->blocksz = BLOCK_SIZE; /* default 2^10 */