debugfs.h 730 B

123456789101112131415161718192021222324252627
  1. #ifndef _FS_CEPH_DEBUGFS_H
  2. #define _FS_CEPH_DEBUGFS_H
  3. #include <linux/ceph/ceph_debug.h>
  4. #include <linux/ceph/types.h>
  5. #define CEPH_DEFINE_SHOW_FUNC(name) \
  6. static int name##_open(struct inode *inode, struct file *file) \
  7. { \
  8. return single_open(file, name, inode->i_private); \
  9. } \
  10. \
  11. static const struct file_operations name##_fops = { \
  12. .open = name##_open, \
  13. .read = seq_read, \
  14. .llseek = seq_lseek, \
  15. .release = single_release, \
  16. };
  17. /* debugfs.c */
  18. extern int ceph_debugfs_init(void);
  19. extern void ceph_debugfs_cleanup(void);
  20. extern int ceph_debugfs_client_init(struct ceph_client *client);
  21. extern void ceph_debugfs_client_cleanup(struct ceph_client *client);
  22. #endif