Whamcloud - gitweb
b=10425
authornathan <nathan>
Thu, 8 Jun 2006 17:02:25 +0000 (17:02 +0000)
committernathan <nathan>
Thu, 8 Jun 2006 17:02:25 +0000 (17:02 +0000)
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
lustre/utils/module_setup.sh
lustre/utils/mount_lustre.c

index 0fefb75..e9eff0c 100644 (file)
@@ -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';
index 3a8f956..1594476 100755 (executable)
@@ -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
 
index 7461d2b..752174e 100644 (file)
@@ -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;
         }