[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] The order of contents saved in "/var/run/xenstored/db" is reversed
> -----Original Message----- > From: Wei Liu [mailto:wei.liu2@xxxxxxxxxx] > Sent: Sunday, April 17, 2016 8:21 PM > To: Sunguodong > Cc: xen-devel@xxxxxxxxxxxxx; Fanhenglong; Wei Liu > Subject: Re: [Xen-devel] The order of contents saved in > "/var/run/xenstored/db" is reversed > > On Sun, Apr 17, 2016 at 10:28:24AM +0000, Sunguodong wrote: > > Hi all, > > > > I have a question about oxenstored, please help if someone knows. > > Oxenstored saves store information to "/var/run/xenstored/db" when it > quits, but the contents is reversed. > > For example, > > before restart oxenstored, the output of 'xenstore-ls -f' is: > > ... > > /local/domain/0/memory/target = "8388608" > > /local/domain/0/memory/static-max = "4294967292" > > /local/domain/0/memory/freemem-slack = "0" > > ... > > after restart oxenstored, the output is: > > ... > > /local/domain/0/memory/freemem-slack = "0" > > /local/domain/0/memory/static-max = "4294967292" > > /local/domain/0/memory/target = "8388608" > > ... > > > > I found why when I read the code: > > When a new element is added to node list, it is added to the head of > the list, so the newest element will always be saved first, and then > restored first. > > > > Then question is: > > 1.What is the reason for this, is this done on purpose? > > 2.What is the impact of doing so if I save the store information in > the original order(first come first saved, and first saved first > restored ^_^)? > > > > Why do you care much about what order they appear in the output? I I was debugging it, and just confused about that. I was thinking if there are any features relied on the order and affected when oxenstored restored in reverse order. > don't > think the tools should make assumption on the order they appear and the > order doesn't matter. OK, I get it, thank you. > > In any case, if you need to have consistent view: > > xenstore-ls -f | sort > > Wei. > > > > Looking forward to your reply, thank you! > > > > Regards, > > Jason > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@xxxxxxxxxxxxx > > http://lists.xen.org/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |