Commit Graph
14 Commits
Author SHA1 Message Date
Keir Fraser 6d821524b1 fs-back: better error handling in fs-backend
Currently most of the error checking in fs-backend is done by the use
of asserts that would terminate the daemon in case of a single error
on a single request.  This patch replaces the asserts with debugging
messages and terminates the connection on which the error occurred.
With this patch applied I was able to complete successfully over 1000
live migrations with stubdoms.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-07-08 10:58:09 +01:00
Keir Fraser b3dac9ec91 fs-backend: fix default export and filename checks
This patch changes fs-backend to use /var/lib/xen as default export
and check all the file names and paths given by the frontend against the
export path, so that the frontend can only operate under the export
directory.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-06-27 10:47:38 +01:00
Keir Fraser 6f1d3ce238 Introduce mechanism to check standard conformance of headers
While pretty simplistic, it appears to serve the purpose at the moment
(i.e. it spotted two places where a GNU extension was used withou
proper preprocessor conditionals). The "simplistic" here includes that
the checking gets only done for native builds, and ia64 gets excluded
due to its arch-specific header intentionally (for whatever reason)
checking that anonymous struct/unions can be used.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-06-17 07:21:03 +01:00
Keir Fraser b832b2b46c fs-back: build fixes
Remove some unused variables and replaces read and write
to the pipe with read_exact and write_exact (these two functions are
implemented in libxc, that we have to link anyway).

This allows fs-backed to be compiled with -D_FORTIFY_SOURCE=2, hence
should fix the problems reported by Boris.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-03-18 13:25:25 +00:00
Keir Fraser a26e304487 fs-back: Fixes and cleanups
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-03-17 14:28:33 +00:00
Keir Fraser 61c632064b fs-back: build fix for BSD
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-08-05 09:59:01 +01:00
Keir Fraser e5ba23a1d9 FSIF: extend protocol to multi-grant requests and multi-page ring
To improve throughput and inline the stat response.

Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-01 09:37:10 +01:00
Keir Fraser bfd0dbdd08 fs-back: build fixes for BSD and cleanups.
Signed-of-by: Christoph Egger <Christoph.Egger@amd.com>
2008-07-28 11:39:32 +01:00
Keir Fraser 2406df9ada fs-backend: fix FD allocation for file creation
The creation operation also opens a file, we need to allocate a
virtual fd for that too.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-25 09:49:06 +01:00
Keir Fraser 76db343592 fs-back: fix compilation error.
XC_PAGE_SIZE and XC_PAGE_MASK should be used instead of PAGE_SIZE
and PAGE_MASK.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-07-22 08:00:43 +01:00
Keir Fraser c278e4f7bf fs-backend: do not expose file descriptors to frontend
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-16 11:13:21 +01:00
Keir Fraser bdfd5fc7d1 fs-backend: fix ioctl(BLKGETSIZE) call on 64bit
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-15 18:00:13 +01:00
Keir Fraser 461990971f tools: replace sprintf with snprintf where applicable
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-06-12 15:41:15 +01:00
Keir Fraser be33e2333a Add FS backend/frontend drivers (frontend in minios only).
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
2008-01-18 13:33:37 +00:00