From 4cffe108ba5f266df883d0395151c1d7a5f4c5a1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Adam=20Go=C5=82=C4=99biowski?= Date: Thu, 27 Dec 2007 10:50:41 +0000 Subject: [PATCH] - outdated Changed files: xen-bash_scripts.patch -> 1.2 xen-blktap-no-aio-epoll.patch -> 1.2 xen-reisermodule.patch -> 1.2 --- xen-bash_scripts.patch | 99 ---------------- xen-blktap-no-aio-epoll.patch | 205 ---------------------------------- xen-reisermodule.patch | 61 ---------- 3 files changed, 365 deletions(-) delete mode 100644 xen-bash_scripts.patch delete mode 100644 xen-blktap-no-aio-epoll.patch delete mode 100644 xen-reisermodule.patch diff --git a/xen-bash_scripts.patch b/xen-bash_scripts.patch deleted file mode 100644 index 8d12385..0000000 --- a/xen-bash_scripts.patch +++ /dev/null @@ -1,99 +0,0 @@ -diff -dur -x '*~' xen-3.0.2.orig/tools/examples/block xen-3.0.2/tools/examples/block ---- xen-3.0.2.orig/tools/examples/block 2006-04-10 00:05:53.000000000 +0200 -+++ xen-3.0.2/tools/examples/block 2006-04-30 20:18:41.000000000 +0200 -@@ -1,4 +1,4 @@ --#!/bin/sh -+#!/bin/bash - - dir=$(dirname "$0") - . "$dir/block-common.sh" -diff -dur -x '*~' xen-3.0.2.orig/tools/examples/block-enbd xen-3.0.2/tools/examples/block-enbd ---- xen-3.0.2.orig/tools/examples/block-enbd 2006-04-10 00:05:53.000000000 +0200 -+++ xen-3.0.2/tools/examples/block-enbd 2006-04-30 20:18:41.000000000 +0200 -@@ -1,4 +1,4 @@ --#!/bin/sh -+#!/bin/bash - - # Usage: block-enbd [bind server ctl_port |unbind node] - # -diff -dur -x '*~' xen-3.0.2.orig/tools/examples/block-nbd xen-3.0.2/tools/examples/block-nbd ---- xen-3.0.2.orig/tools/examples/block-nbd 2006-04-10 00:05:53.000000000 +0200 -+++ xen-3.0.2/tools/examples/block-nbd 2006-04-30 20:18:41.000000000 +0200 -@@ -1,4 +1,4 @@ --#!/bin/sh -+#!/bin/bash - - # Usage: block-nbd [bind server ctl_port |unbind node] - # -diff -dur -x '*~' xen-3.0.2.orig/tools/examples/network-bridge xen-3.0.2/tools/examples/network-bridge ---- xen-3.0.2.orig/tools/examples/network-bridge 2006-04-10 00:05:53.000000000 +0200 -+++ xen-3.0.2/tools/examples/network-bridge 2006-04-30 20:18:41.000000000 +0200 -@@ -1,4 +1,4 @@ --#!/bin/sh -+#!/bin/bash - #============================================================================ - # Default Xen network start/stop script. - # Xend calls a network script when it starts. -diff -dur -x '*~' xen-3.0.2.orig/tools/examples/network-nat xen-3.0.2/tools/examples/network-nat ---- xen-3.0.2.orig/tools/examples/network-nat 2006-04-10 00:05:53.000000000 +0200 -+++ xen-3.0.2/tools/examples/network-nat 2006-04-30 20:18:41.000000000 +0200 -@@ -1,4 +1,4 @@ --#!/bin/sh -+#!/bin/bash - #============================================================================ - # Default Xen network start/stop script when using NAT. - # Xend calls a network script when it starts. -diff -dur -x '*~' xen-3.0.2.orig/tools/examples/network-route xen-3.0.2/tools/examples/network-route ---- xen-3.0.2.orig/tools/examples/network-route 2006-04-10 00:05:53.000000000 +0200 -+++ xen-3.0.2/tools/examples/network-route 2006-04-30 20:18:41.000000000 +0200 -@@ -1,4 +1,4 @@ --#!/bin/sh -+#!/bin/bash - #============================================================================ - # Default Xen network start/stop script. - # Xend calls a network script when it starts. -diff -dur -x '*~' xen-3.0.2.orig/tools/examples/vif-bridge xen-3.0.2/tools/examples/vif-bridge ---- xen-3.0.2.orig/tools/examples/vif-bridge 2006-04-10 00:05:53.000000000 +0200 -+++ xen-3.0.2/tools/examples/vif-bridge 2006-04-30 20:18:41.000000000 +0200 -@@ -1,4 +1,4 @@ --#!/bin/sh -+#!/bin/bash - #============================================================================ - # /etc/xen/vif-bridge - # -diff -dur -x '*~' xen-3.0.2.orig/tools/examples/vif-nat xen-3.0.2/tools/examples/vif-nat ---- xen-3.0.2.orig/tools/examples/vif-nat 2006-04-10 00:05:53.000000000 +0200 -+++ xen-3.0.2/tools/examples/vif-nat 2006-04-30 20:18:41.000000000 +0200 -@@ -1,4 +1,4 @@ --#!/bin/sh -+#!/bin/bash - #============================================================================ - # /etc/xen/vif-nat - # -diff -dur -x '*~' xen-3.0.2.orig/tools/examples/vif-route xen-3.0.2/tools/examples/vif-route ---- xen-3.0.2.orig/tools/examples/vif-route 2006-04-10 00:05:53.000000000 +0200 -+++ xen-3.0.2/tools/examples/vif-route 2006-04-30 20:18:41.000000000 +0200 -@@ -1,4 +1,4 @@ --#!/bin/sh -+#!/bin/bash - #============================================================================ - # /etc/xen/vif-route - # -diff -dur -x '*~' xen-3.0.2.orig/tools/examples/vtpm xen-3.0.2/tools/examples/vtpm ---- xen-3.0.2.orig/tools/examples/vtpm 2006-04-10 00:05:53.000000000 +0200 -+++ xen-3.0.2/tools/examples/vtpm 2006-04-30 20:18:41.000000000 +0200 -@@ -1,4 +1,4 @@ --#!/bin/sh -+#!/bin/bash - - dir=$(dirname "$0") - . "$dir/vtpm-hotplug-common.sh" -diff -dur -x '*~' xen-3.0.2.orig/tools/examples/vtpm-delete xen-3.0.2/tools/examples/vtpm-delete ---- xen-3.0.2.orig/tools/examples/vtpm-delete 2006-04-10 00:05:53.000000000 +0200 -+++ xen-3.0.2/tools/examples/vtpm-delete 2006-04-30 20:18:41.000000000 +0200 -@@ -1,4 +1,4 @@ --#!/bin/sh -+#!/bin/bash - - # This scripts must be called the following way: - # vtpm-delete diff --git a/xen-blktap-no-aio-epoll.patch b/xen-blktap-no-aio-epoll.patch deleted file mode 100644 index 453be98..0000000 --- a/xen-blktap-no-aio-epoll.patch +++ /dev/null @@ -1,205 +0,0 @@ ---- a/tools/blktap/drivers/block-aio.c 2006-09-21 13:45:44.000000000 +0100 -+++ b/tools/blktap/drivers/block-aio.c 2006-09-21 19:58:18.000000000 +0100 -@@ -38,20 +38,13 @@ - #include - #include - #include -+#include - #include - #include - #include - #include - #include "tapdisk.h" - -- --/** -- * We used a kernel patch to return an fd associated with the AIO context -- * so that we can concurrently poll on synchronous and async descriptors. -- * This is signalled by passing 1 as the io context to io_setup. -- */ --#define REQUEST_ASYNC_FD 1 -- - #define MAX_AIO_REQS (MAX_REQUESTS * MAX_SEGMENTS_PER_REQ) - - struct pending_aio { -@@ -71,19 +64,24 @@ - int iocb_free_count; - struct iocb *iocb_queue[MAX_AIO_REQS]; - int iocb_queued; -- int poll_fd; /* NB: we require aio_poll support */ - struct io_event aio_events[MAX_AIO_REQS]; -+ -+ pthread_t aio_thread; -+ /* pipe fds for communication with the aio completion thread */ -+ int command_fd[2]; -+ int completion_fd[2]; - }; - - #define IOCB_IDX(_s, _io) ((_io) - (_s)->iocb_list) - -+static void *tdaio_completion_thread(void *); -+ - /*Get Image size, secsize*/ - static int get_image_info(struct td_state *s, int fd) - { - int ret; - long size; - unsigned long total_size; -- struct statvfs statBuf; - struct stat stat; - - ret = fstat(fd, &stat); -@@ -108,7 +106,6 @@ - /*Get the sector size*/ - #if defined(BLKSSZGET) - { -- int arg; - s->sector_size = DEFAULT_SECTOR_SIZE; - ioctl(fd, BLKSSZGET, &s->sector_size); - -@@ -151,11 +148,10 @@ - prv->iocb_free_count = MAX_AIO_REQS; - prv->iocb_queued = 0; - -- prv->aio_ctx = (io_context_t) REQUEST_ASYNC_FD; -- prv->poll_fd = io_setup(MAX_AIO_REQS, &prv->aio_ctx); -+ prv->aio_ctx = (io_context_t) 0; -+ ret = io_setup(MAX_AIO_REQS, &prv->aio_ctx); - -- if (prv->poll_fd < 0) { -- ret = prv->poll_fd; -+ if (ret < 0) { - if (ret == -EAGAIN) { - DPRINTF("Couldn't setup AIO context. If you are " - "trying to concurrently use a large number " -@@ -164,9 +160,7 @@ - "(e.g. 'echo echo 1048576 > /proc/sys/fs/" - "aio-max-nr')\n"); - } else { -- DPRINTF("Couldn't get fd for AIO poll support. This " -- "is probably because your kernel does not " -- "have the aio-poll patch applied.\n"); -+ DPRINTF("Couldn't setup AIO context.\n"); - } - goto done; - } -@@ -194,6 +188,15 @@ - - prv->fd = fd; - -+ pipe(prv->command_fd); -+ pipe(prv->completion_fd); -+ -+ ret = pthread_create(&prv->aio_thread, NULL, -+ tdaio_completion_thread, prv); -+ ret = 0; -+ write(prv->command_fd[1], &ret, sizeof(ret)); -+ -+ - ret = get_image_info(s, fd); - done: - return ret; -@@ -281,7 +284,7 @@ - /*initialise the FD array*/ - for(i=0;ipoll_fd; -+ fds[0] = prv->completion_fd[0]; - - return fds; - } -@@ -296,17 +299,61 @@ - return 0; - } - -+/* -+ * We don't have any way to do epoll on aio events in a normal kernel, so -+ * wait for aio events in a separate thread and return completion status -+ * that via a pipe that can be waited on normally. -+ * -+ * To keep locking problems between the completion thread and the submit -+ * thread to a minimum, there's a handshake which allows only one thread -+ * to be doing work on the completion queue at a time: -+ * -+ * 1) main thread sends completion thread a command via the command pipe; -+ * 2) completion thread waits for aio events and returns the number -+ * received on the completion pipe -+ * 3) main thread processes the received prv->aio_events events -+ * 4) loop back to 1) to let the completion thread refill the aio_events -+ * buffer. -+ * -+ * This workaround needs to disappear once the kernel provides a single -+ * mechanism for waiting on both aio and normal fd wakeups. -+ */ -+ -+static void *tdaio_completion_thread(void *arg) -+{ -+ struct tdaio_state *prv = (struct tdaio_state *) arg; -+ int command; -+ int nr_events; -+ int rc; -+ -+ while (1) { -+ rc = read(prv->command_fd[0], &command, sizeof(command)); -+ -+ do { -+ /* Non-blocking test for completed io. */ -+ rc = io_getevents(prv->aio_ctx, 0, -+ MAX_AIO_REQS, prv->aio_events, -+ NULL); -+ if (rc) { -+ nr_events = rc; -+ rc = write(prv->completion_fd[1], &nr_events, -+ sizeof(nr_events)); -+ } -+ } while (!rc); -+ } -+} -+ - int tdaio_do_callbacks(struct td_state *s, int sid) - { -- int ret, i, rsp = 0; -+ int ret, i, nr_events, rsp = 0; - struct io_event *ep; - struct tdaio_state *prv = (struct tdaio_state *)s->private; - - /* Non-blocking test for completed io. */ -- ret = io_getevents(prv->aio_ctx, 0, MAX_AIO_REQS, prv->aio_events, -- NULL); -- -- for (ep=prv->aio_events,i=ret; i-->0; ep++) { -+ ret = read(prv->completion_fd[0], &nr_events, sizeof(nr_events)); -+ -+repeat: -+ for (ep=prv->aio_events,i=nr_events; i-->0; ep++) { - struct iocb *io = ep->obj; - struct pending_aio *pio; - -@@ -320,6 +367,16 @@ - - prv->iocb_free[prv->iocb_free_count++] = io; - } -+ -+ if (nr_events) { -+ nr_events = io_getevents(prv->aio_ctx, 0, -+ MAX_AIO_REQS, prv->aio_events, -+ NULL); -+ goto repeat; -+ } -+ -+ write(prv->command_fd[1], &nr_events, sizeof(nr_events)); -+ - return rsp; - } - ---- xen-unstable-11539/tools/blktap/drivers/block-aio.c.~1~ 2006-09-25 19:27:39.000000000 +0100 -+++ xen-unstable-11539/tools/blktap/drivers/block-aio.c 2006-09-25 20:00:24.000000000 +0100 -@@ -331,7 +331,7 @@ - - do { - /* Non-blocking test for completed io. */ -- rc = io_getevents(prv->aio_ctx, 0, -+ rc = io_getevents(prv->aio_ctx, 1, - MAX_AIO_REQS, prv->aio_events, - NULL); - if (rc) { diff --git a/xen-reisermodule.patch b/xen-reisermodule.patch deleted file mode 100644 index 2861d9c..0000000 --- a/xen-reisermodule.patch +++ /dev/null @@ -1,61 +0,0 @@ ---- xen-3.0.3_0-src/tools/pygrub/src/fsys/reiser/reisermodule.c 2006-10-15 14:22:03.000000000 +0200 -+++ xen-3.0.3_0-src/tools/pygrub/src/fsys/reiser/reisermodule.c-new 2006-11-24 01:31:53.058527280 +0100 -@@ -17,7 +17,7 @@ - #include - #include - --#include -+#include - #include - - #if (PYTHON_API_VERSION >= 1011) -@@ -42,12 +42,12 @@ - reiserfs_file_t *file; - }; - --void file_dal_close(dal_t *dal) { -+void file_close(dal_t *dal) { - - if (!dal) return; - -- close((int)(unsigned long)dal->dev); -- dal_free(dal); -+ close((int)(unsigned long)dal->entity); -+// dal_free(dal); - } - - /* reiser file object */ -@@ -195,7 +195,7 @@ - if (fs->fs != NULL) - { - reiserfs_fs_close(fs->fs); -- file_dal_close(fs->dal); -+ file_close(fs->dal); - fs->fs = NULL; - } - Py_INCREF(Py_None); -@@ -218,13 +218,13 @@ - return NULL; - } - -- if (!(dal = file_dal_open(name, block_size, O_RDONLY))) { -+ if (!(dal = file_open(name, block_size, O_RDONLY))) { - PyErr_SetString(PyExc_ValueError, "Couldn't create device abstraction"); - return NULL; - } - - if (!(rfs = reiserfs_fs_open_fast(dal, dal))) { -- file_dal_close(dal); -+ file_close(dal); - PyErr_SetString(PyExc_ValueError, "unable to open file"); - return NULL; - } -@@ -265,7 +265,7 @@ - if (fs->fs != NULL) - { - reiserfs_fs_close(fs->fs); -- file_dal_close(fs->dal); -+ file_close(fs->dal); - fs->fs = NULL; - } - PyObject_DEL(fs); -- 2.44.0