diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-10-23 04:49:28 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-12-03 06:14:33 -0500 |
commit | 552ff3179d1e93a3e982357544c059f3e9a5516e (patch) | |
tree | fb53c9ab1b19e1c98fc0a316859413723e34d186 /fs/ubifs/super.c | |
parent | 17c2f9f85c896b48a5d74a9155d99ec5b241a0e6 (diff) |
UBIFS: add debugfs support
We need to have a possibility to see various UBIFS variables
and ask UBIFS to dump various information. Debugfs is what
we need.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/super.c')
-rw-r--r-- | fs/ubifs/super.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index ad44822059c7..2dbaa4fc2cbb 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c | |||
@@ -1258,6 +1258,10 @@ static int mount_ubifs(struct ubifs_info *c) | |||
1258 | } | 1258 | } |
1259 | } | 1259 | } |
1260 | 1260 | ||
1261 | err = dbg_debugfs_init_fs(c); | ||
1262 | if (err) | ||
1263 | goto out_infos; | ||
1264 | |||
1261 | err = dbg_check_filesystem(c); | 1265 | err = dbg_check_filesystem(c); |
1262 | if (err) | 1266 | if (err) |
1263 | goto out_infos; | 1267 | goto out_infos; |
@@ -1369,6 +1373,7 @@ static void ubifs_umount(struct ubifs_info *c) | |||
1369 | dbg_gen("un-mounting UBI device %d, volume %d", c->vi.ubi_num, | 1373 | dbg_gen("un-mounting UBI device %d, volume %d", c->vi.ubi_num, |
1370 | c->vi.vol_id); | 1374 | c->vi.vol_id); |
1371 | 1375 | ||
1376 | dbg_debugfs_exit_fs(c); | ||
1372 | spin_lock(&ubifs_infos_lock); | 1377 | spin_lock(&ubifs_infos_lock); |
1373 | list_del(&c->infos_list); | 1378 | list_del(&c->infos_list); |
1374 | spin_unlock(&ubifs_infos_lock); | 1379 | spin_unlock(&ubifs_infos_lock); |
@@ -2079,11 +2084,17 @@ static int __init ubifs_init(void) | |||
2079 | 2084 | ||
2080 | err = ubifs_compressors_init(); | 2085 | err = ubifs_compressors_init(); |
2081 | if (err) | 2086 | if (err) |
2087 | goto out_shrinker; | ||
2088 | |||
2089 | err = dbg_debugfs_init(); | ||
2090 | if (err) | ||
2082 | goto out_compr; | 2091 | goto out_compr; |
2083 | 2092 | ||
2084 | return 0; | 2093 | return 0; |
2085 | 2094 | ||
2086 | out_compr: | 2095 | out_compr: |
2096 | ubifs_compressors_exit(); | ||
2097 | out_shrinker: | ||
2087 | unregister_shrinker(&ubifs_shrinker_info); | 2098 | unregister_shrinker(&ubifs_shrinker_info); |
2088 | kmem_cache_destroy(ubifs_inode_slab); | 2099 | kmem_cache_destroy(ubifs_inode_slab); |
2089 | out_reg: | 2100 | out_reg: |
@@ -2098,6 +2109,7 @@ static void __exit ubifs_exit(void) | |||
2098 | ubifs_assert(list_empty(&ubifs_infos)); | 2109 | ubifs_assert(list_empty(&ubifs_infos)); |
2099 | ubifs_assert(atomic_long_read(&ubifs_clean_zn_cnt) == 0); | 2110 | ubifs_assert(atomic_long_read(&ubifs_clean_zn_cnt) == 0); |
2100 | 2111 | ||
2112 | dbg_debugfs_exit(); | ||
2101 | ubifs_compressors_exit(); | 2113 | ubifs_compressors_exit(); |
2102 | unregister_shrinker(&ubifs_shrinker_info); | 2114 | unregister_shrinker(&ubifs_shrinker_info); |
2103 | kmem_cache_destroy(ubifs_inode_slab); | 2115 | kmem_cache_destroy(ubifs_inode_slab); |