blockdev also reports the wrong value:
# blockdev --getsz /dev/sdd1
32787056
strace shows that fstat() reports the wrong value.
9175 02:20:07.714355 open("/dev/sdd1", O_RDONLY) = 3</dev/sdd1>
9175 02:20:07.714387 uname({sysname="Linux", nodename="desktop-clc",
release="4.4.0-38-generic", version="#57-Ubuntu SMP Tue Sep 6 15:42:33 UTC
2016", machine="x86_64", domainname="(none)"}) = 0
9175 02:20:07.714420 ioctl(3</dev/sdd1>, BLKGETSIZE64, 0x7fff6d39def0) = -1
ENOTTY (Inappropriate ioctl for device)
9175 02:20:07.718949 ioctl(3</dev/sdd1>, BLKGETSIZE, 0x7fff6d39de08) = -1
ENOTTY (Inappropriate ioctl for device)
9175 02:20:07.719001 ioctl(3</dev/sdd1>, FDGETPRM, 0x7fff6d39de10) = -1 ENOTTY
(Inappropriate ioctl for device)
9175 02:20:07.719031 fstat(3</dev/sdd1>, {st_dev=makedev(0, 6), st_ino=714,
st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096,
st_blocks=32787056, st_size=16786972672,
st_atime=2016/10/17-02:15:26.246576853, st_mtime=2016/10/17-02:15:26.242576837,
st_ctime=2016/10/17-02:15:26.242576837}) = 0
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1634005
Title:
linux treats first partition on sdcard as much bigger than it really
is?
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1634005/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs