return rc;
}
+#ifdef HAVE_SERVER_SUPPORT
/* Add mgsnids from ldd params */
static int add_mgsnids(struct mount_opts *mop, char *options,
const char *params, size_t options_len)
return rc;
}
+#endif /* HAVE_SERVER_SUPPORT */
static void set_defaults(struct mount_opts *mop)
{
return 0;
}
+#ifdef HAVE_SERVER_SUPPORT
/* change label from <fsname>:<index> to
* <fsname>-<index> to indicate the device has
* been registered. only if the label is
}
}
}
+#endif /* HAVE_SERVER_SUPPORT */
int main(int argc, char *const argv[])
{
client = (strstr(mop.mo_usource, ":/") != NULL);
if (!client) {
+#ifdef HAVE_SERVER_SUPPORT
rc = osd_init();
if (rc)
goto out_options;
rc = parse_ldd(mop.mo_source, &mop, options, maxopt_len);
if (rc)
goto out_osd;
+#else
+ rc = -EINVAL;
+ goto out_options;
+#endif
}
/* In Linux 2.4, the target device doesn't get passed to any of our
printf("mounting device %s at %s, flags=%#x options=%s\n",
mop.mo_source, mop.mo_target, flags, options);
+#ifdef HAVE_SERVER_SUPPORT
if (!client && osd_tune_lustre(mop.mo_source, &mop)) {
if (verbose)
fprintf(stderr, "%s: unable to set tunables for %s"
" (may cause reduced IO performance)\n",
argv[0], mop.mo_source);
}
-
+#endif
#ifdef HAVE_GSS
if (mop.mo_skpath[0] != '\0') {
/* Treat shared key failures as fatal */
for (i = 0, rc = -EAGAIN; i <= mop.mo_retry && rc != 0; i++) {
rc = mount(mop.mo_source, mop.mo_target, "lustre",
flags, (void *)options);
- if (rc == 0) {
- if (!client)
- label_lustre(&mop);
- } else {
+ if (rc != 0) {
if (verbose) {
fprintf(stderr, "%s: mount %s at %s "
"failed: %s retries left: "
} else {
rc = errno;
}
+#ifdef HAVE_SERVER_SUPPORT
+ } else {
+ if (!client)
+ label_lustre(&mop);
+#endif
}
}
}
}
out_osd:
+#ifdef HAVE_SERVER_SUPPORT
if (!client)
osd_fini();
-
+#endif
out_options:
free(options);