};
#define LMD_FLG_RECOVER 0x0001 /* Allow recovery */
+#define LMD_FLG_NOSVC 0x0002 /* Only start MGS/MGC for servers, no other services */
#define LMD_FLG_MNTCNF 0x1000 /* MountConf compat */
#define LMD_FLG_CLIENT 0x2000 /* Mounting a client only; no real device */
if (rc)
GOTO(out_mnt, rc);
+ /*Only start MGS/MGC on servers, no other services, even not
+ *actually mount the filesystem. */
+ if (lmd->lmd_flags & LMD_FLG_NOSVC)
+ RETURN(0);
+
/* Set up all obd devices for service */
if (IS_OST(lsi->lsi_ldd) || IS_MDT(lsi->lsi_ldd)) {
rc = server_start_targets(sb, mnt);
lmd->lmd_flags |= LMD_FLG_RECOVER;
if (strncmp(s1, "norecov", 7) == 0)
lmd->lmd_flags &= ~LMD_FLG_RECOVER;
+ if (strncmp(s1, "nosvc", 5) == 0)
+ lmd->lmd_flags |= LMD_FLG_NOSVC;
+
/* Linux 2.4 doesn't pass the device, so we stuck it at the
end of the options. */
if (strncmp(s1, "device=", 7) == 0) {
{ "noflock", 1, 1, 0 }, /* Disable flock support */
{ "user_xattr", 0, 0, 0 }, /* Enable get/set user xattr */
{ "nouser_xattr", 1, 1, 0 }, /* Disable user xattr */
+ { "nosvc", 0, 0, 0 }, /* Only start MGS/MGC, no other services */
{ NULL, 0, 0, 0 }
};
/****************************************************************************/