Skip to contentSkip to conversation

block ioctl to read/write last sector

DISCUSSION David Balazic 3 participants 3 messages Feb 14, 2001 – Feb 17, 2001

lore
Share & tools
lore
#0 lore raw

Michael E Brown ([email protected]) worte :

Quoted 8 lines · Manfred Spraul
Quoted 4 lines

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 ?

Quoted 10 lines
Quoted 5 lines

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.

Signature · 4 lines
David Balazic
--------------
"Be excellent to each other." - Bill & Ted
- - - - - - - - - - - - - - - - - - - - - -
#1 lore raw
Quoted 6 lines · David Balazic

Michael E Brown ([email protected]) worte :

Quoted 2 lines

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

#2 lore raw
In reply to David Balazic
Quoted 1 line · David Balazic

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: www.aslab.com