From 142b96a2de321c36dd15892f7e57675335487fdb Mon Sep 17 00:00:00 2001 From: jxiong Date: Wed, 11 Feb 2009 15:44:09 +0000 Subject: [PATCH] b=17914 r=nathan,h.huang recommit the patch after fixing the problem --- lustre/obdclass/obd_mount.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lustre/obdclass/obd_mount.c b/lustre/obdclass/obd_mount.c index 04d012c..fbd047a 100644 --- a/lustre/obdclass/obd_mount.c +++ b/lustre/obdclass/obd_mount.c @@ -1684,6 +1684,15 @@ int server_name2index(char *svname, __u32 *idx, char **endptr) if (!dash) return(-EINVAL); + /* intepret -MDTXXXXX-mdc as mdt, the better way is to pass + * in the fsname, then determine the server index */ + if (!strcmp(LUSTRE_MDC_NAME, dash + 1)) { + dash--; + for (; dash > svname && *dash != '-'; dash--); + if (dash == svname) + return(-EINVAL); + } + if (strncmp(dash + 1, "MDT", 3) == 0) rc = LDD_F_SV_TYPE_MDT; else if (strncmp(dash + 1, "OST", 3) == 0) -- 1.8.3.1