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 mutex bfs_lock;
  19. };
  20. /*
  21. * BFS file system in-core inode info
  22. */
  23. struct bfs_inode_info {
  24. unsigned long i_dsk_ino; /* inode number from the disk, can be 0 */
  25. unsigned long i_sblock;
  26. unsigned long i_eblock;
  27. struct inode vfs_inode;
  28. };
  29. static inline struct bfs_sb_info *BFS_SB(struct super_block *sb)
  30. {
  31. return sb->s_fs_info;
  32. }
  33. static inline struct bfs_inode_info *BFS_I(struct inode *inode)
  34. {
  35. return container_of(inode, struct bfs_inode_info, vfs_inode);
  36. }
  37. #define printf(format, args...) \
  38. printk(KERN_ERR "BFS-fs: %s(): " format, __func__, ## args)
  39. /* inode.c */
  40. extern struct inode *bfs_iget(struct super_block *sb, unsigned long ino);
  41. extern void bfs_dump_imap(const char *, struct super_block *);
  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 */