diff options
author | Dave Jones <davej@redhat.com> | 2006-06-29 16:01:54 -0400 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2006-06-29 16:01:54 -0400 |
commit | 55b4d6a52195a8f277ffddf755ddaff359878f41 (patch) | |
tree | 06a3183a562f8da4688f65023f7a18dcad702956 /fs/xfs/xfs_extfree_item.h | |
parent | adf8a287150667feb5747f8beade62acacc17d4e (diff) | |
parent | 1f1332f727c3229eb2166a83fec5d3de6a73dce2 (diff) |
Merge ../linus
Conflicts:
drivers/char/agp/Kconfig
Diffstat (limited to 'fs/xfs/xfs_extfree_item.h')
-rw-r--r-- | fs/xfs/xfs_extfree_item.h | 53 |
1 files changed, 52 insertions, 1 deletions
diff --git a/fs/xfs/xfs_extfree_item.h b/fs/xfs/xfs_extfree_item.h index 5bf681708fec..0ea45edaab03 100644 --- a/fs/xfs/xfs_extfree_item.h +++ b/fs/xfs/xfs_extfree_item.h | |||
@@ -27,6 +27,24 @@ typedef struct xfs_extent { | |||
27 | } xfs_extent_t; | 27 | } xfs_extent_t; |
28 | 28 | ||
29 | /* | 29 | /* |
30 | * Since an xfs_extent_t has types (start:64, len: 32) | ||
31 | * there are different alignments on 32 bit and 64 bit kernels. | ||
32 | * So we provide the different variants for use by a | ||
33 | * conversion routine. | ||
34 | */ | ||
35 | |||
36 | typedef struct xfs_extent_32 { | ||
37 | xfs_dfsbno_t ext_start; | ||
38 | xfs_extlen_t ext_len; | ||
39 | } __attribute__((packed)) xfs_extent_32_t; | ||
40 | |||
41 | typedef struct xfs_extent_64 { | ||
42 | xfs_dfsbno_t ext_start; | ||
43 | xfs_extlen_t ext_len; | ||
44 | __uint32_t ext_pad; | ||
45 | } xfs_extent_64_t; | ||
46 | |||
47 | /* | ||
30 | * This is the structure used to lay out an efi log item in the | 48 | * This is the structure used to lay out an efi log item in the |
31 | * log. The efi_extents field is a variable size array whose | 49 | * log. The efi_extents field is a variable size array whose |
32 | * size is given by efi_nextents. | 50 | * size is given by efi_nextents. |
@@ -39,6 +57,22 @@ typedef struct xfs_efi_log_format { | |||
39 | xfs_extent_t efi_extents[1]; /* array of extents to free */ | 57 | xfs_extent_t efi_extents[1]; /* array of extents to free */ |
40 | } xfs_efi_log_format_t; | 58 | } xfs_efi_log_format_t; |
41 | 59 | ||
60 | typedef struct xfs_efi_log_format_32 { | ||
61 | unsigned short efi_type; /* efi log item type */ | ||
62 | unsigned short efi_size; /* size of this item */ | ||
63 | uint efi_nextents; /* # extents to free */ | ||
64 | __uint64_t efi_id; /* efi identifier */ | ||
65 | xfs_extent_32_t efi_extents[1]; /* array of extents to free */ | ||
66 | } __attribute__((packed)) xfs_efi_log_format_32_t; | ||
67 | |||
68 | typedef struct xfs_efi_log_format_64 { | ||
69 | unsigned short efi_type; /* efi log item type */ | ||
70 | unsigned short efi_size; /* size of this item */ | ||
71 | uint efi_nextents; /* # extents to free */ | ||
72 | __uint64_t efi_id; /* efi identifier */ | ||
73 | xfs_extent_64_t efi_extents[1]; /* array of extents to free */ | ||
74 | } xfs_efi_log_format_64_t; | ||
75 | |||
42 | /* | 76 | /* |
43 | * This is the structure used to lay out an efd log item in the | 77 | * This is the structure used to lay out an efd log item in the |
44 | * log. The efd_extents array is a variable size array whose | 78 | * log. The efd_extents array is a variable size array whose |
@@ -52,6 +86,22 @@ typedef struct xfs_efd_log_format { | |||
52 | xfs_extent_t efd_extents[1]; /* array of extents freed */ | 86 | xfs_extent_t efd_extents[1]; /* array of extents freed */ |
53 | } xfs_efd_log_format_t; | 87 | } xfs_efd_log_format_t; |
54 | 88 | ||
89 | typedef struct xfs_efd_log_format_32 { | ||
90 | unsigned short efd_type; /* efd log item type */ | ||
91 | unsigned short efd_size; /* size of this item */ | ||
92 | uint efd_nextents; /* # of extents freed */ | ||
93 | __uint64_t efd_efi_id; /* id of corresponding efi */ | ||
94 | xfs_extent_32_t efd_extents[1]; /* array of extents freed */ | ||
95 | } __attribute__((packed)) xfs_efd_log_format_32_t; | ||
96 | |||
97 | typedef struct xfs_efd_log_format_64 { | ||
98 | unsigned short efd_type; /* efd log item type */ | ||
99 | unsigned short efd_size; /* size of this item */ | ||
100 | uint efd_nextents; /* # of extents freed */ | ||
101 | __uint64_t efd_efi_id; /* id of corresponding efi */ | ||
102 | xfs_extent_64_t efd_extents[1]; /* array of extents freed */ | ||
103 | } xfs_efd_log_format_64_t; | ||
104 | |||
55 | 105 | ||
56 | #ifdef __KERNEL__ | 106 | #ifdef __KERNEL__ |
57 | 107 | ||
@@ -103,7 +153,8 @@ extern struct kmem_zone *xfs_efd_zone; | |||
103 | xfs_efi_log_item_t *xfs_efi_init(struct xfs_mount *, uint); | 153 | xfs_efi_log_item_t *xfs_efi_init(struct xfs_mount *, uint); |
104 | xfs_efd_log_item_t *xfs_efd_init(struct xfs_mount *, xfs_efi_log_item_t *, | 154 | xfs_efd_log_item_t *xfs_efd_init(struct xfs_mount *, xfs_efi_log_item_t *, |
105 | uint); | 155 | uint); |
106 | 156 | int xfs_efi_copy_format(xfs_log_iovec_t *buf, | |
157 | xfs_efi_log_format_t *dst_efi_fmt); | ||
107 | void xfs_efi_item_free(xfs_efi_log_item_t *); | 158 | void xfs_efi_item_free(xfs_efi_log_item_t *); |
108 | 159 | ||
109 | #endif /* __KERNEL__ */ | 160 | #endif /* __KERNEL__ */ |