+/* mount opt is the third thing in client logs */
+static int mgs_write_log_mount_opt(const struct lu_env *env,
+ struct mgs_device *mgs, struct fs_db *fsdb,
+ char *logname)
+{
+ struct llog_handle *llh = NULL;
+ int rc = 0;
+
+ ENTRY;
+
+ CDEBUG(D_MGS, "Writing mount options log for %s\n", logname);
+
+ rc = record_start_log(env, mgs, &llh, logname);
+ if (rc)
+ RETURN(rc);
+
+ rc = record_marker(env, llh, fsdb, CM_START, logname, "mount opts");
+ if (rc)
+ GOTO(out_end, rc);
+ rc = record_mount_opt(env, llh, logname, fsdb->fsdb_clilov,
+ fsdb->fsdb_clilmv);
+ if (rc)
+ GOTO(out_end, rc);
+ rc = record_marker(env, llh, fsdb, CM_END, logname, "mount opts");
+ if (rc)
+ GOTO(out_end, rc);
+out_end:
+ record_end_log(env, &llh);
+ RETURN(rc);
+}
+