diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2008-04-29 03:54:36 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-04-29 08:48:55 -0400 |
commit | 992b5bceee447a32ef2d617730ae0d03c063eedd (patch) | |
tree | cf8a457afc939b9d6040b809382e8a45adc9eee1 /drivers/md | |
parent | 4917fa292558593d36b2880977ea206f7727dbe5 (diff) |
block: no need to initialize rq->cmd with blk_get_request
blk_get_request initializes rq->cmd (rq_init does) so the users don't
need to do that.
The purpose of this patch is to remove sizeof(rq->cmd) and &rq->cmd,
as a preparation for large command support, which changes rq->cmd from
the static array to a pointer. sizeof(rq->cmd) will not make sense and
&rq->cmd won't work.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Alasdair G Kergon <agk@redhat.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm-emc.c | 2 | ||||
-rw-r--r-- | drivers/md/dm-mpath-hp-sw.c | 1 | ||||
-rw-r--r-- | drivers/md/dm-mpath-rdac.c | 1 |
3 files changed, 0 insertions, 4 deletions
diff --git a/drivers/md/dm-emc.c b/drivers/md/dm-emc.c index 6b91b9ab1d41..3ea5ad4b7805 100644 --- a/drivers/md/dm-emc.c +++ b/drivers/md/dm-emc.c | |||
@@ -110,8 +110,6 @@ static struct request *get_failover_req(struct emc_handler *h, | |||
110 | memset(rq->sense, 0, SCSI_SENSE_BUFFERSIZE); | 110 | memset(rq->sense, 0, SCSI_SENSE_BUFFERSIZE); |
111 | rq->sense_len = 0; | 111 | rq->sense_len = 0; |
112 | 112 | ||
113 | memset(&rq->cmd, 0, BLK_MAX_CDB); | ||
114 | |||
115 | rq->timeout = EMC_FAILOVER_TIMEOUT; | 113 | rq->timeout = EMC_FAILOVER_TIMEOUT; |
116 | rq->cmd_type = REQ_TYPE_BLOCK_PC; | 114 | rq->cmd_type = REQ_TYPE_BLOCK_PC; |
117 | rq->cmd_flags |= REQ_FAILFAST | REQ_NOMERGE; | 115 | rq->cmd_flags |= REQ_FAILFAST | REQ_NOMERGE; |
diff --git a/drivers/md/dm-mpath-hp-sw.c b/drivers/md/dm-mpath-hp-sw.c index 204bf42c9449..b63a0ab37c53 100644 --- a/drivers/md/dm-mpath-hp-sw.c +++ b/drivers/md/dm-mpath-hp-sw.c | |||
@@ -137,7 +137,6 @@ static struct request *hp_sw_get_request(struct dm_path *path) | |||
137 | req->sense = h->sense; | 137 | req->sense = h->sense; |
138 | memset(req->sense, 0, SCSI_SENSE_BUFFERSIZE); | 138 | memset(req->sense, 0, SCSI_SENSE_BUFFERSIZE); |
139 | 139 | ||
140 | memset(&req->cmd, 0, BLK_MAX_CDB); | ||
141 | req->cmd[0] = START_STOP; | 140 | req->cmd[0] = START_STOP; |
142 | req->cmd[4] = 1; | 141 | req->cmd[4] = 1; |
143 | req->cmd_len = COMMAND_SIZE(req->cmd[0]); | 142 | req->cmd_len = COMMAND_SIZE(req->cmd[0]); |
diff --git a/drivers/md/dm-mpath-rdac.c b/drivers/md/dm-mpath-rdac.c index e04eb5c697fb..95e77734880a 100644 --- a/drivers/md/dm-mpath-rdac.c +++ b/drivers/md/dm-mpath-rdac.c | |||
@@ -284,7 +284,6 @@ static struct request *get_rdac_req(struct rdac_handler *h, | |||
284 | return NULL; | 284 | return NULL; |
285 | } | 285 | } |
286 | 286 | ||
287 | memset(&rq->cmd, 0, BLK_MAX_CDB); | ||
288 | rq->sense = h->sense; | 287 | rq->sense = h->sense; |
289 | memset(rq->sense, 0, SCSI_SENSE_BUFFERSIZE); | 288 | memset(rq->sense, 0, SCSI_SENSE_BUFFERSIZE); |
290 | rq->sense_len = 0; | 289 | rq->sense_len = 0; |