2003-08-21 10:23:14

by Joe Thornber

[permalink] [raw]
Subject: online resizing of devices/filesystems (2.6)

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