Modules/LVM - Seriously working on it after the network API change
[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         tLVM_ReadFcn    Read;
32         tLVM_WriteFcn   Write;
33
34         Uint64  BlockCount;
35         size_t  BlockSize;
36         
37          int    nSubVolumes;
38         tLVM_SubVolume  **SubVolumes;
39
40         char    Name[];
41 };
42
43 struct sLVM_SubVolume
44 {
45         tLVM_Vol        *Vol;
46         
47         tVFS_Node       Node;
48
49         // Note: Only for a simple volume
50         Uint64  FirstBlock;
51         Uint64  BlockCount;
52
53         char    Name[];
54 };
55
56 extern tVFS_NodeType    gLVM_SubVolNodeType;
57 extern tVFS_NodeType    gLVM_VolNodeType;
58
59 extern tLVM_Vol *gpLVM_FirstVolume;
60 extern tLVM_Vol *gpLVM_LastVolume;
61
62 #endif
63

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