#ifndef _VDI_H_
#define _VDI_H_
/**************************************************************************
*
* vdi.h
*
* Virtual Disk Image (VDI) Interfaces
*
*/
#ifndef __VDI_H__
#define __VDI_H__
#include "blktaplib.h"
#include "snaplog.h"
#define VDI_HEIGHT 27 /* Note that these are now hard-coded */
#define VDI_REG_HEIGHT 27 /* in the async lookup code */
#define VDI_NAME_SZ 256
typedef struct vdi {
u64 id; /* unique vdi id -- used by the registry */
u64 block; /* block where this vdi lives (also unique)*/
u64 radix_root; /* radix root node for block mappings */
snap_id_t snap; /* next snapshot slot for this VDI */
struct vdi *next; /* used to hash-chain in blkif. */
blkif_vdev_t vdevice; /* currently mounted as... */
struct radix_lock *radix_lock;/* per-line L1 RW lock for parallel reqs */
char name[VDI_NAME_SZ];/* human readable vdi name */
} vdi_t;
#define VDI_REG_MAGIC 0xff00ff0bb0ff00ffLL
typedef struct vdi_registry {
u64 magic;
u64 nr_vdis;
} vdi_registry_t;
int __init_vdi(void);
vdi_t *vdi_get(u64 vdi_id);
void vdi_put(vdi_t *vdi);
vdi_registry_t *get_vdi_registry(void);
vdi_t *vdi_create(snap_id_t *parent_snap, char *name);
u64 vdi_lookup_block(vdi_t *vdi, u64 vdi_block, int *writable);
void vdi_update_block(vdi_t *vdi, u64 vdi_block, u64 g_block);
void vdi_snapshot(vdi_t *vdi);
#endif /* __VDI_H__ */
#endif //_VDI_H_
tive' href='/cgit.cgi/cloud-email/mitmproxy/tree/doc-src/_websitelayout.html?id=dd55a3e0b60e4cfe5e194a57076340628e5cee9c'>treecommitdiffstats
blob: 437c10973a713abc097b2045e3183a2b94aec5d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
<a href="http://github.com/cortesi/mitmproxy"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://d3nwyuy0nl342s.cloudfront.net/img/e6bef7a091f5f3138b8cd40bc3e114258dd68ddf/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub"></a>
<div class="yui-t7" id="doc">
<div style="" id="hd">
<div class="HorizontalNavBar">
<ul>
<li class="inactive"><a href="@!urlTo("/index.html")!@">home</a></li>
<li class="active"><a href="@!urlTo("doc/index.html")!@">docs</a></li>
<li class="inactive"><a href="@!urlTo("/about.html")!@">about</a></li>
</ul>
</div>
<h1><a href="@!urlTo("/index.html")!@">mitmproxy</a> </h1>
<br>
<p>an SSL-capable man-in-the-middle proxy</p>
</div>
<div id="bd">
<div id="yui-main">
<div style="" class="yui-b">
<!--(block nav)-->
<div id="nav">
<!--(block pb)-->
<a href="@!urlTo(previous)!@">prev</a>
<!--(end)-->
<!--(block nb)-->
<a href="@!urlTo(next)!@">next</a>
<!--(end)-->
$!pb if previous and not previous.parent.root else "prev"!$ |
<a href="@!urlTo('doc/index.html')!@">index</a> |
$!nb if next and not next.parent.root else "next"!$
</div>
<!--(end)-->
$!nav if this.title!="docs" else ""!$
$!title if this.title!="docs" else "<h1>mitmproxy 0.9 docs</h1>"!$
$!body!$
</div>
</div>
</div>
<div style="" id="ft">
<p>Copyright 2011 Aldo Cortesi</p>
</div>
</div>
$!ga!$
|