[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH v13 7/7] libxl: disk buffering cmdline switch
 
- To: FNST-Yang Hongyang <yanghy@xxxxxxxxxxxxxx>
 
- From: Shriram Rajagopalan <rshriram@xxxxxxxxx>
 
- Date: Thu, 26 Jun 2014 22:33:51 -0500
 
- Cc: ian.campbell@xxxxxxxxxx, wency@xxxxxxxxxxxxxx,	stefano.stabellini@xxxxxxxxxxxxx, ian.jackson@xxxxxxxxxxxxx,	Jiang Yunhong <yunhong.jiang@xxxxxxxxx>, eddie.dong@xxxxxxxxx,	xen-devel@xxxxxxxxxxxxx, andrew.cooper3@xxxxxxxxxx,	laijs@xxxxxxxxxxxxxx, Roger Pau Monne <roger.pau@xxxxxxxxxx>
 
- Delivery-date: Fri, 27 Jun 2014 03:34:03 +0000
 
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
 
 
 
 
On Jun 27, 2014 7:29 AM, "Yang Hongyang" <yanghy@xxxxxxxxxxxxxx> wrote: 
> 
> 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     | 4 ++++ 
> Âtools/libxl/xl_cmdtable.c    Â| 1 + 
> Â7 files changed, 16 insertions(+), 1 deletion(-) 
> 
> 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 c0d2bd2..85b6e9a 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 2424be0..a9f0b01 100644 
> --- a/tools/libxl/libxl_internal.h 
> +++ b/tools/libxl/libxl_internal.h 
> @@ -2635,6 +2635,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 d2344b0..b1cae84 100644 
> --- a/tools/libxl/libxl_remus_device.c 
> +++ b/tools/libxl/libxl_remus_device.c 
> @@ -311,7 +311,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 4299298..dfaa137 100644 
> --- a/tools/libxl/libxl_types.idl 
> +++ b/tools/libxl/libxl_types.idl 
> @@ -572,6 +572,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 1a6119a..ce9921c 100644 
> --- a/tools/libxl/xl_cmdimpl.c 
> +++ b/tools/libxl/xl_cmdimpl.c 
> @@ -7202,6 +7202,7 @@ 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) { 
> Â Â Âcase 'i': 
> @@ -7219,6 +7220,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 
> 
The patch looks fine to me. 
Once again, I'll defer it to IanJ or IanC for the final ack. 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
 
 
    
     |