Whamcloud - gitweb
ext2fs: check if Lustre filesystem is mounted
Add a check to ext2fs_check_mount_point() to loo in /proc/fs/lustre/*
to see if Lustre is mounted, since st_rdev of the mountpoint does not
match st_rdev of the block device itself, which confuses libext2fs.
LU-6093 ext2fs: don't confuse mke2fs by Lustre zfs mount
check_if_lustre_mounted() by efb735 will mistakenly report the
device is mounted when there is a ZFS-based Lustre mount.
This patch fix it by parsing the real device name from the pool
name exported in Lustre proc file with "zpool" command.
It also includes a typo fix in check_if_lustre_mounted() and a
few other code cleanups.
Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I43dabbcd6fa721c569cd9cc0f4a6de93ab761392
Reviewed-on: http://review.whamcloud.com/14223
Reviewed-by: John L. Hammond <john.hammond@intel.com>
LU-12641 libext2fs: memory leak of check_if_lustre_mounted
check_if_lustre_mounted() doesn't free the allocated memory
if failure.
Change-Id: I36b5c1e981ca4f1db8c9515be29dd98c074d14dc
Signed-off-by: Li Xi <lixi@ddn.com>
Reviewed-on: https://review.whamcloud.com/35729
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Wang Shilong <wshilong@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>