From: Emoly Liu Date: Sun, 2 Jun 2013 07:35:18 +0000 (+0800) Subject: LU-3768 tunefs: make tunefs.lustre work correctly for MGS X-Git-Tag: 2.4.92~10 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F53%2F7353%2F4;p=fs%2Flustre-release.git LU-3768 tunefs: make tunefs.lustre work correctly for MGS Since LDD_F_NEED_INDEX flag is unset for a stand-alone MGS during mkfs.lustre, when running tunefs.lustre on that MGS, it always says "'----index' only valid for MDT,OST". To fix that, this patch is to - print that error message only for mkfs.lustre - fix the typo '----index' in the error message. Signed-off-by: Liu Ying Change-Id: I4fa00dc554521c03671602ff9b2bbaca02c6a581 Reviewed-on: http://review.whamcloud.com/7353 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Bobi Jam Reviewed-by: Niu Yawei Reviewed-by: Oleg Drokin --- diff --git a/lustre/utils/mkfs_lustre.c b/lustre/utils/mkfs_lustre.c index fa36098..646a767 100644 --- a/lustre/utils/mkfs_lustre.c +++ b/lustre/utils/mkfs_lustre.c @@ -626,11 +626,13 @@ int main(int argc, char *const argv[]) /* Stand alone MGS doesn't need a index */ if (!IS_MDT(ldd) && IS_MGS(ldd)) { +#ifndef TUNEFS /* mkfs.lustre */ /* But if --index was specified flag an error */ if (!(mop.mo_ldd.ldd_flags & LDD_F_NEED_INDEX)) { - badopt("--index", "MDT,OST"); + badopt("index", "MDT,OST"); goto out; } +#endif mop.mo_ldd.ldd_flags &= ~LDD_F_NEED_INDEX; }