xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Juergen Gross <jgross@suse.com>
Cc: tim@xen.org, sstabellini@kernel.org, wei.liu2@citrix.com,
	George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com,
	ian.jackson@eu.citrix.com, xen-devel@lists.xen.org,
	jbeulich@suse.com
Subject: Re: [PATCH v2 1/7] xenstore: fix add_change_node()
Date: Thu, 27 Oct 2016 11:15:24 +0100	[thread overview]
Message-ID: <20161027101524.GX30231@citrix.com> (raw)
In-Reply-To: <1477562158-26618-2-git-send-email-jgross@suse.com>

On Thu, Oct 27, 2016 at 11:55:52AM +0200, Juergen Gross wrote:
> add_change_node() in xenstored is used to add a modified node to the
> list of changed nodes of one transaction. It is being called with the
> recurse parameter set to true when removing a node in order to get
> watches for children of the node fired at transaction end, too.
> 
> If, however, the node to be deleted had been modified in the same
> transaction the recurse parameter of add_change_node() is lost as
> an entry already in the list of the changed nodes won't be entered
> again.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>

Reviewed-by: Wei Liu <wei.liu2@citrix.com>

I think we should apply this to 4.8, too. I will wait a bit for
different opinions.

(I've only looked at this patch in this series because I caught the
"fix" in subject line)

> ---
> Candidate for backport
> ---
>  tools/xenstore/xenstored_transaction.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/xenstore/xenstored_transaction.c b/tools/xenstore/xenstored_transaction.c
> index 34720fa..3c0b8f7 100644
> --- a/tools/xenstore/xenstored_transaction.c
> +++ b/tools/xenstore/xenstored_transaction.c
> @@ -103,8 +103,11 @@ void add_change_node(struct transaction *trans, const char *node, bool recurse)
>  	}
>  
>  	list_for_each_entry(i, &trans->changes, list)
> -		if (streq(i->node, node))
> +		if (streq(i->node, node)) {
> +			if (recurse)
> +				i->recurse = recurse;
>  			return;
> +		}

I would like to add {} around list_for_each_entry. No need to resend.

Wei.

>  
>  	i = talloc(trans, struct changed_node);
>  	i->node = talloc_strdup(i, node);
> -- 
> 2.6.6
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2016-10-27 10:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-27  9:55 [PATCH v2 0/7] xenstore: support reading directory with many children Juergen Gross
2016-10-27  9:55 ` [PATCH v2 1/7] xenstore: fix add_change_node() Juergen Gross
2016-10-27 10:15   ` Wei Liu [this message]
2016-10-27 10:19     ` Juergen Gross
2016-10-31 10:54     ` Wei Liu
2016-10-27  9:55 ` [PATCH v2 2/7] xenstore: modify add_change_node() parameter types Juergen Gross
2016-10-27  9:55 ` [PATCH v2 3/7] xenstore: call add_change_node() directly when writing node Juergen Gross
2016-10-27  9:55 ` [PATCH v2 4/7] xenstore: use common tdb record header in xenstore Juergen Gross
2016-10-27  9:55 ` [PATCH v2 5/7] xenstore: add per-node generation counter Juergen Gross
2016-10-27  9:55 ` [PATCH v2 6/7] xenstore: add support for reading directory with many children Juergen Gross
2016-10-27 13:56   ` Jan Beulich
     [not found]   ` <58122399020000780011A2AD@suse.com>
2016-10-27 15:00     ` Juergen Gross
2016-10-27 15:33       ` Juergen Gross
2016-10-27  9:55 ` [PATCH v2 7/7] xenstore: support XS_DIRECTORY_PART in libxenstore Juergen Gross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161027101524.GX30231@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jgross@suse.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).