[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v15 6/7] libxl: disk buffering cmdline switch
disk buffering is enabled as default. add an option "-d" to disable it. Signed-off-by: Yang Hongyang <yanghy@xxxxxxxxxxxxxx> --- docs/man/xl.pod.1 | 4 ++++ tools/libxl/libxl.c | 3 +++ tools/libxl/libxl_internal.h | 1 + tools/libxl/libxl_remus_device.c | 3 ++- tools/libxl/libxl_types.idl | 1 + tools/libxl/xl_cmdimpl.c | 6 +++++- tools/libxl/xl_cmdtable.c | 1 + 7 files changed, 17 insertions(+), 2 deletions(-) diff --git a/docs/man/xl.pod.1 b/docs/man/xl.pod.1 index e9e4a83..547e8a2 100644 --- a/docs/man/xl.pod.1 +++ b/docs/man/xl.pod.1 @@ -459,6 +459,10 @@ Disable network output buffering. Use <netbufscript> to setup network buffering instead of the instead of the default (/etc/xen/scripts/remus-netbuf-setup). +=item B<-d> + +Disable disk buffering. + =item B<-s> I<sshcommand> Use <sshcommand> instead of ssh. String will be passed to sh. diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index b7d62c1..331689f 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -806,6 +806,9 @@ int libxl_domain_remus_start(libxl_ctx *ctx, libxl_domain_remus_info *info, } } + /* Setup disk buffering */ + rs->diskbuf = info->diskbuf; + rs->ao = ao; rs->domid = domid; rs->saved_rc = 0; diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 2941329..ebe486b 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -2644,6 +2644,7 @@ struct libxl__remus_state { libxl__remus_callback *callback; /* Script to setup/teardown network buffers */ const char *netbufscript; + bool diskbuf; /* private */ int saved_rc; diff --git a/tools/libxl/libxl_remus_device.c b/tools/libxl/libxl_remus_device.c index d940de1..c542833 100644 --- a/tools/libxl/libxl_remus_device.c +++ b/tools/libxl/libxl_remus_device.c @@ -355,7 +355,8 @@ void libxl__remus_device_setup(libxl__egc *egc, libxl__remus_state *rs) if (rs->netbufscript) rds->nics = libxl_device_nic_list(CTX, rs->domid, &rds->num_nics); - rds->disks = libxl_device_disk_list(CTX, rs->domid, &rds->num_disks); + if (rs->diskbuf) + rds->disks = libxl_device_disk_list(CTX, rs->domid, &rds->num_disks); if (rds->num_nics == 0 && rds->num_disks == 0) goto out; diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl index e85a636..1056702 100644 --- a/tools/libxl/libxl_types.idl +++ b/tools/libxl/libxl_types.idl @@ -577,6 +577,7 @@ libxl_domain_remus_info = Struct("domain_remus_info",[ ("compression", bool), ("netbuf", bool), ("netbufscript", string), + ("diskbuf", bool), ]) libxl_event_type = Enumeration("event_type", [ diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index b324f34..167b65b 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -7176,8 +7176,9 @@ int main_remus(int argc, char **argv) r_info.blackhole = 0; r_info.compression = 1; r_info.netbuf = 1; + r_info.diskbuf = 1; - SWITCH_FOREACH_OPT(opt, "buni:s:N:e", NULL, "remus", 2) { + SWITCH_FOREACH_OPT(opt, "bundi:s:N:e", NULL, "remus", 2) { case 'i': r_info.interval = atoi(optarg); break; @@ -7193,6 +7194,9 @@ int main_remus(int argc, char **argv) case 'N': r_info.netbufscript = optarg; break; + case 'd': + r_info.diskbuf = 0; + break; case 's': ssh_command = optarg; break; diff --git a/tools/libxl/xl_cmdtable.c b/tools/libxl/xl_cmdtable.c index 3f7520d..246aa11 100644 --- a/tools/libxl/xl_cmdtable.c +++ b/tools/libxl/xl_cmdtable.c @@ -490,6 +490,7 @@ struct cmd_spec cmd_table[] = { "-n Disable network output buffering.\n" "-N <netbufscript> Use netbufscript to setup network buffering instead of the\n" " instead of the default (/etc/xen/scripts/remus-netbuf-setup).\n" + "-d Disable disk buffering.\n" "-s <sshcommand> Use <sshcommand> instead of ssh. String will be passed\n" " to sh. If empty, run <host> instead of \n" " ssh <host> xl migrate-receive -r [-e]\n" -- 1.9.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |