From: Nathaniel Clark Date: Thu, 10 Aug 2017 14:20:04 +0000 (-0400) Subject: LU-9799 mount: Call read_ldd with initialized mount type X-Git-Tag: 2.10.1-RC1~36 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F81%2F28581%2F2;p=fs%2Flustre-release.git LU-9799 mount: Call read_ldd with initialized mount type When re-reading the ldd when doing relabel, ensure the correct mount type is used for the read. Otherwise ldiskfs complains: mount.lustre FATAL: unhandled/unloaded fs type 0 'ext3' and ZFS complains: e2label: No such file or directory while trying to open MGS/MGT Couldn't find valid filesystem superblock. Lustre-change: https://review.whamcloud.com/28456 Lustre-commit: 0108281c65545df169faaa0ce0690fb021680643 Signed-off-by: Nathaniel Clark Change-Id: Ife53cff948d545c306e99e4b023989245a1ac3f7 Reviewed-by: Fan Yong Reviewed-by: Hongchao Zhang Signed-off-by: Minh Diep Reviewed-on: https://review.whamcloud.com/28581 Reviewed-by: Andreas Dilger Tested-by: Jenkins Tested-by: Maloo --- diff --git a/lustre/utils/mount_lustre.c b/lustre/utils/mount_lustre.c index 7fb5467..c77501c 100644 --- a/lustre/utils/mount_lustre.c +++ b/lustre/utils/mount_lustre.c @@ -718,6 +718,7 @@ static void label_lustre(struct mount_opts *mop) /* device label could be changed after journal recovery, * it should also be relabeled for mount has succeeded. */ memset(&ldd, 0, sizeof(ldd)); + ldd.ldd_mount_type = mop->mo_ldd.ldd_mount_type; rc = osd_read_ldd(mop->mo_source, &ldd); if (rc == 0) { rc = strlen(ldd.ldd_svname);