34#define __BYTEORDER_HAS_U64__
40#include <linux/types.h>
41#include <linux/jfs_fs.h>
44#ifndef _ULS_UNICHAR_DEFINED
45#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,3,0))
50#define _ULS_UNICHAR_DEFINED
105#define MIN(a,b) (((a)<(b))?(a):(b))
107#define MAX(a,b) (((a)>(b))?(a):(b))
109#define ROUNDUP(x, y) ( ((x) + ((y) - 1)) & ~((y) - 1) )
111#define LEFTMOSTONE 0x80000000
112#define HIGHORDER 0x80000000u
113#define ONES 0xffffffffu
129#define LXDlength(lxd, length32) ( (lxd)->len = length32 )
130#define LXDoffset(lxd, offset64)\
132 (lxd)->off1 = ((s64)offset64) >> 32;\
133 (lxd)->off2 = (offset64) & 0xffffffff;\
137#define lengthLXD(lxd) ( (lxd)->len )
138#define offsetLXD(lxd)\
139 ( ((s64)((lxd)->off1)) << 32 | (lxd)->off2 )
159#define PXDlength(pxd, length32) ((pxd)->len = __cpu_to_le24(length32))
160#define PXDaddress(pxd, address64)\
162 (pxd)->addr1 = ((s64)address64) >> 32;\
163 (pxd)->addr2 = __cpu_to_le32((address64) & 0xffffffff);\
167#define lengthPXD(pxd) __le24_to_cpu((pxd)->len)
168#define addressPXD(pxd)\
169 ( ((s64)((pxd)->addr1)) << 32 | __le32_to_cpu((pxd)->addr2))
192#define DXD_INDEX 0x80
193#define DXD_INLINE 0x40
194#define DXD_EXTENT 0x20
196#define DXD_CORRUPT 0x08
201#define DXDlength PXDlength
202#define DXDaddress PXDaddress
203#define lengthDXD lengthPXD
204#define addressDXD addressPXD
229#define DASDLIMIT(dasdp) \
230 (((u64)((dasdp)->limit_hi) << 32) + __le32_to_cpu((dasdp)->limit_lo))
231#define setDASDLIMIT(dasdp, limit)\
233 (dasdp)->limit_hi = ((u64)limit) >> 32;\
234 (dasdp)->limit_lo = __cpu_to_le32(limit);\
236#define DASDUSED(dasdp) \
237 (((u64)((dasdp)->used_hi) << 32) + __le32_to_cpu((dasdp)->used_lo))
238#define setDASDUSED(dasdp, used)\
240 (dasdp)->used_hi = ((u64)used) >> 32;\
241 (dasdp)->used_lo = __cpu_to_le32(used);\
275#define CDLL_HEADER(type)\
293#define CDLL_ENTRY(type)\
309#define CDLL_INIT(header) {\
310 (header)->head = (void *)(header);\
311 (header)->tail = (void *)(header);\
336#define CDLL_INSERT_HEAD(header, elm, field) {\
337 (elm)->field.next = (header)->head;\
338 (elm)->field.prev = (void *)(header);\
339 if ((header)->tail == (void *)(header))\
340 (header)->tail = (elm);\
342 (header)->head->field.prev = (elm);\
343 (header)->head = (elm);\
353#define CDLL_INSERT_TAIL(header, elm, field) {\
354 (elm)->field.next = (void *)(header);\
355 (elm)->field.prev = (header)->tail;\
356 if ((header)->head == (void *)(header))\
357 (header)->head = (elm);\
359 (header)->tail->field.next = (elm);\
360 (header)->tail = (elm);\
371#define CDLL_INSERT_AFTER(header, listelm, elm, field) {\
372 (elm)->field.next = (listelm)->field.next;\
373 (elm)->field.prev = (listelm);\
374 if ((listelm)->field.next == (void *)(header))\
375 (header)->tail = (elm);\
377 (listelm)->field.next->field.prev = (elm);\
378 (listelm)->field.next = (elm);\
389#define CDLL_INSERT_BEFORE(header, listelm, elm, field) {\
390 (elm)->field.next = (listelm);\
391 (elm)->field.prev = (listelm)->field.prev;\
392 if ((listelm)->field.prev == (void *)(header))\
393 (header)->head = (elm);\
395 (listelm)->field.prev->field.next = (elm);\
396 (listelm)->field.prev = (elm);\
406#define CDLL_REMOVE(header, elm, field) {\
407 if ((elm)->field.next == (void *)(header))\
408 (header)->tail = (elm)->field.prev;\
410 (elm)->field.next->field.prev = (elm)->field.prev;\
411 if ((elm)->field.prev == (void *)(header))\
412 (header)->head = (elm)->field.next;\
414 (elm)->field.prev->field.next = (elm)->field.next;\
417#define CDLL_MOVE_TO_HEAD(header, elm, field) {\
418 if ((elm)->field.prev != (void *)(header))\
420 if ((elm)->field.next == (void *)(header))\
421 (header)->tail = (elm)->field.prev;\
423 (elm)->field.next->field.prev = (elm)->field.prev;\
424 (elm)->field.prev->field.next = (elm)->field.next;\
425 (elm)->field.next = (header)->head;\
426 (elm)->field.prev = (void *)(header);\
427 (header)->head->field.prev = (elm);\
428 (header)->head = (elm);\
432#define CDLL_MOVE_TO_TAIL(header, elm, field) {\
433 if ((elm)->field.next != (void *)(header))\
435 (elm)->field.next->field.prev = (elm)->field.prev;\
436 if ((elm)->field.prev == (void *)(header))\
437 (header)->head = (elm)->field.next;\
439 (elm)->field.prev->field.next = (elm)->field.next;\
440 (elm)->field.next = (void *)(header);\
441 (elm)->field.prev = (header)->tail;\
442 (header)->tail->field.next = (elm);\
443 (header)->tail = (elm);\
450#define CDLL_SELF(elm, field)\
451 (elm)->field.next = (elm)->field.prev = (elm);
474#define LIST_HEADER(type)\
479#define LIST_ENTRY(type)\
485#define LIST_INIT(header) { (header)->head = NULL; }
502#define LIST_INSERT_HEAD(header, elm, field) {\
503 if (((elm)->field.next = (header)->head) != NULL)\
504 (header)->head->field.prev = &(elm)->field.next;\
505 (header)->head = (elm);\
506 (elm)->field.prev = &(header)->head;\
509#define LIST_INSERT_AFTER(listelm, elm, field) {\
510 if (((elm)->field.next = (listelm)->field.next) != NULL)\
511 (listelm)->field.next->field.prev = &(elm)->field.next;\
512 (listelm)->field.next = (elm);\
513 (elm)->field.prev = &(listelm)->field.next;\
516#define LIST_REMOVE(elm, field) {\
517 if ((elm)->field.next != NULL)\
518 (elm)->field.next->field.prev = (elm)->field.prev;\
519 *(elm)->field.prev = (elm)->field.next;\
522#define LIST_SELF(elm, field) {\
523 (elm)->field.next = NULL;\
524 (elm)->field.prev = &(elm)->field.next;\
void * PVOID
Definition: jfs_types.h:89
unsigned char UCHAR
Definition: jfs_types.h:88
unsigned short USHORT
Definition: jfs_types.h:87
unsigned short UniChar
Definition: jfs_types.h:48
struct component_name component_t
int boolean_t
Definition: jfs_types.h:115
unsigned long ULONG
Definition: jfs_types.h:86
Definition: jfs_types.h:299
struct cdll_entry * prev
Definition: jfs_types.h:301
struct cdll_entry * next
Definition: jfs_types.h:300
Definition: jfs_types.h:209
int namlen
Definition: jfs_types.h:210
UniChar * name
Definition: jfs_types.h:211
Definition: jfs_types.h:218
u32 limit_lo
Definition: jfs_types.h:223
u8 delta
Definition: jfs_types.h:220
u8 thresh
Definition: jfs_types.h:219
u8 used_hi
Definition: jfs_types.h:225
u8 rsrvd2[3]
Definition: jfs_types.h:224
u32 used_lo
Definition: jfs_types.h:226
u8 rsrvd1
Definition: jfs_types.h:221
u8 limit_hi
Definition: jfs_types.h:222
Definition: jfs_types.h:182
unsigned rsrvd
Definition: jfs_types.h:184
u32 size
Definition: jfs_types.h:185
u32 addr2
Definition: jfs_types.h:188
unsigned flag
Definition: jfs_types.h:183
unsigned addr1
Definition: jfs_types.h:187
unsigned len
Definition: jfs_types.h:186
Definition: jfs_types.h:122
unsigned len
Definition: jfs_types.h:123
u32 off2
Definition: jfs_types.h:125
unsigned off1
Definition: jfs_types.h:124
Definition: jfs_types.h:142
s16 nlxd
Definition: jfs_types.h:144
s16 maxnlxd
Definition: jfs_types.h:143
lxd_t * lxd
Definition: jfs_types.h:145
Definition: jfs_types.h:151
unsigned addr1
Definition: jfs_types.h:153
u32 addr2
Definition: jfs_types.h:154
unsigned len
Definition: jfs_types.h:152
Definition: jfs_types.h:172
s16 npxd
Definition: jfs_types.h:174
s16 maxnpxd
Definition: jfs_types.h:173
Definition: jfs_types.h:96
u32 tv_nsec
Definition: jfs_types.h:98
u32 tv_sec
Definition: jfs_types.h:97