[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v17 6/8] 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 | 4 +++- tools/libxl/libxl_types.idl | 1 + tools/libxl/xl_cmdimpl.c | 6 +++++- tools/libxl/xl_cmdtable.c | 1 + 5 files changed, 14 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 78a4752..c060e5b 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -832,7 +832,9 @@ int libxl_domain_remus_start(libxl_ctx *ctx, libxl_domain_remus_info *info, } rds->device_kind_flags |= LIBXL__REMUS_DEVICE_NIC; } - rds->device_kind_flags |= LIBXL__REMUS_DEVICE_DISK; + + if (info->diskbuf) + rds->device_kind_flags |= LIBXL__REMUS_DEVICE_DISK; rds->ao = ao; rds->egc = egc; diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl index a96771e..6551109 100644 --- a/tools/libxl/libxl_types.idl +++ b/tools/libxl/libxl_types.idl @@ -592,6 +592,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 |