Merge branch 'master' of git://cadel.mutabah.net/acess2
[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 #include <iocache.h>
15
16 typedef struct sLVM_SubVolume   tLVM_SubVolume;
17
18 enum eLVM_BackType
19 {
20         LVM_BACKING_VFS,
21         LVM_BACKING_PTRS
22 };
23
24 struct sLVM_Vol
25 {
26         tLVM_Vol        *Next;
27         
28         tVFS_Node       DirNode;
29         tVFS_Node       VolNode;
30
31         void    *Ptr;
32         const tLVM_VolType      *Type;
33
34         size_t  BlockSize;
35         Uint64  BlockCount;
36         
37          int    nSubVolumes;
38         tLVM_SubVolume  **SubVolumes;
39
40         tIOCache        *CacheHandle;
41
42         char    Name[];
43 };
44
45 struct sLVM_SubVolume
46 {
47         tLVM_Vol        *Vol;
48         
49         tVFS_Node       Node;
50
51         // Note: Only for a simple volume
52         Uint64  FirstBlock;
53         Uint64  BlockCount;
54
55         char    Name[];
56 };
57
58 extern tVFS_NodeType    gLVM_SubVolNodeType;
59 extern tVFS_NodeType    gLVM_VolNodeType;
60
61 extern tLVM_Vol *gpLVM_FirstVolume;
62 extern tLVM_Vol *gpLVM_LastVolume;
63
64 #endif
65

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