Whamcloud - gitweb
b=15316
[fs/lustre-release.git] / lustre / utils / mkfs_lustre.c
index f64a86f..f90f2df 100644 (file)
@@ -40,6 +40,9 @@
 #include <limits.h>
 
 #ifdef __linux__
+/* kp30.h is not really needed here, but on SLES10/PPC, fs.h includes idr.h which
+ * requires BITS_PER_LONG to be defined */
+#include <libcfs/kp30.h>
 #include <linux/fs.h> /* for BLKGETSIZE64 */
 #include <linux/version.h>
 #endif
@@ -269,6 +272,7 @@ int loop_setup(struct mkfs_opts *mop)
         for (i = 0; i < MAX_LOOP_DEVICES; i++) {
                 char cmd[PATH_MAX];
                 int cmdsz = sizeof(cmd);
+
                 sprintf(l_device, "%s%d", loop_base, i);
                 if (access(l_device, F_OK | R_OK))
                         break;
@@ -921,10 +925,10 @@ int read_local_files(struct mkfs_opts *mop)
                 /* COMPAT_146 */
                 /* Try to read pre-1.6 config from last_rcvd */
                 struct lr_server_data lsd;
-                verrprint("%s: Unable to read %s (%s).\n",
-                          progname, filepnm, strerror(errno));
+                verrprint("%s: Unable to read %d.%d config %s.\n",
+                          progname, LUSTRE_MAJOR, LUSTRE_MINOR, filepnm);
 
-                verrprint("Trying last_rcvd\n");
+                verrprint("Trying 1.4 config from last_rcvd\n");
                 sprintf(filepnm, "%s/%s", tmpdir, LAST_RCVD);
 
                 /* Construct debugfs command line. */
@@ -1192,12 +1196,6 @@ int parse_opts(int argc, char *const argv[], struct mkfs_opts *mop,
                                 return 1;
                         rc = add_param(mop->mo_ldd.ldd_params, PARAM_FAILNODE,
                                        nids);
-                        /* Combo needs to add MDT failnodes as MGS failnodes
-                           as well */
-                        if (!rc && IS_MGS(&mop->mo_ldd)) {
-                                rc = add_param(mop->mo_ldd.ldd_params,
-                                               PARAM_MGSNODE, nids);
-                        }
                         free(nids);
                         if (rc)
                                 return rc;
@@ -1321,7 +1319,7 @@ int parse_opts(int argc, char *const argv[], struct mkfs_opts *mop,
                 fprintf(stderr, "Bad argument: %s\n", argv[optind]);
                 return EINVAL;
         }
-        
+
         return 0;
 }