ext2fsP.h 1.4 KB

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