Modules/LVM - Fiddling
[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       Node;
28
29         void    *Ptr;
30         tLVM_ReadFcn    Read;
31         tLVM_WriteFcn   Write;
32
33         size_t  BlockSize;
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
56 #endif
57

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