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 <emoly.liu@intel.com>
Change-Id: I4fa00dc554521c03671602ff9b2bbaca02c6a581
Reviewed-on: http://review.whamcloud.com/7353
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
/* 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;
}