udf_fs_sb.h 2.3 KB

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