From 90e43bcd5891aa9c2ba2fa3f8438f9f5a2fc6a5a Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 8 Jun 2006 17:02:25 +0000 Subject: [PATCH] b=10425 lnet_nid2str() should never do hostname lookups b=10515 resolve hostname for all nettypes in mkfs.lustre and mount.lustre using the above functionality --- lustre/utils/mkfs_lustre.c | 11 +---------- lustre/utils/module_setup.sh | 2 +- lustre/utils/mount_lustre.c | 11 +---------- 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/lustre/utils/mkfs_lustre.c b/lustre/utils/mkfs_lustre.c index 0fefb75..e9eff0c 100644 --- a/lustre/utils/mkfs_lustre.c +++ b/lustre/utils/mkfs_lustre.c @@ -870,16 +870,7 @@ static char *convert_hostnames(char *s1) free(converted); return NULL; } - if (LNET_NETTYP(LNET_NIDNET(nid)) == SOCKLND) { - __u32 addr = LNET_NIDADDR(nid); - c += snprintf(c, left, "%u.%u.%u.%u@%s%u,", - (addr >> 24) & 0xff, (addr >> 16) & 0xff, - (addr >> 8) & 0xff, addr & 0xff, - libcfs_lnd2str(SOCKLND), - LNET_NETNUM(LNET_NIDNET(nid))); - } else { - c += snprintf(c, left, "%s,", s2); - } + c += snprintf(c, left, "%s,", libcfs_nid2str(nid)); left = converted + MAXNIDSTR - c; } *(c - 1) = '\0'; diff --git a/lustre/utils/module_setup.sh b/lustre/utils/module_setup.sh index 3a8f956..1594476 100755 --- a/lustre/utils/module_setup.sh +++ b/lustre/utils/module_setup.sh @@ -30,7 +30,7 @@ cp -u ../lvfs/$FSFLT.$EXT $MDIR [ $KVER == "26" ] && cp -u ../ldiskfs/ldiskfs.$EXT $MDIR cp -u ../ost/ost.$EXT $MDIR cp -u ../obdfilter/obdfilter.$EXT $MDIR -cp -u ../llite/llite.$EXT $MDIR +cp -u ../llite/lustre.$EXT $MDIR cp -u ../mgc/mgc.$EXT $MDIR cp -u ../mgs/mgs.$EXT $MDIR diff --git a/lustre/utils/mount_lustre.c b/lustre/utils/mount_lustre.c index 7461d2b..752174e 100644 --- a/lustre/utils/mount_lustre.c +++ b/lustre/utils/mount_lustre.c @@ -141,16 +141,7 @@ static char *convert_hostnames(char *s1) nid = libcfs_str2nid(s1); if (nid == LNET_NID_ANY) goto out_free; - if (LNET_NETTYP(LNET_NIDNET(nid)) == SOCKLND) { - __u32 addr = LNET_NIDADDR(nid); - c += snprintf(c, left, "%u.%u.%u.%u@%s%u%c", - (addr >> 24) & 0xff, (addr >> 16) & 0xff, - (addr >> 8) & 0xff, addr & 0xff, - libcfs_lnd2str(SOCKLND), - LNET_NETNUM(LNET_NIDNET(nid)), sep); - } else { - c += snprintf(c, left, "%s%c", s1, sep); - } + c += snprintf(c, left, "%s%c", libcfs_nid2str(nid), sep); left = converted + MAXNIDSTR - c; s1 = s2 + 1; } -- 1.8.3.1