diff options
author | Jens Axboe <axboe@suse.de> | 2006-08-10 02:44:47 -0400 |
---|---|---|
committer | Jens Axboe <axboe@nelson.home.kernel.dk> | 2006-09-30 14:23:37 -0400 |
commit | 4aff5e2333c9a1609662f2091f55c3f6fffdad36 (patch) | |
tree | b73d8c2b7c1bdc03d3313c108da7dfc95ee95525 /drivers/block/pktcdvd.c | |
parent | 77ed74da26f50fa28471571ee7a2251b77526d84 (diff) |
[PATCH] Split struct request ->flags into two parts
Right now ->flags is a bit of a mess: some are request types, and
others are just modifiers. Clean this up by splitting it into
->cmd_type and ->cmd_flags. This allows introduction of generic
Linux block message types, useful for sending generic Linux commands
to block devices.
Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'drivers/block/pktcdvd.c')
-rw-r--r-- | drivers/block/pktcdvd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 451b996bba91..42891d2b054e 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c | |||
@@ -365,16 +365,16 @@ static int pkt_generic_packet(struct pktcdvd_device *pd, struct packet_command * | |||
365 | rq->sense = sense; | 365 | rq->sense = sense; |
366 | memset(sense, 0, sizeof(sense)); | 366 | memset(sense, 0, sizeof(sense)); |
367 | rq->sense_len = 0; | 367 | rq->sense_len = 0; |
368 | rq->flags |= REQ_BLOCK_PC | REQ_HARDBARRIER; | 368 | rq->cmd_type = REQ_TYPE_BLOCK_PC; |
369 | rq->cmd_flags |= REQ_HARDBARRIER; | ||
369 | if (cgc->quiet) | 370 | if (cgc->quiet) |
370 | rq->flags |= REQ_QUIET; | 371 | rq->cmd_flags |= REQ_QUIET; |
371 | memcpy(rq->cmd, cgc->cmd, CDROM_PACKET_SIZE); | 372 | memcpy(rq->cmd, cgc->cmd, CDROM_PACKET_SIZE); |
372 | if (sizeof(rq->cmd) > CDROM_PACKET_SIZE) | 373 | if (sizeof(rq->cmd) > CDROM_PACKET_SIZE) |
373 | memset(rq->cmd + CDROM_PACKET_SIZE, 0, sizeof(rq->cmd) - CDROM_PACKET_SIZE); | 374 | memset(rq->cmd + CDROM_PACKET_SIZE, 0, sizeof(rq->cmd) - CDROM_PACKET_SIZE); |
374 | rq->cmd_len = COMMAND_SIZE(rq->cmd[0]); | 375 | rq->cmd_len = COMMAND_SIZE(rq->cmd[0]); |
375 | 376 | ||
376 | rq->ref_count++; | 377 | rq->ref_count++; |
377 | rq->flags |= REQ_NOMERGE; | ||
378 | rq->waiting = &wait; | 378 | rq->waiting = &wait; |
379 | rq->end_io = blk_end_sync_rq; | 379 | rq->end_io = blk_end_sync_rq; |
380 | elv_add_request(q, rq, ELEVATOR_INSERT_BACK, 1); | 380 | elv_add_request(q, rq, ELEVATOR_INSERT_BACK, 1); |