dasd HDIO_GETGEO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 Hi,

 it seems that all kernel reports struct hd_geometry.start in 512-byte
 sectors:

 block/ioctl.c: HDIO_GETGEO:

           geo.start = get_start_sect(bdev);
           ret = disk->fops->getgeo(bdev, &geo);

 but only dasd driver overwrites this default and reports in native
 sectors:

 drivers/s390/block/dasd.c: dasd_getgeo():
         
           geo->start = get_start_sect(bdev) >> base->block->s2b_shift;


 So, for normal SCSI I always get start sector independently on disk
 sector size, but for dasd... 

 Is it expected behavior? It's painful for userspace to care about 
 driver type. 
 

 (Well, HDIO_GETGEO sucks in many ways, so recommendation is to read
  /sys/dev/block/<maj:min>/start rather than depends on this ioctl.)

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe linux-s390" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux