|
26 | 26 | #include "misc.h" |
27 | 27 | #include "fs.h" |
28 | 28 | #include "accessors.h" |
29 | | -#include "zoned.h" |
30 | 29 |
|
31 | 30 | /* |
32 | 31 | * Structure name Path |
@@ -1189,56 +1188,6 @@ static ssize_t btrfs_commit_stats_store(struct kobject *kobj, |
1189 | 1188 | } |
1190 | 1189 | BTRFS_ATTR_RW(, commit_stats, btrfs_commit_stats_show, btrfs_commit_stats_store); |
1191 | 1190 |
|
1192 | | -static ssize_t btrfs_zoned_stats_show(struct kobject *kobj, |
1193 | | - struct kobj_attribute *a, char *buf) |
1194 | | -{ |
1195 | | - struct btrfs_fs_info *fs_info = to_fs_info(kobj); |
1196 | | - struct btrfs_block_group *bg; |
1197 | | - size_t ret = 0; |
1198 | | - |
1199 | | - |
1200 | | - if (!btrfs_is_zoned(fs_info)) |
1201 | | - return ret; |
1202 | | - |
1203 | | - spin_lock(&fs_info->zone_active_bgs_lock); |
1204 | | - ret += sysfs_emit_at(buf, ret, "active block-groups: %zu\n", |
1205 | | - list_count_nodes(&fs_info->zone_active_bgs)); |
1206 | | - spin_unlock(&fs_info->zone_active_bgs_lock); |
1207 | | - |
1208 | | - mutex_lock(&fs_info->reclaim_bgs_lock); |
1209 | | - spin_lock(&fs_info->unused_bgs_lock); |
1210 | | - ret += sysfs_emit_at(buf, ret, "\treclaimable: %zu\n", |
1211 | | - list_count_nodes(&fs_info->reclaim_bgs)); |
1212 | | - ret += sysfs_emit_at(buf, ret, "\tunused: %zu\n", |
1213 | | - list_count_nodes(&fs_info->unused_bgs)); |
1214 | | - spin_unlock(&fs_info->unused_bgs_lock); |
1215 | | - mutex_unlock(&fs_info->reclaim_bgs_lock); |
1216 | | - |
1217 | | - ret += sysfs_emit_at(buf, ret, "\tneed reclaim: %s\n", |
1218 | | - str_true_false(btrfs_zoned_should_reclaim(fs_info))); |
1219 | | - |
1220 | | - if (fs_info->data_reloc_bg) |
1221 | | - ret += sysfs_emit_at(buf, ret, |
1222 | | - "data relocation block-group: %llu\n", |
1223 | | - fs_info->data_reloc_bg); |
1224 | | - if (fs_info->treelog_bg) |
1225 | | - ret += sysfs_emit_at(buf, ret, |
1226 | | - "tree-log block-group: %llu\n", |
1227 | | - fs_info->treelog_bg); |
1228 | | - |
1229 | | - spin_lock(&fs_info->zone_active_bgs_lock); |
1230 | | - ret += sysfs_emit_at(buf, ret, "active zones:\n"); |
1231 | | - list_for_each_entry(bg, &fs_info->zone_active_bgs, active_bg_list) { |
1232 | | - ret += sysfs_emit_at(buf, ret, |
1233 | | - "\tstart: %llu, wp: %llu used: %llu, reserved: %llu, unusable: %llu\n", |
1234 | | - bg->start, bg->alloc_offset, bg->used, |
1235 | | - bg->reserved, bg->zone_unusable); |
1236 | | - } |
1237 | | - spin_unlock(&fs_info->zone_active_bgs_lock); |
1238 | | - return ret; |
1239 | | -} |
1240 | | -BTRFS_ATTR(, zoned_stats, btrfs_zoned_stats_show); |
1241 | | - |
1242 | 1191 | static ssize_t btrfs_clone_alignment_show(struct kobject *kobj, |
1243 | 1192 | struct kobj_attribute *a, char *buf) |
1244 | 1193 | { |
@@ -1651,7 +1600,6 @@ static const struct attribute *btrfs_attrs[] = { |
1651 | 1600 | BTRFS_ATTR_PTR(, bg_reclaim_threshold), |
1652 | 1601 | BTRFS_ATTR_PTR(, commit_stats), |
1653 | 1602 | BTRFS_ATTR_PTR(, temp_fsid), |
1654 | | - BTRFS_ATTR_PTR(, zoned_stats), |
1655 | 1603 | #ifdef CONFIG_BTRFS_EXPERIMENTAL |
1656 | 1604 | BTRFS_ATTR_PTR(, offload_csum), |
1657 | 1605 | #endif |
|
0 commit comments