Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP5:GA
xen.4506
xs-10-call-add_change_node.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File xs-10-call-add_change_node.patch of Package xen.4506
commit b4b475c3ace316589fb9b68f9d4ee9425a1a2349 Author: Juergen Gross <jgross@suse.com> Date: Mon Dec 5 08:48:43 2016 +0100 xenstore: call add_change_node() directly when writing node Instead of calling add_change_node() at places where write_node() is called, do that inside write_node(). Note that there is one case where add_change_node() is called now when a later failure will prohibit the changed node to be written: in case of a write_node failing due to an error in tdb_store(). As the only visible change of behavior is a stale event fired for the node, while the failing tdb_store() signals a corrupted xenstore database, the stale event will be the least problem of this case. Signed-off-by: Juergen Gross <jgross@suse.com> Acked-by: Wei Liu <wei.liu2@citrix.com> diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c index de1a9b4..1354387 100644 --- a/tools/xenstore/xenstored_core.c +++ b/tools/xenstore/xenstored_core.c @@ -456,7 +456,7 @@ static struct node *read_node(struct connection *conn, const void *ctx, return node; } -static bool write_node(struct connection *conn, const struct node *node) +static bool write_node(struct connection *conn, struct node *node) { /* * conn will be null when this is called from manual_node. @@ -476,6 +476,8 @@ static bool write_node(struct connection *conn, const struct node *node) if (domain_is_unprivileged(conn) && data.dsize >= quota_max_entry_size) goto error; + add_change_node(conn, node, false); + data.dptr = talloc_size(node, data.dsize); ((uint32_t *)data.dptr)[0] = node->num_perms; ((uint32_t *)data.dptr)[1] = node->datalen; @@ -976,7 +978,6 @@ static void do_write(struct connection *conn, struct buffered_data *in) } } - add_change_node(conn, node, false); fire_watches(conn, in, name, false); send_ack(conn, XS_WRITE); } @@ -1007,7 +1008,6 @@ static void do_mkdir(struct connection *conn, struct buffered_data *in) send_error(conn, errno); return; } - add_change_node(conn, node, false); fire_watches(conn, in, name, false); } send_ack(conn, XS_MKDIR); @@ -1209,7 +1209,6 @@ static void do_set_perms(struct connection *conn, struct buffered_data *in) return; } - add_change_node(conn, node, false); fire_watches(conn, in, name, false); send_ack(conn, XS_SET_PERMS); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor