udf_fs_sb.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /*
  2. * udf_fs_sb.h
  3. *
  4. * This include file is for the Linux kernel/module.
  5. *
  6. * COPYRIGHT
  7. * This file is distributed under the terms of the GNU General Public
  8. * License (GPL). Copies of the GPL can be obtained from:
  9. * ftp://prep.ai.mit.edu/pub/gnu/GPL
  10. * Each contributing author retains all rights to their own work.
  11. */
  12. #ifndef _UDF_FS_SB_H
  13. #define _UDF_FS_SB_H 1
  14. #include <linux/mutex.h>
  15. #pragma pack(1)
  16. #define UDF_MAX_BLOCK_LOADED 8
  17. #define UDF_TYPE1_MAP15 0x1511U
  18. #define UDF_VIRTUAL_MAP15 0x1512U
  19. #define UDF_VIRTUAL_MAP20 0x2012U
  20. #define UDF_SPARABLE_MAP15 0x1522U
  21. struct udf_sparing_data
  22. {
  23. __u16 s_packet_len;
  24. struct buffer_head *s_spar_map[4];
  25. };
  26. struct udf_virtual_data
  27. {
  28. __u32 s_num_entries;
  29. __u16 s_start_offset;
  30. };
  31. struct udf_bitmap
  32. {
  33. __u32 s_extLength;
  34. __u32 s_extPosition;
  35. __u16 s_nr_groups;
  36. struct buffer_head **s_block_bitmap;
  37. };
  38. struct udf_part_map
  39. {
  40. union
  41. {
  42. struct udf_bitmap *s_bitmap;
  43. struct inode *s_table;
  44. } s_uspace;
  45. union
  46. {
  47. struct udf_bitmap *s_bitmap;
  48. struct inode *s_table;
  49. } s_fspace;
  50. __u32 s_partition_root;
  51. __u32 s_partition_len;
  52. __u16 s_partition_type;
  53. __u16 s_partition_num;
  54. union
  55. {
  56. struct udf_sparing_data s_sparing;
  57. struct udf_virtual_data s_virtual;
  58. } s_type_specific;
  59. __u32 (*s_partition_func)(struct super_block *, __u32, __u16, __u32);
  60. __u16 s_volumeseqnum;
  61. __u16 s_partition_flags;
  62. };
  63. #pragma pack()
  64. struct udf_sb_info
  65. {
  66. struct udf_part_map *s_partmaps;
  67. __u8 s_volident[32];
  68. /* Overall info */
  69. __u16 s_partitions;
  70. __u16 s_partition;
  71. /* Sector headers */
  72. __s32 s_session;
  73. __u32 s_anchor[4];
  74. __u32 s_lastblock;
  75. struct buffer_head *s_lvidbh;
  76. /* Default permissions */
  77. mode_t s_umask;
  78. gid_t s_gid;
  79. uid_t s_uid;
  80. /* Root Info */
  81. struct timespec s_recordtime;
  82. /* Fileset Info */
  83. __u16 s_serialnum;
  84. /* highest UDF revision we have recorded to this media */
  85. __u16 s_udfrev;
  86. /* Miscellaneous flags */
  87. __u32 s_flags;
  88. /* Encoding info */
  89. struct nls_table *s_nls_map;
  90. /* VAT inode */
  91. struct inode *s_vat;
  92. struct mutex s_alloc_mutex;
  93. };
  94. #endif /* _UDF_FS_SB_H */