Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * udf_fs_i.h |
| 3 | * |
| 4 | * This file is intended for the Linux kernel/module. |
| 5 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | |
| 13 | #ifndef _UDF_FS_I_H |
| 14 | #define _UDF_FS_I_H 1 |
| 15 | |
| 16 | #ifdef __KERNEL__ |
| 17 | |
| 18 | #ifndef _ECMA_167_H |
| 19 | typedef struct |
| 20 | { |
| 21 | __u32 logicalBlockNum; |
| 22 | __u16 partitionReferenceNum; |
| 23 | } __attribute__ ((packed)) lb_addr; |
| 24 | |
| 25 | typedef struct |
| 26 | { |
| 27 | __u32 extLength; |
| 28 | __u32 extPosition; |
| 29 | } __attribute__ ((packed)) short_ad; |
| 30 | |
| 31 | typedef struct |
| 32 | { |
| 33 | __u32 extLength; |
| 34 | lb_addr extLocation; |
| 35 | __u8 impUse[6]; |
| 36 | } __attribute__ ((packed)) long_ad; |
| 37 | #endif |
| 38 | |
| 39 | struct udf_inode_info |
| 40 | { |
| 41 | struct timespec i_crtime; |
| 42 | /* Physical address of inode */ |
| 43 | kernel_lb_addr i_location; |
| 44 | __u64 i_unique; |
| 45 | __u32 i_lenEAttr; |
| 46 | __u32 i_lenAlloc; |
| 47 | __u64 i_lenExtents; |
| 48 | __u32 i_next_alloc_block; |
| 49 | __u32 i_next_alloc_goal; |
| 50 | unsigned i_alloc_type : 3; |
| 51 | unsigned i_efe : 1; |
| 52 | unsigned i_use : 1; |
| 53 | unsigned i_strat4096 : 1; |
| 54 | unsigned reserved : 26; |
| 55 | union |
| 56 | { |
| 57 | short_ad *i_sad; |
| 58 | long_ad *i_lad; |
| 59 | __u8 *i_data; |
| 60 | } i_ext; |
| 61 | struct inode vfs_inode; |
| 62 | }; |
| 63 | |
| 64 | #endif |
| 65 | |
| 66 | /* exported IOCTLs, we have 'l', 0x40-0x7f */ |
| 67 | |
| 68 | #define UDF_GETEASIZE _IOR('l', 0x40, int) |
| 69 | #define UDF_GETEABLOCK _IOR('l', 0x41, void *) |
| 70 | #define UDF_GETVOLIDENT _IOR('l', 0x42, void *) |
| 71 | #define UDF_RELOCATE_BLOCKS _IOWR('l', 0x43, long) |
| 72 | |
| 73 | #endif /* _UDF_FS_I_H */ |