#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
+#include "mount_utils.h"
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <lustre_ver.h>
#include <ctype.h>
#include <limits.h>
-#include "mount_utils.h"
#define MAXOPT 4096
#define MAX_RETRIES 99
append_option(options, "virgin");
if (ldd->ldd_flags & LDD_F_WRITECONF)
append_option(options, "writeconf");
- if (ldd->ldd_flags & LDD_F_IAM_DIR)
- append_option(options, "iam");
if (ldd->ldd_flags & LDD_F_NO_PRIMNODE)
append_option(options, "noprimnode");
progname = strrchr(argv[0], '/');
progname = progname ? progname + 1 : argv[0];
+ /*
+ * LU-1279. When LNET modules have not loaded, and mounting multiple
+ * targets at the same time could fail.
+ */
+ rc = system("/sbin/modprobe ptlrpc 2>&1 > /dev/null");
+
set_defaults(&mop);
rc = osd_init();