Messages in this thread Patch in this message |  | | | Date | Tue, 10 Feb 2004 17:01:10 +0000 | | From | Joe Thornber <> | | Subject | [Patch 6/10] dm: block size bug with 64 bit devs |
With 32 bit sector_t the block device size _in bytes_ is also cut to 32 bit in __set_size when the block device is mount (a filesystem mounted). The argument should be cast to loff_t before expanding the sector count to a byte count and calling i_size_write.
[Christophe Saout] --- diff/drivers/md/dm.c 2004-02-10 16:11:43.000000000 +0000 +++ source/drivers/md/dm.c 2004-02-10 16:11:50.000000000 +0000 @@ -639,7 +639,7 @@ bdev = bdget_disk(disk, 0); if (bdev) { down(&bdev->bd_inode->i_sem); - i_size_write(bdev->bd_inode, size << SECTOR_SHIFT); + i_size_write(bdev->bd_inode, (loff_t)size << SECTOR_SHIFT); up(&bdev->bd_inode->i_sem); bdput(bdev); } - 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/
|  |