struct lov_tgt_desc *tgt = 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,
- tgt->active ? "" : "IN");
+ int idx = tgt - lov->tgts;
+ return seq_printf(p, "%d: %s %sACTIVE\n", idx, tgt->uuid.uuid,
+ (tgt->ltd_flags & LTD_ACTIVE) ? "" : "IN");
}
struct seq_operations lov_tgt_sops = {
{ "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 }
};
};
struct file_operations lov_proc_target_fops = {
- .open = lov_target_seq_open,
- .read = seq_read,
- .llseek = seq_lseek,
+ .owner = THIS_MODULE,
+ .open = lov_target_seq_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
.release = seq_release,
};