debuggers.hg

view xen/include/xeno/segment.h @ 637:f33864f401d8

bitkeeper revision 1.331.1.1 (3f0d5ce2ty7t1xKoi_XfrqGCd6L9mg)

Clean up segments when the domain dies.
author sos22@labyrinth.cl.cam.ac.uk
date Thu Jul 10 12:32:34 2003 +0000 (2003-07-10)
parents 3e071d151e22
children 75e23848b238
line source
1 #ifndef __SEGMENT_H__
2 #define __SEGMENT_H__
4 #include <hypervisor-ifs/block.h>
5 #include <hypervisor-ifs/segment.h>
7 /* Describes a physical disk extent. */
8 typedef struct {
9 unsigned short dev;
10 unsigned short nr_sects;
11 unsigned long sector_number;
12 unsigned long buffer;
13 } phys_seg_t;
15 struct task_struct;
17 void xen_segment_initialize(void);
18 void xen_refresh_segment_list (struct task_struct *p);
19 int xen_segment_create(xv_disk_t *xvd);
20 int xen_segment_delete(struct task_struct *p, int segnr);
21 int xen_segment_map_request(
22 phys_seg_t *pseg, struct task_struct *p, int operation,
23 unsigned short segment_number,
24 unsigned long sect_nr, unsigned long buffer, unsigned short nr_sects);
26 /*
27 * virtual hard disks
28 *
29 * each segment is composed of a number of extents
30 */
32 typedef struct extent
33 {
34 int disk; /* A XEN_IDE_DEV or a XEN_SCSI_DEV */
35 unsigned long offset; /* offset into disk */
36 unsigned long size; /* size of this extent */
37 } extent_t;
39 typedef struct segment
40 {
41 int mode; /* UNUSED, RO, or RW */
42 int domain;
43 int segment_number; /* segment number for domain */
44 char key[XEN_SEGMENT_KEYSIZE]; /* for the userspace tools in dom0 */
45 int num_extents; /* number of extents */
46 extent_t *extents;
47 } segment_t;
49 #endif