Modules/{ATA,LVM} - Moved ATA to use the LVM partition code
[tpg/acess2.git] / KernelLand / Modules / Storage / LVM / lvm_int.h
1 /*
2  * Acess2 Logical Volume Manager
3  * - By John Hodge (thePowersGang)
4  *
5  * lvm_int.h
6  * - Internal definitions
7  */
8 #ifndef _LVM_LVM_INT_H_
9 #define _LVM_LVM_INT_H_
10
11 #include "include/lvm.h"
12 #include "lvm.h"
13 #include <vfs.h>
14
15 typedef struct sLVM_SubVolume   tLVM_SubVolume;
16
17 enum eLVM_BackType
18 {
19         LVM_BACKING_VFS,
20         LVM_BACKING_PTRS
21 };
22
23 struct sLVM_Vol
24 {
25         tLVM_Vol        *Next;
26         
27         tVFS_Node       DirNode;
28         tVFS_Node       VolNode;
29
30         void    *Ptr;
31         const tLVM_VolType      *Type;
32
33         Uint64  BlockCount;
34         
35          int    nSubVolumes;
36         tLVM_SubVolume  **SubVolumes;
37
38         char    Name[];
39 };
40
41 struct sLVM_SubVolume
42 {
43         tLVM_Vol        *Vol;
44         
45         tVFS_Node       Node;
46
47         // Note: Only for a simple volume
48         Uint64  FirstBlock;
49         Uint64  BlockCount;
50
51         char    Name[];
52 };
53
54 extern tVFS_NodeType    gLVM_SubVolNodeType;
55 extern tVFS_NodeType    gLVM_VolNodeType;
56
57 extern tLVM_Vol *gpLVM_FirstVolume;
58 extern tLVM_Vol *gpLVM_LastVolume;
59
60 #endif
61

UCC git Repository :: git.ucc.asn.au