BLKSIZEGET64 is supposed to return device size in bytes, right?
[eric@stout linux]$ grep BLKGETSIZE64 include/linux/fs.h
#define BLKGETSIZE64 _IOR(0x12,114,sizeof(u64)) /* return device size in bytes (u64 *arg) */
But now it's just returning number of sectors as a u64 number in
blk_ioctl()
So:
--- /usr/tmp/TmpDir.26482-0/linux/drivers/block/blkpg.c_1.13 Wed Dec 19 17:03:39 2001
+++ linux/drivers/block/blkpg.c Wed Dec 19 17:02:21 2001
@@ -247,7 +247,7 @@
if (cmd == BLKGETSIZE)
return put_user((unsigned long)ullval, (unsigned long *)arg);
else
- return put_user(ullval, (u64 *)arg);
+ return put_user(ullval << 9, (u64 *)arg);
#if 0
case BLKRRPART: /* Re-read partition tables */
if (!capable(CAP_SYS_ADMIN))
-Eric
-- Eric Sandeen XFS for Linux http://oss.sgi.com/projects/xfs sandeen@sgi.com SGI, Inc.- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/