You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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>
This commit is contained in:
committed by
Jens Axboe
parent
4917fa2925
commit
992b5bceee
@@ -110,8 +110,6 @@ static struct request *get_failover_req(struct emc_handler *h,
|
||||
memset(rq->sense, 0, SCSI_SENSE_BUFFERSIZE);
|
||||
rq->sense_len = 0;
|
||||
|
||||
memset(&rq->cmd, 0, BLK_MAX_CDB);
|
||||
|
||||
rq->timeout = EMC_FAILOVER_TIMEOUT;
|
||||
rq->cmd_type = REQ_TYPE_BLOCK_PC;
|
||||
rq->cmd_flags |= REQ_FAILFAST | REQ_NOMERGE;
|
||||
|
||||
@@ -137,7 +137,6 @@ static struct request *hp_sw_get_request(struct dm_path *path)
|
||||
req->sense = h->sense;
|
||||
memset(req->sense, 0, SCSI_SENSE_BUFFERSIZE);
|
||||
|
||||
memset(&req->cmd, 0, BLK_MAX_CDB);
|
||||
req->cmd[0] = START_STOP;
|
||||
req->cmd[4] = 1;
|
||||
req->cmd_len = COMMAND_SIZE(req->cmd[0]);
|
||||
|
||||
@@ -284,7 +284,6 @@ static struct request *get_rdac_req(struct rdac_handler *h,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memset(&rq->cmd, 0, BLK_MAX_CDB);
|
||||
rq->sense = h->sense;
|
||||
memset(rq->sense, 0, SCSI_SENSE_BUFFERSIZE);
|
||||
rq->sense_len = 0;
|
||||
|
||||
Reference in New Issue
Block a user