X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fntfs%2Ftypes.h;h=6e4a7e3343f22d268c80dccbf2a2ee9d3857f852;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=a33fc637ffa5e7da184cbf37db00774bb894957d;hpb=9213980e6a70d8473e0ffd4b39ab5b6caaba9ff5;p=linux-2.6.git diff --git a/fs/ntfs/types.h b/fs/ntfs/types.h index a33fc637f..6e4a7e334 100644 --- a/fs/ntfs/types.h +++ b/fs/ntfs/types.h @@ -2,7 +2,7 @@ * types.h - Defines for NTFS Linux kernel driver specific types. * Part of the Linux-NTFS project. * - * Copyright (c) 2001-2004 Anton Altaparmakov + * Copyright (c) 2001-2005 Anton Altaparmakov * * This program/include file is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as published @@ -23,8 +23,17 @@ #ifndef _LINUX_NTFS_TYPES_H #define _LINUX_NTFS_TYPES_H +#include + +typedef __le16 le16; +typedef __le32 le32; +typedef __le64 le64; +typedef __u16 __bitwise sle16; +typedef __u32 __bitwise sle32; +typedef __u64 __bitwise sle64; + /* 2-byte Unicode character type. */ -typedef u16 ntfschar; +typedef le16 ntfschar; #define UCHAR_T_SIZE_BITS 1 /* @@ -32,7 +41,9 @@ typedef u16 ntfschar; * and VCN, to allow for type checking and better code readability. */ typedef s64 VCN; +typedef sle64 leVCN; typedef s64 LCN; +typedef sle64 leLCN; /* * The NTFS journal $LogFile uses log sequence numbers which are signed 64-bit @@ -40,34 +51,15 @@ typedef s64 LCN; * code readability. */ typedef s64 LSN; +typedef sle64 leLSN; -/** - * run_list_element - in memory vcn to lcn mapping array element - * @vcn: starting vcn of the current array element - * @lcn: starting lcn of the current array element - * @length: length in clusters of the current array element - * - * The last vcn (in fact the last vcn + 1) is reached when length == 0. - * - * When lcn == -1 this means that the count vcns starting at vcn are not - * physically allocated (i.e. this is a hole / data is sparse). - */ -typedef struct { /* In memory vcn to lcn mapping structure element. */ - VCN vcn; /* vcn = Starting virtual cluster number. */ - LCN lcn; /* lcn = Starting logical cluster number. */ - s64 length; /* Run length in clusters. */ -} run_list_element; - -/** - * run_list - in memory vcn to lcn mapping array including a read/write lock - * @rl: pointer to an array of run list elements - * @lock: read/write spinlock for serializing access to @rl - * +/* + * The NTFS transaction log $UsnJrnl uses usn which are signed 64-bit values. + * We define our own type USN, to allow for type checking and better code + * readability. */ -typedef struct { - run_list_element *rl; - struct rw_semaphore lock; -} run_list; +typedef s64 USN; +typedef sle64 leUSN; typedef enum { FALSE = 0,