Description of problem: The current 7.3 version of fdisk does not correctly respond to the fdisk -s command if the drive is over a certain size (at least 1 terabyte). It returns a negative number. The problem is in the ioctl call to BLKGETSIZE, which returns a UNSIGNED LONG, but fdisk expects a long. Version-Release number of selected component (if applicable): 2.11n How reproducible: run fdisk -s /dev/sda when sda is really big (1.3 terabytes) Steps to Reproduce: 1. Get a disk over a terabyte (RAID) 2. run fdisk -s on the device 3. compare to fdisk -l on the same device Actual results: -857118750 Expected results: 1290364897 Additional info: Error is in fdisk.c
Created attachment 89117 [details] This is a patch to sfdisk.c to fix the problem Given that the problem is simple and in the last lines of code, we fixed it ourselves. This patch fixes sfdisk.c - to do the same to fdisk.c should be trivial. Thomas Dickson InoStor, INC. Poway, CA
Thanks, will be fixed in 2.11y-2