Whamcloud - gitweb
LU-2049 grant: add support for OBD_CONNECT_GRANT_PARAM
[fs/lustre-release.git] / lustre / osc / lproc_osc.c
index 983442f..d3d5f71 100644 (file)
@@ -317,6 +317,19 @@ static int osc_cur_lost_grant_bytes_seq_show(struct seq_file *m, void *v)
 }
 LPROC_SEQ_FOPS_RO(osc_cur_lost_grant_bytes);
 
+static int osc_cur_dirty_grant_bytes_seq_show(struct seq_file *m, void *v)
+{
+       struct obd_device *dev = m->private;
+       struct client_obd *cli = &dev->u.cli;
+       int rc;
+
+       spin_lock(&cli->cl_loi_list_lock);
+       rc = seq_printf(m, "%lu\n", cli->cl_dirty_grant);
+       spin_unlock(&cli->cl_loi_list_lock);
+       return rc;
+}
+LPROC_SEQ_FOPS_RO(osc_cur_dirty_grant_bytes);
+
 static int osc_grant_shrink_interval_seq_show(struct seq_file *m, void *v)
 {
        struct obd_device *obd = m->private;
@@ -628,6 +641,8 @@ struct lprocfs_vars lprocfs_osc_obd_vars[] = {
          .fops =       &osc_cur_grant_bytes_fops       },
        { .name =       "cur_lost_grant_bytes",
          .fops =       &osc_cur_lost_grant_bytes_fops  },
+       { .name =       "cur_dirty_grant_bytes",
+         .fops =       &osc_cur_dirty_grant_bytes_fops },
        { .name =       "grant_shrink_interval",
          .fops =       &osc_grant_shrink_interval_fops },
        { .name =       "checksums",