diff options
| author | emellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com> | 2005-11-25 20:58:07 +0000 |
|---|---|---|
| committer | emellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com> | 2005-11-25 20:58:07 +0000 |
| commit | d9660850838ce2834afffa75475844db16032003 (patch) | |
| tree | 52e995c8b2fd45278702cd249c70062a669dff36 /tools/ioemu/hw/mc146818rtc.c | |
| parent | 7522af5c6ae4aa4db6ab95ac7fc7029ded4f7bae (diff) | |
| download | xen-d9660850838ce2834afffa75475844db16032003.tar.gz xen-d9660850838ce2834afffa75475844db16032003.tar.bz2 xen-d9660850838ce2834afffa75475844db16032003.zip | |
Check when using physical devices that the device is not already in use. Using
a device from two guests, or from dom 0 and a guest, can destroy the filesystem,
and this check prevents that. This should ensure that the xm tests
11_block_attach_shared_dom0 and 12_block_attach_shared_domU should pass.
Closes bug #331.
Devices may be shared only if all uses are read-only. If anyone has read-write
access to a device, then no sharing is allowed.
The mode in the config file may now have an exclamation mark appended, to
indicate that devices may be shared (i.e. that this new check should be
bypassed). This supports some network block devices, but is clearly dangerous
and should only be used when you know what you are doing.
The mode specified in the config file is now written explicitly to the store,
To implement this, the blkback driver has been changed to create two entries
in /sys describing each device in use. This means that we can determine which
devices are in use without crawling through the store.
The physical-device node has been changed to give the major and minor of the
device, separated by a colon. This means that we do not need to pack these
numbers into one, removing the restriction to 8 bit minors that we had in place
before.
The mode specified in the config file is now written explicitly to the store,
rather than using the presence or absence of a read-only node. This supports
the write-sharing override above.
If the device is in use, a new hotplug status of "busy" is written to the
store, and a message is written to a new hotplug-error node. Xend uses these
things for diagnosis.
The block scripts do not need to handle online or offline events, so this
support has been removed. These scripts can be called twice, depending upon
the hotplug config, so they now identify the second run and do not attempt to
set up the device again.
The device directories in the store are cleaned out before new details are
written there. This prevents stale information from messing up block device
hotplugging. This will be one cause of "blkback: changing physical device
not supported" messages.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
Diffstat (limited to 'tools/ioemu/hw/mc146818rtc.c')
0 files changed, 0 insertions, 0 deletions
