Statistics
| Branch: | Revision:

root / drivers / tapdisk-disktype.h @ abdb293f

History | View | Annotate | Download (2.7 kB)

1 abdb293f Chrysostomos Nanakos
/*
2 abdb293f Chrysostomos Nanakos
 * Copyright (c) 2007, 2010, XenSource Inc.
3 abdb293f Chrysostomos Nanakos
 * All rights reserved.
4 abdb293f Chrysostomos Nanakos
 *
5 abdb293f Chrysostomos Nanakos
 * Redistribution and use in source and binary forms, with or without
6 abdb293f Chrysostomos Nanakos
 * modification, are permitted provided that the following conditions are met:
7 abdb293f Chrysostomos Nanakos
 *     * Redistributions of source code must retain the above copyright
8 abdb293f Chrysostomos Nanakos
 *       notice, this list of conditions and the following disclaimer.
9 abdb293f Chrysostomos Nanakos
 *     * Redistributions in binary form must reproduce the above copyright
10 abdb293f Chrysostomos Nanakos
 *       notice, this list of conditions and the following disclaimer in the
11 abdb293f Chrysostomos Nanakos
 *       documentation and/or other materials provided with the distribution.
12 abdb293f Chrysostomos Nanakos
 *     * Neither the name of XenSource Inc. nor the names of its contributors
13 abdb293f Chrysostomos Nanakos
 *       may be used to endorse or promote products derived from this software
14 abdb293f Chrysostomos Nanakos
 *       without specific prior written permission.
15 abdb293f Chrysostomos Nanakos
 *
16 abdb293f Chrysostomos Nanakos
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 abdb293f Chrysostomos Nanakos
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 abdb293f Chrysostomos Nanakos
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 abdb293f Chrysostomos Nanakos
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
20 abdb293f Chrysostomos Nanakos
 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21 abdb293f Chrysostomos Nanakos
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22 abdb293f Chrysostomos Nanakos
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23 abdb293f Chrysostomos Nanakos
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24 abdb293f Chrysostomos Nanakos
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25 abdb293f Chrysostomos Nanakos
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26 abdb293f Chrysostomos Nanakos
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 abdb293f Chrysostomos Nanakos
 */
28 abdb293f Chrysostomos Nanakos
29 abdb293f Chrysostomos Nanakos
#ifndef __DISKTYPES_H__
30 abdb293f Chrysostomos Nanakos
#define __DISKTYPES_H__
31 abdb293f Chrysostomos Nanakos
32 abdb293f Chrysostomos Nanakos
#define DISK_TYPE_AIO         0
33 abdb293f Chrysostomos Nanakos
#define DISK_TYPE_SYNC        1
34 abdb293f Chrysostomos Nanakos
#define DISK_TYPE_VMDK        2
35 abdb293f Chrysostomos Nanakos
#define DISK_TYPE_VHDSYNC     3
36 abdb293f Chrysostomos Nanakos
#define DISK_TYPE_VHD         4
37 abdb293f Chrysostomos Nanakos
#define DISK_TYPE_RAM         5
38 abdb293f Chrysostomos Nanakos
#define DISK_TYPE_QCOW        6
39 abdb293f Chrysostomos Nanakos
#define DISK_TYPE_BLOCK_CACHE 7
40 abdb293f Chrysostomos Nanakos
#define DISK_TYPE_VINDEX      8
41 abdb293f Chrysostomos Nanakos
#define DISK_TYPE_LOG         9
42 abdb293f Chrysostomos Nanakos
#define DISK_TYPE_REMUS       10
43 abdb293f Chrysostomos Nanakos
#define DISK_TYPE_LCACHE      11
44 abdb293f Chrysostomos Nanakos
#define DISK_TYPE_LLECACHE    12
45 abdb293f Chrysostomos Nanakos
#define DISK_TYPE_LLPCACHE    13
46 abdb293f Chrysostomos Nanakos
#define DISK_TYPE_VALVE       14
47 abdb293f Chrysostomos Nanakos
48 abdb293f Chrysostomos Nanakos
#define DISK_TYPE_NAME_MAX    32
49 abdb293f Chrysostomos Nanakos
50 abdb293f Chrysostomos Nanakos
typedef struct disk_info {
51 abdb293f Chrysostomos Nanakos
        const char     *name; /* driver name, e.g. 'aio' */
52 abdb293f Chrysostomos Nanakos
        char           *desc;  /* e.g. "raw image" */
53 abdb293f Chrysostomos Nanakos
        unsigned int    flags; 
54 abdb293f Chrysostomos Nanakos
} disk_info_t;
55 abdb293f Chrysostomos Nanakos
56 abdb293f Chrysostomos Nanakos
extern const disk_info_t     *tapdisk_disk_types[];
57 abdb293f Chrysostomos Nanakos
extern const struct tap_disk *tapdisk_disk_drivers[];
58 abdb293f Chrysostomos Nanakos
59 abdb293f Chrysostomos Nanakos
/* one single controller for all instances of disk type */
60 abdb293f Chrysostomos Nanakos
#define DISK_TYPE_SINGLE_CONTROLLER (1<<0)
61 abdb293f Chrysostomos Nanakos
62 abdb293f Chrysostomos Nanakos
/* filter driver without physical image data */
63 abdb293f Chrysostomos Nanakos
#define DISK_TYPE_FILTER            (1<<1)
64 abdb293f Chrysostomos Nanakos
65 abdb293f Chrysostomos Nanakos
int tapdisk_disktype_find(const char *name);
66 abdb293f Chrysostomos Nanakos
int tapdisk_disktype_parse_params(const char *params, const char **_path);
67 abdb293f Chrysostomos Nanakos
68 abdb293f Chrysostomos Nanakos
#endif