Hi,I have a linux *mapper device on the host, I would like to get the start offset.I get this by the following ioctl . Although the call succeeds but it sets the hd_geometry_rec to "0"
I checked through gdb , the ioctl call suceeds ,but sets all the field of hd_geometry to "0"
(gdb) p hd_geometry_rec$2 = {heads = 0 ' ', sectors = 0 ' ', cylinders = 0, start = 0}
The device configuration===================[root@localh trunk]# uname -aLinux localh 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
11-30-2010, 06:33 AM
Hannes Reinecke
ioctl HDIO_GETGEO to device mapper devpath
On 10/14/2010 11:40 AM, Santosh Sarangi wrote:
> Hi,
> I have a linux mapper device on the host, I would like to get the start
> offset.
> I get this by the following ioctl . Although the call succeeds but it sets
> the hd_geometry_rec to "0"
>
> I checked through gdb , the ioctl call suceeds ,but sets all the field of
> hd_geometry to "0"
>
Yep. Device-mapper device are able to report the geometry, but you
have to set it first :-)
The attached patch should fix this.
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
12-01-2010, 07:58 AM
Christophe Varoqui
ioctl HDIO_GETGEO to device mapper devpath
On mar., 2010-11-30 at 08:33 +0100, Hannes Reinecke wrote:
> On 10/14/2010 11:40 AM, Santosh Sarangi wrote:
> > Hi,
> > I have a linux mapper device on the host, I would like to get the start
> > offset.
> > I get this by the following ioctl . Although the call succeeds but it sets
> > the hd_geometry_rec to "0"
> >
> > I checked through gdb , the ioctl call suceeds ,but sets all the field of
> > hd_geometry to "0"
> >
> Yep. Device-mapper device are able to report the geometry, but you
> have to set it first :-)
>
> The attached patch should fix this.
>
Applied.
Thanks.
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel