From de0c0d9142847b8fb30afeffc9c7f9a897213bbd Mon Sep 17 00:00:00 2001 From: nathan Date: Tue, 25 Oct 2005 18:22:05 +0000 Subject: [PATCH] Branch b1_4 b=8080 r=adilger Change magic for new lmd --- lustre/include/linux/lustre_lib.h | 12 +++++++++--- lustre/utils/llmount.c | 1 + 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lustre/include/linux/lustre_lib.h b/lustre/include/linux/lustre_lib.h index 547c182..29677a2 100644 --- a/lustre/include/linux/lustre_lib.h +++ b/lustre/include/linux/lustre_lib.h @@ -700,18 +700,24 @@ do { \ __ret; \ }) -#define LMD_MAGIC 0xbdacbdac +#define LMD_MAGIC_R1 0xbdacbdac +#define LMD_MAGIC 0xbdacbd02 #define lmd_bad_magic(LMDP) \ ({ \ struct lustre_mount_data *_lmd__ = (LMDP); \ int _ret__ = 0; \ if (!_lmd__) { \ - CERROR("Missing mount data: " \ + LCONSOLE_ERROR("Missing mount data: " \ "check that /sbin/mount.lustre is installed.\n");\ _ret__ = 1; \ + } else if (_lmd__->lmd_magic == LMD_MAGIC_R1) { \ + LCONSOLE_ERROR("You're using an old version of " \ + "/sbin/mount.lustre. Please install version " \ + "1.%d\n", LMD_MAGIC & 0xFF); \ + _ret__ = 1; \ } else if (_lmd__->lmd_magic != LMD_MAGIC) { \ - CERROR("Invalid mount data (%#x != %#x): " \ + LCONSOLE_ERROR("Invalid mount data (%#x != %#x): " \ "check that /sbin/mount.lustre is installed\n", \ _lmd__->lmd_magic, LMD_MAGIC); \ _ret__ = 1; \ diff --git a/lustre/utils/llmount.c b/lustre/utils/llmount.c index cba1f45..5a00ed7 100644 --- a/lustre/utils/llmount.c +++ b/lustre/utils/llmount.c @@ -45,6 +45,7 @@ static char *progname = NULL; void usage(FILE *out) { + fprintf(out, "%s v1.%d\n", progname, LMD_MAGIC & 0xFF); fprintf(out, "usage: %s :// " "[-fhnv] [-o mntopt]\n", progname); fprintf(out, "\t: nid of MDS (config) node\n" -- 1.8.3.1