2001-02-14 12:32:18

by David Balazic

[permalink] [raw]
Subject: Re: block ioctl to read/write last sector

Michael E Brown ([email protected]) worte :

> On Wed, 14 Feb 2001, Manfred Spraul wrote:
>
> > I have one additional user space only idea:
> > have you tried raw-io? bind a raw device to the partition, IIRC raw-io
> > is always in 512 byte units.
>
> That has been tried. No, it does not work. :-) Using Scsi-Generic is the
> only way so far found, but of course, it only works on SCSI drives.

Did you try scsi-emulation on IDE disks ?

> >
> > Probably an ioctl is the better idea, but I'd use absolute sector
> > numbers (not relative to the end), and obviously 64-bit sector numbers -
> > 2 TB isn't that far away.
> >
>
> I was deliberately trying to limit the scope to avoid misuse. This is to
> work around a flaw in the current API, not to create a new API. Limiting
> access to only those blocks that would normally be inaccessible through
> the normal API seemed like the best bet to me.


--
David Balazic
--------------
"Be excellent to each other." - Bill & Ted
- - - - - - - - - - - - - - - - - - - - - -


2001-02-14 14:10:46

by Michael E Brown

[permalink] [raw]
Subject: Re: block ioctl to read/write last sector

On Wed, 14 Feb 2001, David Balazic wrote:

> Michael E Brown ([email protected]) worte :
>
> > That has been tried. No, it does not work. :-) Using Scsi-Generic is the
> > only way so far found, but of course, it only works on SCSI drives.
>
> Did you try scsi-emulation on IDE disks ?

I think that scsi-emulation works only for ATAPI devices. CDROMs are
normally ATAPI. HDs are normally just ATA. I don't think that would work,
but I have not tried it, either.
--
Michael Brown
Linux Systems Group
Dell Computer Corp

2001-02-17 07:31:10

by Andre Hedrick

[permalink] [raw]
Subject: Re: block ioctl to read/write last sector

On Wed, 14 Feb 2001, David Balazic wrote:

> Did you try scsi-emulation on IDE disks ?

Don't be silly.
That emulation is from scsi-packet to atapi-packet.

Andre Hedrick
Linux ATA Development
ASL Kernel Development
-----------------------------------------------------------------------------
ASL, Inc. Toll free: 1-877-ASL-3535
1757 Houret Court Fax: 1-408-941-2071
Milpitas, CA 95035 Web: http://www.aslab.com