mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-25 00:52:45 -04:00
drbd: debugfs: add basic hierarchy
Add new debugfs hierarchy /sys/kernel/debug/
drbd/
resources/
$resource_name/connections/peer/$volume_number/
$resource_name/volumes/$volume_number/
minors/$minor_number -> ../resources/$resource_name/volumes/$volume_number/
Followup commits will populate this hierarchy with files containing
statistics, diagnostic information and some attribute data.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
This commit is contained in:
committed by
Philipp Reisner
parent
4ce4926683
commit
4d3d5aa83a
39
drivers/block/drbd/drbd_debugfs.h
Normal file
39
drivers/block/drbd/drbd_debugfs.h
Normal file
@@ -0,0 +1,39 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/debugfs.h>
|
||||
|
||||
#include "drbd_int.h"
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
int __init drbd_debugfs_init(void);
|
||||
void drbd_debugfs_cleanup(void);
|
||||
|
||||
void drbd_debugfs_resource_add(struct drbd_resource *resource);
|
||||
void drbd_debugfs_resource_cleanup(struct drbd_resource *resource);
|
||||
|
||||
void drbd_debugfs_connection_add(struct drbd_connection *connection);
|
||||
void drbd_debugfs_connection_cleanup(struct drbd_connection *connection);
|
||||
|
||||
void drbd_debugfs_device_add(struct drbd_device *device);
|
||||
void drbd_debugfs_device_cleanup(struct drbd_device *device);
|
||||
|
||||
void drbd_debugfs_peer_device_add(struct drbd_peer_device *peer_device);
|
||||
void drbd_debugfs_peer_device_cleanup(struct drbd_peer_device *peer_device);
|
||||
#else
|
||||
|
||||
static inline int __init drbd_debugfs_init(void) { return -ENODEV; }
|
||||
static inline void drbd_debugfs_cleanup(void) { }
|
||||
|
||||
static inline void drbd_debugfs_resource_add(struct drbd_resource *resource) { }
|
||||
static inline void drbd_debugfs_resource_cleanup(struct drbd_resource *resource) { }
|
||||
|
||||
static inline void drbd_debugfs_connection_add(struct drbd_connection *connection) { }
|
||||
static inline void drbd_debugfs_connection_cleanup(struct drbd_connection *connection) { }
|
||||
|
||||
static inline void drbd_debugfs_device_add(struct drbd_device *device) { }
|
||||
static inline void drbd_debugfs_device_cleanup(struct drbd_device *device) { }
|
||||
|
||||
static inline void drbd_debugfs_peer_device_add(struct drbd_peer_device *peer_device) { }
|
||||
static inline void drbd_debugfs_peer_device_cleanup(struct drbd_peer_device *peer_device) { }
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user