[PATCH] dm.c

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

 



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

--

dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux