diff options
Diffstat (limited to 'fs/gfs2/sys.c')
-rw-r--r-- | fs/gfs2/sys.c | 42 |
1 files changed, 1 insertions, 41 deletions
diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c index 59e36fd80903..67ba5b7b759b 100644 --- a/fs/gfs2/sys.c +++ b/fs/gfs2/sys.c | |||
@@ -263,7 +263,6 @@ ARGS_ATTR(localcaching, "%d\n"); | |||
263 | ARGS_ATTR(localflocks, "%d\n"); | 263 | ARGS_ATTR(localflocks, "%d\n"); |
264 | ARGS_ATTR(debug, "%d\n"); | 264 | ARGS_ATTR(debug, "%d\n"); |
265 | ARGS_ATTR(upgrade, "%d\n"); | 265 | ARGS_ATTR(upgrade, "%d\n"); |
266 | ARGS_ATTR(num_glockd, "%u\n"); | ||
267 | ARGS_ATTR(posix_acl, "%d\n"); | 266 | ARGS_ATTR(posix_acl, "%d\n"); |
268 | ARGS_ATTR(quota, "%u\n"); | 267 | ARGS_ATTR(quota, "%u\n"); |
269 | ARGS_ATTR(suiddir, "%d\n"); | 268 | ARGS_ATTR(suiddir, "%d\n"); |
@@ -279,7 +278,6 @@ static struct attribute *args_attrs[] = { | |||
279 | &args_attr_localflocks.attr, | 278 | &args_attr_localflocks.attr, |
280 | &args_attr_debug.attr, | 279 | &args_attr_debug.attr, |
281 | &args_attr_upgrade.attr, | 280 | &args_attr_upgrade.attr, |
282 | &args_attr_num_glockd.attr, | ||
283 | &args_attr_posix_acl.attr, | 281 | &args_attr_posix_acl.attr, |
284 | &args_attr_quota.attr, | 282 | &args_attr_quota.attr, |
285 | &args_attr_suiddir.attr, | 283 | &args_attr_suiddir.attr, |
@@ -288,30 +286,6 @@ static struct attribute *args_attrs[] = { | |||
288 | }; | 286 | }; |
289 | 287 | ||
290 | /* | 288 | /* |
291 | * display counters from superblock | ||
292 | */ | ||
293 | |||
294 | struct counters_attr { | ||
295 | struct attribute attr; | ||
296 | ssize_t (*show)(struct gfs2_sbd *, char *); | ||
297 | }; | ||
298 | |||
299 | #define COUNTERS_ATTR(name, fmt) \ | ||
300 | static ssize_t name##_show(struct gfs2_sbd *sdp, char *buf) \ | ||
301 | { \ | ||
302 | return snprintf(buf, PAGE_SIZE, fmt, \ | ||
303 | (unsigned int)atomic_read(&sdp->sd_##name)); \ | ||
304 | } \ | ||
305 | static struct counters_attr counters_attr_##name = __ATTR_RO(name) | ||
306 | |||
307 | COUNTERS_ATTR(reclaimed, "%u\n"); | ||
308 | |||
309 | static struct attribute *counters_attrs[] = { | ||
310 | &counters_attr_reclaimed.attr, | ||
311 | NULL, | ||
312 | }; | ||
313 | |||
314 | /* | ||
315 | * get and set struct gfs2_tune fields | 289 | * get and set struct gfs2_tune fields |
316 | */ | 290 | */ |
317 | 291 | ||
@@ -393,7 +367,6 @@ static ssize_t name##_store(struct gfs2_sbd *sdp, const char *buf, size_t len)\ | |||
393 | } \ | 367 | } \ |
394 | TUNE_ATTR_2(name, name##_store) | 368 | TUNE_ATTR_2(name, name##_store) |
395 | 369 | ||
396 | TUNE_ATTR(demote_secs, 0); | ||
397 | TUNE_ATTR(incore_log_blocks, 0); | 370 | TUNE_ATTR(incore_log_blocks, 0); |
398 | TUNE_ATTR(log_flush_secs, 0); | 371 | TUNE_ATTR(log_flush_secs, 0); |
399 | TUNE_ATTR(quota_warn_period, 0); | 372 | TUNE_ATTR(quota_warn_period, 0); |
@@ -411,7 +384,6 @@ TUNE_ATTR_DAEMON(logd_secs, logd_process); | |||
411 | TUNE_ATTR_3(quota_scale, quota_scale_show, quota_scale_store); | 384 | TUNE_ATTR_3(quota_scale, quota_scale_show, quota_scale_store); |
412 | 385 | ||
413 | static struct attribute *tune_attrs[] = { | 386 | static struct attribute *tune_attrs[] = { |
414 | &tune_attr_demote_secs.attr, | ||
415 | &tune_attr_incore_log_blocks.attr, | 387 | &tune_attr_incore_log_blocks.attr, |
416 | &tune_attr_log_flush_secs.attr, | 388 | &tune_attr_log_flush_secs.attr, |
417 | &tune_attr_quota_warn_period.attr, | 389 | &tune_attr_quota_warn_period.attr, |
@@ -435,11 +407,6 @@ static struct attribute_group lockstruct_group = { | |||
435 | .attrs = lockstruct_attrs, | 407 | .attrs = lockstruct_attrs, |
436 | }; | 408 | }; |
437 | 409 | ||
438 | static struct attribute_group counters_group = { | ||
439 | .name = "counters", | ||
440 | .attrs = counters_attrs, | ||
441 | }; | ||
442 | |||
443 | static struct attribute_group args_group = { | 410 | static struct attribute_group args_group = { |
444 | .name = "args", | 411 | .name = "args", |
445 | .attrs = args_attrs, | 412 | .attrs = args_attrs, |
@@ -464,13 +431,9 @@ int gfs2_sys_fs_add(struct gfs2_sbd *sdp) | |||
464 | if (error) | 431 | if (error) |
465 | goto fail_reg; | 432 | goto fail_reg; |
466 | 433 | ||
467 | error = sysfs_create_group(&sdp->sd_kobj, &counters_group); | ||
468 | if (error) | ||
469 | goto fail_lockstruct; | ||
470 | |||
471 | error = sysfs_create_group(&sdp->sd_kobj, &args_group); | 434 | error = sysfs_create_group(&sdp->sd_kobj, &args_group); |
472 | if (error) | 435 | if (error) |
473 | goto fail_counters; | 436 | goto fail_lockstruct; |
474 | 437 | ||
475 | error = sysfs_create_group(&sdp->sd_kobj, &tune_group); | 438 | error = sysfs_create_group(&sdp->sd_kobj, &tune_group); |
476 | if (error) | 439 | if (error) |
@@ -481,8 +444,6 @@ int gfs2_sys_fs_add(struct gfs2_sbd *sdp) | |||
481 | 444 | ||
482 | fail_args: | 445 | fail_args: |
483 | sysfs_remove_group(&sdp->sd_kobj, &args_group); | 446 | sysfs_remove_group(&sdp->sd_kobj, &args_group); |
484 | fail_counters: | ||
485 | sysfs_remove_group(&sdp->sd_kobj, &counters_group); | ||
486 | fail_lockstruct: | 447 | fail_lockstruct: |
487 | sysfs_remove_group(&sdp->sd_kobj, &lockstruct_group); | 448 | sysfs_remove_group(&sdp->sd_kobj, &lockstruct_group); |
488 | fail_reg: | 449 | fail_reg: |
@@ -496,7 +457,6 @@ void gfs2_sys_fs_del(struct gfs2_sbd *sdp) | |||
496 | { | 457 | { |
497 | sysfs_remove_group(&sdp->sd_kobj, &tune_group); | 458 | sysfs_remove_group(&sdp->sd_kobj, &tune_group); |
498 | sysfs_remove_group(&sdp->sd_kobj, &args_group); | 459 | sysfs_remove_group(&sdp->sd_kobj, &args_group); |
499 | sysfs_remove_group(&sdp->sd_kobj, &counters_group); | ||
500 | sysfs_remove_group(&sdp->sd_kobj, &lockstruct_group); | 460 | sysfs_remove_group(&sdp->sd_kobj, &lockstruct_group); |
501 | kobject_put(&sdp->sd_kobj); | 461 | kobject_put(&sdp->sd_kobj); |
502 | } | 462 | } |