X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fosd-ldiskfs%2Fosd_lproc.c;fp=lustre%2Fosd-ldiskfs%2Fosd_lproc.c;h=42fa6c30ea83660bf2916a7dd924dbf1e7dbcf8a;hb=1734c4746d98dfa6fc6559841be8028a22465718;hp=97efb3680fb9d436b8ec1b18aa58193eb25b4e74;hpb=b5f71a7e7528831a0a2c7d02b5bd98d68fcb1855;p=fs%2Flustre-release.git diff --git a/lustre/osd-ldiskfs/osd_lproc.c b/lustre/osd-ldiskfs/osd_lproc.c index 97efb36..42fa6c3 100644 --- a/lustre/osd-ldiskfs/osd_lproc.c +++ b/lustre/osd-ldiskfs/osd_lproc.c @@ -575,6 +575,24 @@ static ssize_t full_scrub_threshold_rate_store(struct kobject *kobj, } LUSTRE_RW_ATTR(full_scrub_threshold_rate); +static ssize_t extent_bytes_allocation_show(struct kobject *kobj, + struct attribute *attr, char *buf) +{ + struct dt_device *dt = container_of(kobj, struct dt_device, + dd_kobj); + struct osd_device *dev = osd_dt_dev(dt); + int i; + unsigned int min = (unsigned int)(~0), cur; + + for_each_online_cpu(i) { + cur = *per_cpu_ptr(dev->od_extent_bytes_percpu, i); + if (cur < min) + min = cur; + } + return snprintf(buf, PAGE_SIZE, "%u\n", min); +} +LUSTRE_RO_ATTR(extent_bytes_allocation); + static int ldiskfs_osd_oi_scrub_seq_show(struct seq_file *m, void *data) { struct osd_device *dev = osd_dt_dev((struct dt_device *)m->private); @@ -864,6 +882,7 @@ static struct attribute *ldiskfs_attrs[] = { &lustre_attr_pdo.attr, &lustre_attr_full_scrub_ratio.attr, &lustre_attr_full_scrub_threshold_rate.attr, + &lustre_attr_extent_bytes_allocation.attr, NULL, };