Re: [PATCH] 2.5.67-ac2 direct-IO for IDE taskfile ioctl (0/4)

Bartlomiej Zolnierkiewicz (B.Zolnierkiewicz@elka.pw.edu.pl)
Thu, 24 Apr 2003 00:58:48 +0200 (MET DST)


On Wed, 23 Apr 2003, Andrew Morton wrote:

> Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl> wrote:
> >
> >
> > Hey,
> >
> > Another bunch of patches:
> >
> > (1) Enhance bio_(un)map_user() and add blk_rq_bio_prep().
> > (2) Pass bdev to IDE ioctl handlers.
> > (3) Add support for rq->bio based taskfile.
> > (4) Use direct-IO in ide_taskfile_ioctl() and in ide_cmd_ioctl().
>
> Dumb question: what does all this code actually do?

Code actually implements 'subject' so direct IO to user memory
for IDE specific taskfile ioctl. As a side effect it also cleans
scsi_ioctl.c a little.

>
> It appears to be implementing an IDE-specific ioctl() which performs bulk
> IO direct to/from userspace. But that seems to be equivalent to O_DIRECT
> access to /dev/hda.

No, it is not equivalent, it does much, much more then O_DIRECT.
And this ioctl has been here for ages, only now it gets direct IO.

> What is special about the IDE ioctl approach?
>
> Thanks.

It can be used for _any_ access to IDE drive, even for some diagnostic
or vendor specific commands. User decides on transfer protocol
(PIO/DMA/queued DMA), addressing mode (CHS/LBA28/LBA48) etc.
User also gets drive status after command completion etc.

The main goal of the patch is to bring internal kernel handling
of this ioctl closer to kernel handling of normal fs IO, so only
_one_ common code will be used in future (benefits desribed in annonce).

Hope this helps...

--
Bartlomiej

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/