online resizing of devices/filesystems (2.6)

From: Joe Thornber
Date: Thu Aug 21 2003 - 05:29:48 EST


Hi,

Should genhd.h:set_capacity() find and update the i_size field of the
inode for the device ?

The BLKGETSIZE and BLKGETSIZE64 ioctls report the size in the devices
inode:

case BLKGETSIZE:
if ((bdev->bd_inode->i_size >> 9) > ~0UL)
return -EFBIG;
return put_ulong(arg, bdev->bd_inode->i_size >> 9);
case BLKGETSIZE64:
return put_u64(arg, bdev->bd_inode->i_size);

Currently people have to close and reopen the device in order for a
size change to take effect. This is a problem if people want to do
online resizing of a filesystem (supported by xfs and resier).

- Joe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/