bfs.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * fs/bfs/bfs.h
  3. * Copyright (C) 1999 Tigran Aivazian <tigran@veritas.com>
  4. */
  5. #ifndef _FS_BFS_BFS_H
  6. #define _FS_BFS_BFS_H
  7. #include <linux/bfs_fs.h>
  8. /*
  9. * BFS file system in-core superblock info
  10. */
  11. struct bfs_sb_info {
  12. unsigned long si_blocks;
  13. unsigned long si_freeb;
  14. unsigned long si_freei;
  15. unsigned long si_lf_eblk;
  16. unsigned long si_lasti;
  17. unsigned long *si_imap;
  18. struct buffer_head *si_sbh; /* buffer header w/superblock */
  19. struct mutex bfs_lock;
  20. };
  21. /*
  22. * BFS file system in-core inode info
  23. */
  24. struct bfs_inode_info {
  25. unsigned long i_dsk_ino; /* inode number from the disk, can be 0 */
  26. unsigned long i_sblock;
  27. unsigned long i_eblock;
  28. struct inode vfs_inode;
  29. };
  30. static inline struct bfs_sb_info *BFS_SB(struct super_block *sb)
  31. {
  32. return sb->s_fs_info;
  33. }
  34. static inline struct bfs_inode_info *BFS_I(struct inode *inode)
  35. {
  36. return container_of(inode, struct bfs_inode_info, vfs_inode);
  37. }
  38. #define printf(format, args...) \
  39. printk(KERN_ERR "BFS-fs: %s(): " format, __func__, ## args)
  40. /* inode.c */
  41. extern struct inode *bfs_iget(struct super_block *sb, unsigned long ino);
  42. /* file.c */
  43. extern const struct inode_operations bfs_file_inops;
  44. extern const struct file_operations bfs_file_operations;
  45. extern const struct address_space_operations bfs_aops;
  46. /* dir.c */
  47. extern const struct inode_operations bfs_dir_inops;
  48. extern const struct file_operations bfs_dir_operations;
  49. #endif /* _FS_BFS_BFS_H */