Whamcloud - gitweb
LU-14125 obdclass: add grant fields to export procfile 63/40563/4
authorOlaf Faaland <faaland1@llnl.gov>
Thu, 2 Jul 2020 21:25:32 +0000 (14:25 -0700)
committerOleg Drokin <green@whamcloud.com>
Thu, 26 Nov 2020 09:25:46 +0000 (09:25 +0000)
Add ted_{grant,reserved,dirty} to the export
procfile for OSTs, to allow comparison between the
OST's idea of grants allocated to the client with
the client's idea.

Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Change-Id: Ib34582e2be55fe2007363b52cea4dee211b7f540
Reviewed-on: https://review.whamcloud.com/40563
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/obdclass/lprocfs_status_server.c

index a8602c7..3c82dd2 100644 (file)
@@ -195,6 +195,19 @@ lprocfs_exp_print_export_seq(struct obd_export *exp, void *cb_data)
        obd_export_flags2str(exp, m);
        seq_printf(m, " ]\n");
 
        obd_export_flags2str(exp, m);
        seq_printf(m, " ]\n");
 
+       if (obd->obd_type &&
+           strcmp(obd->obd_type->typ_name, "obdfilter") == 0) {
+               struct filter_export_data *fed = &exp->exp_filter_data;
+
+               seq_printf(m, "    grant:\n");
+               seq_printf(m, "       granted: %ld\n",
+                       fed->fed_ted.ted_grant);
+               seq_printf(m, "       dirty: %ld\n",
+                       fed->fed_ted.ted_dirty);
+               seq_printf(m, "       pending: %ld\n",
+                       fed->fed_ted.ted_pending);
+       }
+
 out:
        return 0;
 }
 out:
        return 0;
 }