Whamcloud - gitweb
add RHBUILD to targets and spec to distinguish files that come from using a redhat...
[fs/lustre-release.git] / lustre / lov / lproc_lov.c
index 37d1159..c29644c 100644 (file)
@@ -147,7 +147,7 @@ static int lov_tgt_seq_show(struct seq_file *p, void *v)
         struct obd_device *dev = p->private;
         struct lov_obd *lov = &dev->u.lov;
         int idx = tgt - &(lov->tgts[0]);
-        return seq_printf(p, "%d: %s %sACTIVE\n", idx+1, tgt->uuid.uuid,
+        return seq_printf(p, "%d: %s %sACTIVE\n", idx, tgt->uuid.uuid,
                           tgt->active ? "" : "IN");
 }
 
@@ -160,7 +160,7 @@ struct seq_operations lov_tgt_sops = {
 
 static int lov_target_seq_open(struct inode *inode, struct file *file)
 {
-        struct proc_dir_entry *dp = inode->u.generic_ip;
+        struct proc_dir_entry *dp = PDE(inode);
         struct seq_file *seq;
         int rc = seq_open(file, &lov_tgt_sops);
 
@@ -187,6 +187,7 @@ struct lprocfs_vars lprocfs_obd_vars[] = {
         { "blocksize",    lprocfs_rd_blksize,     0, 0 },
         { "kbytestotal",  lprocfs_rd_kbytestotal, 0, 0 },
         { "kbytesfree",   lprocfs_rd_kbytesfree,  0, 0 },
+        { "kbytesavail",  lprocfs_rd_kbytesavail, 0, 0 },
         { "desc_uuid",    lov_rd_desc_uuid,       0, 0 },
         { 0 }
 };