btrfs: add simple debugfs interface

Help during debugging to export various interesting infromation and
tunables without the need of extra mount options or ioctls.

Usage:
* declare your variable in sysfs.h, and include where you need it
* define the variable in sysfs.c and make it visible via
  debugfs_create_TYPE

Depends on CONFIG_DEBUG_FS.

Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Josef Bacik <jbacik@fb.com>
This commit is contained in:
David Sterba 2014-02-05 15:36:18 +01:00 committed by Josef Bacik
parent ace0105076
commit 1bae30982b
2 changed files with 33 additions and 7 deletions

View file

@ -1,6 +1,11 @@
#ifndef _BTRFS_SYSFS_H_
#define _BTRFS_SYSFS_H_
/*
* Data exported through sysfs
*/
extern u64 btrfs_debugfs_test;
enum btrfs_feature_set {
FEAT_COMPAT,
FEAT_COMPAT_RO,