check_sharing functions have been rejigged slightly so that the file-specific
stuff can share the code therein. This separates the actual test from the
generation of the error message, and introduces the canonicalise_mode function.
This also restores the broken teardown functionality for file: devices -- the
writing of XENBUS_PATH/node had been removed, but this is required for file
device teardown.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
current Console.py API, because no bytes have come from it, but that's not a
failure -- an unpaused domain has no reason to output any more data. We need
to send a command to the domain before we can be sure whether it is alive or
dead, so move the FAIL call, allowing the console connection to throw
ConsoleError.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
(should be testing against -1, not merely using if or if not), one block-list
command was missing, and the block-detach command is asynchronous (to give the
domain time to close down the device) so we need a time.sleep(1) call before
trying xm block-list.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
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>
interface from the bridge when going offline -- the comment stating that
interfaces are auto-removed does not seem to be true, at least some of the
time. Log failure of brctl delif and ifconfig down only at debug level, as
this script may be called more than once, depending upon the hotplug
configuration.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
hotplug config, the offline event may come through to this script twice, and
the iptables -D will fail the second time.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
(live) restore. This should now enable live migrate of fork-intensive (or
other page-table-intensive) workloads.
Signed-off-by: Steven Hand <steven@xensource.com>
Warhog", due to misparsing the udevinfo version string. The problem is
caused by an old version of sed that does not appreciate the
regexp. This patch fixes it, and also works on debian unstable and
SLES9SP2. Please apply...
Signed-Off-By: Muli Ben-Yehuda <mulix@mulix.org>
Signed-Off-By: Orna Agmon <ladypine@ladypine.org>
Xserver will scan pci and the cirrus VGA driver will register
mmio each time, cause mmio array out of space.
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
statement. When we need locks, we can place them now around the switch
statement.
I also included the comments from Rusty and now return -EPERM for denied
permission errors.
Signed-off: Reiner Sailer <sailer@us.ibm.com>
splicing the strings together manually.
Replace the word "bogus" with the command in question where it appears, as this
shows up in the Usage statements.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
down the frontend until that number becomes 0. There are no reasonable
semantics for hot-unplugging a block device beneath a mounted filesystem, and
this solution ensures that the guest is not crashed nor the filesystem corruptedby the actions of the administrator.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
The option reduces overall system performance and makes little sense
when running over a preemptive hypervisor. Removing the option also
fixes some hypothetical races.
The forthcoming voluntary-preemption option will make much more sense
to enable when running over Xen.
Signed-off-by: Keir Fraser <keir@xensource.com>
PMD (Xen will not allow it). This is okay even across
suspend/resume -- such PGDs are completely empty and so
contain no PTEs that become garbage across suspend/resume.
Signed-off-by: Keir Fraser <keir@xensource.com>
again. Closes bug #397.
To perform this check in the same transaction as the writing of the device
entries has required a little bit of rejigging.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
status internally, with the shadow_lock held for consistency.
Callers no need to check log-dirty status themselves.
Also, add dirty logging to alloc_page_type/free_page_type, so
that we see page tables coming and going during live relocation.
Signed-off-by: Keir Fraser <keir@xensource.com>
structure. This also happens to ensure correct t_rec
alignment on ia64. A better layout for trace buffers
will be coming soon.
Signed-off-by: Keir Fraser <keir@xensource.com>
useful when the interrupt line is not connected in hardware or the
mechanism to enable it is not readily available in the hypervisor.
Polling is only enabled when the UART IRQ is set to zero.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Keir Fraser <keir@xensource.com>