All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dm.c
@ 2006-05-04  2:51 m9230
  0 siblings, 0 replies; 6+ messages in thread
From: m9230 @ 2006-05-04  2:51 UTC (permalink / raw)
  To: dm-devel

Hello, I found a problem in dm_blk_ioctl() in dm.c:

In dm.c, dm_blk_ioctl() is assigning a full unsigned 32 bits of device size 
to a signed 32 bit size.
This may cause BLKGETSIZE64 ioctl and BLKGETSIZE ioctl failed to get the 
device size when device size is larger than 1TB.

I am using device-mapper.1.01.05.

Changing "long size;" to "sector_t size;" might fix this up, it works for me.
For example:
error = ioctl(fd, BLKGETSIZE64, &size);
returns "size" in bytes.


--
Best Regards, Michael Yao

^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH] dm.c
@ 2006-05-04  1:51 m9230
  0 siblings, 0 replies; 6+ messages in thread
From: m9230 @ 2006-05-04  1:51 UTC (permalink / raw)
  To: dm-devel

Hello, I found a problem in dm_blk_ioctl() in dm.c:

In dm.c, dm_blk_ioctl() is assigning a full unsigned 32 bits of device size 
to a signed 32 bit size.
This may cause BLKGETSIZE64 ioctl and BLKGETSIZE ioctl failed to get the 
device size when device size is larger than 1TB.

I am using device-mapper.1.01.05.

Changing "long size;" to "sector_t size;" might fix this up, it works for me.
For example:
error = ioctl(fd, BLKGETSIZE64, &size);
returns "size" in bytes.


--
Best Regards, Michael Yao

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-05-05 14:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20060504160048.CA34173C68@hormel.redhat.com>
2006-05-05  7:35 ` [PATCH] dm.c m9230
2006-05-05 13:45   ` Kevin Corry
2006-05-05 13:56     ` Kevin Corry
2006-05-05 14:09       ` Eric Sandeen
2006-05-04  2:51 m9230
  -- strict thread matches above, loose matches on Subject: below --
2006-05-04  1:51 m9230

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.