ext2fsP.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*
  2. * ext2fsP.h --- private header file for ext2 library
  3. *
  4. * Copyright (C) 1997 Theodore Ts'o.
  5. *
  6. * %Begin-Header%
  7. * This file may be redistributed under the terms of the GNU Public
  8. * License.
  9. * %End-Header%
  10. */
  11. #include "ext2fs.h"
  12. /*
  13. * Badblocks list
  14. */
  15. struct ext2_struct_u32_list {
  16. int magic;
  17. int num;
  18. int size;
  19. __u32 *list;
  20. int badblocks_flags;
  21. };
  22. struct ext2_struct_u32_iterate {
  23. int magic;
  24. ext2_u32_list bb;
  25. int ptr;
  26. };
  27. /*
  28. * Directory block iterator definition
  29. */
  30. struct ext2_struct_dblist {
  31. int magic;
  32. ext2_filsys fs;
  33. ext2_ino_t size;
  34. ext2_ino_t count;
  35. int sorted;
  36. struct ext2_db_entry * list;
  37. };
  38. /*
  39. * For directory iterators
  40. */
  41. struct dir_context {
  42. ext2_ino_t dir;
  43. int flags;
  44. char *buf;
  45. int (*func)(ext2_ino_t dir,
  46. int entry,
  47. struct ext2_dir_entry *dirent,
  48. int offset,
  49. int blocksize,
  50. char *buf,
  51. void *priv_data);
  52. void *priv_data;
  53. errcode_t errcode;
  54. };
  55. /*
  56. * Inode cache structure
  57. */
  58. struct ext2_inode_cache {
  59. void * buffer;
  60. blk_t buffer_blk;
  61. int cache_last;
  62. int cache_size;
  63. int refcount;
  64. struct ext2_inode_cache_ent *cache;
  65. };
  66. struct ext2_inode_cache_ent {
  67. ext2_ino_t ino;
  68. struct ext2_inode inode;
  69. };
  70. /* Function prototypes */
  71. extern int ext2fs_process_dir_block(ext2_filsys fs,
  72. blk_t *blocknr,
  73. e2_blkcnt_t blockcnt,
  74. blk_t ref_block,
  75. int ref_offset,
  76. void *priv_data);