From aa41babe16b57f0719656eeb5b189254c4072898 Mon Sep 17 00:00:00 2001 From: Emoly Liu Date: Sun, 2 Jun 2013 15:35:18 +0800 Subject: [PATCH] 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 --- lustre/utils/mkfs_lustre.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- 1.8.3.1