Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / obdclass / lprocfs_status.c
index 01ac77b..4fc61c9 100644 (file)
@@ -602,6 +602,9 @@ static const char *obd_connect_names[] = {
         "lru_resize",
         "mds_mds_connection",
         "real_conn",
+        "change_qunit_size",
+        "alt_checksum_algorithm",
+        "fid_is_enabled",
         NULL
 };
 
@@ -1505,7 +1508,9 @@ int lprocfs_obd_rd_recovery_status(char *page, char **start, off_t off,
                 goto out;
 
         if (obd->obd_max_recoverable_clients == 0) {
-                lprocfs_obd_snprintf(&page, size, &len, "INACTIVE\n");
+                if (lprocfs_obd_snprintf(&page, size, &len, "INACTIVE\n") <= 0)
+                        goto out;
+
                 goto fclose;
         }
 
@@ -1570,7 +1575,9 @@ int lprocfs_obd_rd_recovery_status(char *page, char **start, off_t off,
                                  obd->obd_requests_queued_for_recovery) <= 0)
                 goto out;
 
-        lprocfs_obd_snprintf(&page, size, &len, "next_transno: "LPD64"\n", obd->obd_next_recovery_transno);
+        if (lprocfs_obd_snprintf(&page, size, &len, "next_transno: "LPD64"\n", 
+                                 obd->obd_next_recovery_transno) <= 0)
+                goto out;
 
 fclose:
         *eof = 1;
@@ -1579,6 +1586,33 @@ out:
 }
 EXPORT_SYMBOL(lprocfs_obd_rd_recovery_status);
 
+int lprocfs_obd_rd_recovery_maxtime(char *page, char **start, off_t off,
+                                    int count, int *eof, void *data)
+{
+        struct obd_device *obd = (struct obd_device *)data;
+        LASSERT(obd != NULL);
+
+        return snprintf(page, count, "%lu\n", 
+                        obd->obd_recovery_max_time);
+}
+EXPORT_SYMBOL(lprocfs_obd_rd_recovery_maxtime);
+
+int lprocfs_obd_wr_recovery_maxtime(struct file *file, const char *buffer,
+                                    unsigned long count, void *data)
+{
+        struct obd_device *obd = (struct obd_device *)data;
+        int val, rc;
+        LASSERT(obd != NULL);
+
+        rc = lprocfs_write_helper(buffer, count, &val);
+        if (rc)
+                return rc;
+
+        obd->obd_recovery_max_time = val;
+        return count;
+}
+EXPORT_SYMBOL(lprocfs_obd_wr_recovery_maxtime);
+
 EXPORT_SYMBOL(lprocfs_register);
 EXPORT_SYMBOL(lprocfs_srch);
 EXPORT_SYMBOL(lprocfs_remove);