* IDE, packet commands and REQ_TYPE_SENSE?
@ 2009-04-02 9:31 Jeff Garzik
2009-04-02 9:36 ` Jeff Garzik
2009-04-02 12:45 ` Borislav Petkov
0 siblings, 2 replies; 3+ messages in thread
From: Jeff Garzik @ 2009-04-02 9:31 UTC (permalink / raw)
To: Linux IDE mailing list; +Cc: Jens Axboe, LKML
Looking at REQ_TYPE_*, I see that REQ_TYPE_SENSE is only used once in an
assignment, and appears to never be tested anywhere.
Furthermore, the use of REQ_TYPE_SENSE immediately follows a previous
assignment rq->cmd_type assignment:
cdrom_queue_request_sense():
[...]
/* stuff the sense request in front of our current request */
blk_rq_init(NULL, rq);
rq->cmd_type = REQ_TYPE_ATA_PC;
rq->rq_disk = info->disk;
rq->data = sense;
rq->cmd[0] = GPCMD_REQUEST_SENSE;
rq->cmd[4] = 18;
rq->data_len = 18;
rq->cmd_type = REQ_TYPE_SENSE;
rq->cmd_flags |= REQ_PREEMPT;
[...]
First, the code assigns REQ_TYPE_ATA_PC, then without any intervening
tests or branches, it assigns REQ_TYPE_SENSE.
So, some questions...
Is REQ_TYPE_ATA_PC sufficient (i.e. the first assignment)?
Can we get rid of REQ_TYPE_SENSE?
What are the differences between REQ_TYPE_ATA_PC and REQ_TYPE_BLOCK_PC?
Would it be possible to eliminate REQ_TYPE_ATA_PC after some work, as
well?
Jeff
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: IDE, packet commands and REQ_TYPE_SENSE?
2009-04-02 9:31 IDE, packet commands and REQ_TYPE_SENSE? Jeff Garzik
@ 2009-04-02 9:36 ` Jeff Garzik
2009-04-02 12:45 ` Borislav Petkov
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2009-04-02 9:36 UTC (permalink / raw)
To: Linux IDE mailing list; +Cc: Jens Axboe, LKML
Jeff Garzik wrote:
> Can we get rid of REQ_TYPE_SENSE?
Strike that, I forgot about blk_sense_request()
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: IDE, packet commands and REQ_TYPE_SENSE?
2009-04-02 9:31 IDE, packet commands and REQ_TYPE_SENSE? Jeff Garzik
2009-04-02 9:36 ` Jeff Garzik
@ 2009-04-02 12:45 ` Borislav Petkov
1 sibling, 0 replies; 3+ messages in thread
From: Borislav Petkov @ 2009-04-02 12:45 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Linux IDE mailing list, Jens Axboe, LKML
Hi,
> What are the differences between REQ_TYPE_ATA_PC and REQ_TYPE_BLOCK_PC?
> Would it be possible to eliminate REQ_TYPE_ATA_PC after some work, as well?
That's the plan. However, I'd like to wait for Tejun's block patches
to get settled first,
especially the convert-to-bio from rq->data bits.
--
Regards/Gruss,
Boris
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-04-02 12:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-02 9:31 IDE, packet commands and REQ_TYPE_SENSE? Jeff Garzik
2009-04-02 9:36 ` Jeff Garzik
2009-04-02 12:45 ` Borislav Petkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox