BLKSIZEGET64 broken in blkpg.c: blk_ioctl()
Subsystems (2)
PATCH 1/1 BLKSIZEGET64 broken in blkpg.c: blk_ioctl()
Unless I'm missing something here...
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:
drivers/block/blkpg.c renamed from usr/tmp/TmpDir.26482-0/linux/drivers/block/blkpg.c_1.13 +1 -1
@@ -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
Signature · 2 lines
Eric Sandeen XFS for Linux http://oss.sgi.com/projects/xfs [email protected] SGI, Inc.