bfs.h 1.3 KB

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