block: kill rq->data
authorTejun Heo <tj@kernel.org>
Thu, 23 Apr 2009 02:05:20 +0000 (11:05 +0900)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 28 Apr 2009 05:37:36 +0000 (07:37 +0200)
Now that all block request data transfer is done via bio, rq->data
isn't used.  Kill it.

While at it, make the roles of rq->special and buffer clear.

[ Impact: drop now unncessary field from struct request ]

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Boaz Harrosh <bharrosh@panasas.com>
block/blk-core.c
block/blk-map.c
block/scsi_ioctl.c
drivers/scsi/scsi_lib.c
include/linux/blkdev.h

index 0520cc70458586db66c8cd280431bb267bcc2618..6dd180cf15d2b2a9151ce8c86a593d23f605b99d 100644 (file)
@@ -189,10 +189,9 @@ void blk_dump_rq_flags(struct request *rq, char *msg)
                                                (unsigned long long)rq->sector,
                                                rq->nr_sectors,
                                                rq->current_nr_sectors);
-       printk(KERN_INFO "  bio %p, biotail %p, buffer %p, data %p, len %u\n",
+       printk(KERN_INFO "  bio %p, biotail %p, buffer %p, len %u\n",
                                                rq->bio, rq->biotail,
-                                               rq->buffer, rq->data,
-                                               rq->data_len);
+                                               rq->buffer, rq->data_len);
 
        if (blk_pc_request(rq)) {
                printk(KERN_INFO "  cdb: ");
index f103729b462fdb817d3a51caf5cf33984d0e6cf6..694fefad34e7cecc2f294b8e8eb494602ace1d14 100644 (file)
@@ -156,7 +156,7 @@ int blk_rq_map_user(struct request_queue *q, struct request *rq,
        if (!bio_flagged(bio, BIO_USER_MAPPED))
                rq->cmd_flags |= REQ_COPY_USER;
 
-       rq->buffer = rq->data = NULL;
+       rq->buffer = NULL;
        return 0;
 unmap_rq:
        blk_rq_unmap_user(bio);
@@ -235,7 +235,7 @@ int blk_rq_map_user_iov(struct request_queue *q, struct request *rq,
        blk_queue_bounce(q, &bio);
        bio_get(bio);
        blk_rq_bio_prep(q, rq, bio);
-       rq->buffer = rq->data = NULL;
+       rq->buffer = NULL;
        return 0;
 }
 EXPORT_SYMBOL(blk_rq_map_user_iov);
@@ -313,7 +313,7 @@ int blk_rq_map_kern(struct request_queue *q, struct request *rq, void *kbuf,
 
        blk_rq_bio_prep(q, rq, bio);
        blk_queue_bounce(q, &rq->bio);
-       rq->buffer = rq->data = NULL;
+       rq->buffer = NULL;
        return 0;
 }
 EXPORT_SYMBOL(blk_rq_map_kern);
index 82a0ca2f672901a8fab6442ae8a3662bedd7e6b8..bb9aa43551b2696dbb988e57a00393a006f46d2a 100644 (file)
@@ -500,7 +500,6 @@ static int __blk_send_generic(struct request_queue *q, struct gendisk *bd_disk,
 
        rq = blk_get_request(q, WRITE, __GFP_WAIT);
        rq->cmd_type = REQ_TYPE_BLOCK_PC;
-       rq->data = NULL;
        rq->data_len = 0;
        rq->extra_len = 0;
        rq->timeout = BLK_DEFAULT_SG_TIMEOUT;
index 756ac7c93de0dc29a5c7b57a3e2193b7585658cb..aa9fc572e45fa4848aa93d2fb0ebfc725193cace 100644 (file)
@@ -1088,7 +1088,6 @@ int scsi_setup_blk_pc_cmnd(struct scsi_device *sdev, struct request *req)
                        return ret;
        } else {
                BUG_ON(req->data_len);
-               BUG_ON(req->data);
 
                memset(&cmd->sdb, 0, sizeof(cmd->sdb));
                req->buffer = NULL;
index cfeb3c2feb2767a5d58202c8b8a0008729c1b0e4..12c545e2737cfeef0effff95cc1d941746c38a82 100644 (file)
@@ -211,8 +211,8 @@ struct request {
 
        unsigned short ioprio;
 
-       void *special;
-       char *buffer;
+       void *special;          /* opaque pointer available for LLD use */
+       char *buffer;           /* kaddr of the current segment if available */
 
        int tag;
        int errors;
@@ -229,7 +229,6 @@ struct request {
        unsigned int data_len;
        unsigned int extra_len; /* length of alignment and padding */
        unsigned int sense_len;
-       void *data;
        void *sense;
 
        unsigned long deadline;