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_ioff;
  16. unsigned long si_lf_sblk;
  17. unsigned long si_lf_eblk;
  18. unsigned long si_lasti;
  19. unsigned long * si_imap;
  20. struct buffer_head * si_sbh; /* buffer header w/superblock */
  21. struct bfs_super_block * si_bfs_sb; /* superblock in si_sbh->b_data */
  22. };
  23. /*
  24. * BFS file system in-core inode info
  25. */
  26. struct bfs_inode_info {
  27. unsigned long i_dsk_ino; /* inode number from the disk, can be 0 */
  28. unsigned long i_sblock;
  29. unsigned long i_eblock;
  30. struct inode vfs_inode;
  31. };
  32. static inline struct bfs_sb_info *BFS_SB(struct super_block *sb)
  33. {
  34. return sb->s_fs_info;
  35. }
  36. static inline struct bfs_inode_info *BFS_I(struct inode *inode)
  37. {
  38. return list_entry(inode, struct bfs_inode_info, vfs_inode);
  39. }
  40. #define printf(format, args...) \
  41. printk(KERN_ERR "BFS-fs: %s(): " format, __FUNCTION__, ## args)
  42. /* file.c */
  43. extern struct inode_operations bfs_file_inops;
  44. extern struct file_operations bfs_file_operations;
  45. extern struct address_space_operations bfs_aops;
  46. /* dir.c */
  47. extern struct inode_operations bfs_dir_inops;
  48. extern struct file_operations bfs_dir_operations;
  49. #endif /* _FS_BFS_BFS_H */