Whamcloud - gitweb
LU-137 osd-ldiskfs: pass through resize ioctl 61/20161/16
authorAndreas Dilger <adilger@whamcloud.com>
Wed, 23 Nov 2022 23:13:12 +0000 (16:13 -0700)
committerOleg Drokin <green@whamcloud.com>
Fri, 19 May 2023 07:00:58 +0000 (07:00 +0000)
commitac0380dc519aa15310670d164e98453861ef332a
tree12385f342f426e32126818c3222c4badfa1efd9c
parenta342697e580ffea623e4270647b7480302916c10
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>
lustre/include/dt_object.h
lustre/include/lvfs.h
lustre/include/obd_support.h
lustre/include/uapi/linux/lustre/lustre_user.h
lustre/llite/llite_lib.c
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-ldiskfs/osd_internal.h
lustre/target/tgt_mount.c