Whamcloud - gitweb
LU-137 osd-ldiskfs: pass through resize ioctl
Pass through the EXT4_IOC_RESIZE_FS ioctl to the underlying ldiskfs
code so that it is possible to online resize MDT and OST filesystems.
When running resize2fs against a filesystem, it compares st_rdev of
the block device against st_dev of the mounted filesystem, so the
mounted Lustre stub filesystem needs to return proper stat information
from the ldiskfs root directory. Add in a server_getattr() method
to the server inode_operations. Using generic_fillattr() is enough,
we don't need the added complexity of calling ext4_getattr() (which
does not exist on directories for all kernel versions).
Change the OSD API from returning the superblock with dt_mnt_sb_get()
to returning the vfsmount with dt_mnt_get(), since it also contains
the superblock, but is more useful for calling some inode methods.
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I934ae1f495bd15c6435be81b51ed04f0986c0322
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/20161
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Deiter <alex.deiter@gmail.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>