WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Xen

xen-devel

[Top] [All Lists]

RE: [Xen-devel] [PATCH][XEND][RESEND]Reprt error for a existing file

To: "Akio Takebe" <takebe_akio@xxxxxxxxxxxxxx>, "Kazuki Mizushima" <mizushima.kazuk@xxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: RE: [Xen-devel] [PATCH][XEND][RESEND]Reprt error for a existing file
From: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
Date: 2007年3月15日 13:44:49 +0100
Delivery-date: 2007年3月15日 05:44:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <A7C766FDDEF580takebe_akio@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acdm/kmGaFD4rPCzRVOPlrCKVpbstQAATvBw
Thread-topic: [Xen-devel] [PATCH][XEND][RESEND]Reprt error for a existing file
 
> -----Original Message-----
> From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx 
> [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Akio Takebe
> Sent: 15 March 2007 12:32
> To: Kazuki Mizushima; xen-devel@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [Xen-devel] [PATCH][XEND][RESEND]Reprt error for 
> a existing file
>
> Hi, Kazuki
>
> I think renaming filename is better.
> Common Linux dump features(e.g. diskdump, netdump, and so on) are
> rename dumpfile when the same filename exist.
>
> For example, what do you think renaming from 
> <time>-<dom_name>.<dom_id>.core
> to <time>-<dom_name>.<dom_id>.core-1?
That's fine for dump-files. I don't think the concept is good for
save-files, as there's many reasons one would want to save/restore the
same domain over and over (say for example daily back-ups, after a month
you'd have 30 or so files!). 
--
Mats
>
> Best Regards,
>
> Akio Takebe
>
> >Hi,
> >
> >This patch prevents output file overwriting for xm 
> save/dump-core case.
> >
> >Would you give me a comment on this patch? If not, please apply it. 
> >I made it again for the current.
> >
> >
> >> #xm dump-core 12 a.dump
> >> Dumping core of domain: 12 ...
> >> Error: Cannot dump core for existing file /tmp/a.dump
> >> Usage: xm dump-core [-L|--live] [-C|--crash] <Domain> [Filename]
> >> 
> >> Dump core for a specific domain.
> >> -L, --live Dump core without pausing 
> the domain
> >> -C, --crash Crash domain after dumping core
> >> 
> >> # xm save 12 a.save
> >> Error: Cannot save for existing file /tmp/a.save
> >> Usage: xm save <Domain> <CheckpointFile>
> >> 
> >> Save a domain state to restore later.
> >> #
> >> 
> >> Signed-off-by: Kazuki Mizushima <mizushima.kazuk@xxxxxxxxxxxxxx>
> >
> >
> >Thanks,
> >Kazuki Mizushima
> >
> >
> >diff -r 517e67f0fe52 tools/python/xen/xend/XendDomain.py
> >--- a/tools/python/xen/xend/XendDomain.py Wed Mar 14 
> 19:35:26 2007 +0000
> >+++ b/tools/python/xen/xend/XendDomain.py Thu Mar 15 
> 18:41:49 2007 +0900
> >@@ -1094,6 +1094,9 @@ class XendDomain:
> > if dominfo.getDomid() == DOM0_ID:
> > raise XendError("Cannot dump core for 
> privileged domain %s" % 
> >domid)
> >
> >+ if os.path.exists(filename):
> >+ raise XendError("Cannot dump core for existing 
> file %s" % 
> >filename)
> >+
> > try:
> > log.info("Domain core dump requested for domain 
> %s (%d) "
> > "live=%d crash=%d.",
> >@@ -1190,6 +1193,9 @@ class XendDomain:
> >
> > if dominfo.getDomid() == DOM0_ID:
> > raise XendError("Cannot save privileged 
> domain %i" % domid)
> >+
> >+ if os.path.exists(dst):
> >+ raise XendError("Cannot save for existing 
> file %s" % dst)
> >
> > oflags = os.O_WRONLY | os.O_CREAT | os.O_TRUNC
> > if hasattr(os, "O_LARGEFILE"):
> >
> >
> >
> >
> >
> >_______________________________________________
> >Xen-devel mailing list
> >Xen-devel@xxxxxxxxxxxxxxxxxxx
> >http://lists.xensource.com/xen-devel 
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel 
>
>
>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: Re: [Xen-devel] [PATCH][XEND][RESEND]Reprt error for a existing file , Akio Takebe
Next by Date: Re: [Xen-devel] Possibilities with Xen3 compared to IBM Power5 DLPAR , Julian Pawlowski
Previous by Thread: Re: [Xen-devel] [PATCH][XEND][RESEND]Reprt error for a existing file , Akio Takebe
Next by Thread: RE: [Xen-devel] [PATCH][XEND][RESEND]Reprt error for a existing file , Akio Takebe
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /