Skip to contentSkip to conversation

add ->getgeo block device method

PATCH Bodo Eggert 1 participant 1 message Nov 19, 2005 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 10 lines · Christoph Hellwig

HDIO_GETGEO is implemented in most block drivers, and all of them have to duplicate the code to copy the structure to userspace, aswell as getting the start sector.  This patch moves that to common code [1] and adds a ->getgeo method to fill out the raw kernel hd_geometry structure.  For many drivers this means ->ioctl can go away now.

[1] the s390 block drivers are odd in this respect.  xpram sets ->start to 4 always which seems more than odd, and the dasd driver shifts the start offset around, probably because of it's non-standard sector size.

Shouldn't there be a field for the sector size, or is the 512 bytes size too hardcoded to fix so this field wouldn't matter?

Signature · 2 lines
Top 100 things you don't want the sysadmin to say:
68. Hmmm, curious...