From nobody Mon Feb 9 17:37:24 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1692000174; cv=none; d=zohomail.com; s=zohoarc; b=VQ2CDn/ApU3+liaG6wbUl1f2ymKwtkPMSZZfShOz+9fG4KxUjuCuXxfUaPTHFU8iUeUEfJ0Bv4OoBPER04CSHPdsou9MvpG/nEcWabQ5QxMS+YmFq8ETGVA7rq96V09+XybruSFuRbfJFz9eWgyf3GdX6pllDNnjV2T1va2uGss= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1692000174; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=W98ylWtNgR6nteCJmPJxXBK8+FslKIVZJVh4Y7sxD14=; b=S+PoHm+Z0axXCF/66ZeqO4bWIiogPvl5sjbyXnXAOkdQvxxD1Tpdl853HCuPOCjecWkJfX8MGxw9KdzOFM7OqmFkqtV5whwS2TlX63nntaq08m6toTNyQe4snOMDTl0Oe42vM1wn6QfTGL5lnV5IQyy+wc9ObWN5o4Dk+BCCpe8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1692000174256902.6144765386451; Mon, 14 Aug 2023 01:02:54 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.583412.913626 (Exim 4.92) (envelope-from ) id 1qVSWw-0005zs-Te; Mon, 14 Aug 2023 08:02:26 +0000 Received: by outflank-mailman (output) from mailman id 583412.913626; Mon, 14 Aug 2023 08:02:26 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qVSWw-0005zl-QX; Mon, 14 Aug 2023 08:02:26 +0000 Received: by outflank-mailman (input) for mailman id 583412; Mon, 14 Aug 2023 08:02:25 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qVSJD-0001Z5-1l for xen-devel@lists.xenproject.org; Mon, 14 Aug 2023 07:48:15 +0000 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id eb29dbcf-3a76-11ee-8613-37d641c3527e; Mon, 14 Aug 2023 09:48:12 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 0C55121984; Mon, 14 Aug 2023 07:48:12 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id D3439138EE; Mon, 14 Aug 2023 07:48:11 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 5QFAMjvc2WQSQgAAMHmgww (envelope-from ); Mon, 14 Aug 2023 07:48:11 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: eb29dbcf-3a76-11ee-8613-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1691999292; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=W98ylWtNgR6nteCJmPJxXBK8+FslKIVZJVh4Y7sxD14=; b=Qs6QF8BwE/7tfKznAj5kb5vL/qdyVBZscP7MMh+m8MMb0ntKIi5cLY54VjJVW4g73JOYvw ipTZo9skpxu5aJBo9+9gnOg8MEyw4lLHRoj/+2FwvBkagDXsv70QxZ4My/k6bMLYZoB363 74bEIAzgJn0MZZkND91sfzb4g6srdRw= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Wei Liu , Julien Grall , Anthony PERARD Subject: [PATCH v4 11/19] tools/xenstore: use struct node_hdr in struct node Date: Mon, 14 Aug 2023 09:46:59 +0200 Message-Id: <20230814074707.27696-12-jgross@suse.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230814074707.27696-1-jgross@suse.com> References: <20230814074707.27696-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1692000174660100001 Content-Type: text/plain; charset="utf-8" Replace some individual fields in struct node with struct node_hdr. This allows to add a helper for calculating the accounted memory size of a node. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall --- V2: - new patch V4: - add const to parameter of calc_node_acc_size() - modify comment (Julien Grall) --- tools/xenstore/xenstored_core.c | 110 ++++++++++++------------- tools/xenstore/xenstored_core.h | 16 ++-- tools/xenstore/xenstored_domain.c | 5 +- tools/xenstore/xenstored_transaction.c | 13 +-- 4 files changed, 72 insertions(+), 72 deletions(-) diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_cor= e.c index d7a4f0f1cb..ab4714263d 100644 --- a/tools/xenstore/xenstored_core.c +++ b/tools/xenstore/xenstored_core.c @@ -555,6 +555,12 @@ static void initialize_fds(int *p_sock_pollfd_idx, int= *ptimeout) } } =20 +static size_t calc_node_acc_size(const struct node_hdr *hdr) +{ + return sizeof(*hdr) + hdr->num_perms * sizeof(struct xs_permissions) + + hdr->datalen + hdr->childlen; +} + const struct node_hdr *db_fetch(const char *db_name, size_t *size) { const struct node_hdr *hdr; @@ -565,8 +571,7 @@ const struct node_hdr *db_fetch(const char *db_name, si= ze_t *size) return NULL; } =20 - *size =3D sizeof(*hdr) + hdr->num_perms * sizeof(struct xs_permissions) + - hdr->datalen + hdr->childlen; + *size =3D calc_node_acc_size(hdr); =20 trace_tdb("read %s size %zu\n", db_name, *size + strlen(db_name)); =20 @@ -726,7 +731,7 @@ struct node *read_node(struct connection *conn, const v= oid *ctx, hdr =3D db_fetch(db_name, &size); =20 if (hdr =3D=3D NULL) { - node->generation =3D NO_GENERATION; + node->hdr.generation =3D NO_GENERATION; err =3D access_node(conn, node, NODE_ACCESS_READ, NULL); errno =3D err ? : ENOENT; goto error; @@ -735,10 +740,7 @@ struct node *read_node(struct connection *conn, const = void *ctx, node->parent =3D NULL; =20 /* Datalen, childlen, number of permissions */ - node->generation =3D hdr->generation; - node->num_perms =3D hdr->num_perms; - node->datalen =3D hdr->datalen; - node->childlen =3D hdr->childlen; + node->hdr =3D *hdr; node->acc.domid =3D perms_from_node_hdr(hdr)->id; node->acc.memory =3D size; =20 @@ -760,7 +762,7 @@ struct node *read_node(struct connection *conn, const v= oid *ctx, /* Data is binary blob (usually ascii, no nul). */ node->data =3D node->perms + hdr->num_perms; /* Children is strings, nul separated. */ - node->children =3D node->data + node->datalen; + node->children =3D node->data + node->hdr.datalen; =20 if (access_node(conn, node, NODE_ACCESS_READ, NULL)) goto error; @@ -796,9 +798,7 @@ int write_node_raw(struct connection *conn, const char = *db_name, if (domain_adjust_node_perms(node)) return errno; =20 - size =3D sizeof(*hdr) - + node->num_perms * sizeof(node->perms[0]) - + node->datalen + node->childlen; + size =3D calc_node_acc_size(&node->hdr); =20 /* Call domain_max_chk() in any case in order to record max values. */ if (domain_max_chk(conn, ACC_NODESZ, size) && !no_quota_check) { @@ -815,18 +815,15 @@ int write_node_raw(struct connection *conn, const cha= r *db_name, BUILD_BUG_ON(XENSTORE_PAYLOAD_MAX >=3D (typeof(hdr->datalen))(-1)); =20 hdr =3D data; - hdr->generation =3D node->generation; - hdr->num_perms =3D node->num_perms; - hdr->datalen =3D node->datalen; - hdr->childlen =3D node->childlen; + *hdr =3D node->hdr; =20 /* Open code perms_from_node_hdr() for the non-const case. */ p =3D hdr + 1; - memcpy(p, node->perms, node->num_perms * sizeof(*node->perms)); - p +=3D node->num_perms * sizeof(*node->perms); - memcpy(p, node->data, node->datalen); - p +=3D node->datalen; - memcpy(p, node->children, node->childlen); + memcpy(p, node->perms, node->hdr.num_perms * sizeof(*node->perms)); + p +=3D node->hdr.num_perms * sizeof(*node->perms); + memcpy(p, node->data, node->hdr.datalen); + p +=3D node->hdr.datalen; + memcpy(p, node->children, node->hdr.childlen); =20 if (db_write(conn, db_name, data, size, &node->acc, mode, no_quota_check)) @@ -1216,7 +1213,7 @@ static char *node_perms_to_strings(const struct node = *node, unsigned int *len) char *strings =3D NULL; char buffer[MAX_STRLEN(unsigned int) + 1]; =20 - for (*len =3D 0, i =3D 0; i < node->num_perms; i++) { + for (*len =3D 0, i =3D 0; i < node->hdr.num_perms; i++) { if (!xenstore_perm_to_string(&node->perms[i], buffer, sizeof(buffer))) return NULL; @@ -1287,7 +1284,7 @@ static int send_directory(const void *ctx, struct con= nection *conn, if (!node) return errno; =20 - send_reply(conn, XS_DIRECTORY, node->children, node->childlen); + send_reply(conn, XS_DIRECTORY, node->children, node->hdr.childlen); =20 return 0; } @@ -1312,10 +1309,11 @@ static int send_directory_part(const void *ctx, str= uct connection *conn, /* Second arg is childlist offset. */ off =3D atoi(in->buffer + strlen(in->buffer) + 1); =20 - genlen =3D snprintf(gen, sizeof(gen), "%"PRIu64, node->generation) + 1; + genlen =3D snprintf(gen, sizeof(gen), "%"PRIu64, node->hdr.generation) + + 1; =20 /* Offset behind list: just return a list with an empty string. */ - if (off >=3D node->childlen) { + if (off >=3D node->hdr.childlen) { gen[genlen] =3D 0; send_reply(conn, XS_DIRECTORY_PART, gen, genlen + 1); return 0; @@ -1328,7 +1326,7 @@ static int send_directory_part(const void *ctx, struc= t connection *conn, while (len + strlen(child) < maxlen) { len +=3D strlen(child) + 1; child +=3D strlen(child) + 1; - if (off + len =3D=3D node->childlen) + if (off + len =3D=3D node->hdr.childlen) break; } =20 @@ -1338,7 +1336,7 @@ static int send_directory_part(const void *ctx, struc= t connection *conn, =20 memcpy(data, gen, genlen); memcpy(data + genlen, node->children + off, len); - if (off + len =3D=3D node->childlen) { + if (off + len =3D=3D node->hdr.childlen) { data[genlen + len] =3D 0; len++; } @@ -1358,7 +1356,7 @@ static int do_read(const void *ctx, struct connection= *conn, if (!node) return errno; =20 - send_reply(conn, XS_READ, node->data, node->datalen); + send_reply(conn, XS_READ, node->data, node->hdr.datalen); =20 return 0; } @@ -1377,13 +1375,13 @@ static int add_child(const void *ctx, struct node *= parent, const char *name) =20 base =3D basename(name); baselen =3D strlen(base) + 1; - children =3D talloc_array(ctx, char, parent->childlen + baselen); + children =3D talloc_array(ctx, char, parent->hdr.childlen + baselen); if (!children) return ENOMEM; - memcpy(children, parent->children, parent->childlen); - memcpy(children + parent->childlen, base, baselen); + memcpy(children, parent->children, parent->hdr.childlen); + memcpy(children + parent->hdr.childlen, base, baselen); parent->children =3D children; - parent->childlen +=3D baselen; + parent->hdr.childlen +=3D baselen; =20 return 0; } @@ -1436,9 +1434,9 @@ static struct node *construct_node(struct connection = *conn, const void *ctx, node->name =3D talloc_steal(node, names[levels - 1]); =20 /* Inherit permissions, unpriv domains own what they create. */ - node->num_perms =3D parent->num_perms; + node->hdr.num_perms =3D parent->hdr.num_perms; node->perms =3D talloc_memdup(node, parent->perms, - node->num_perms * + node->hdr.num_perms * sizeof(*node->perms)); if (!node->perms) goto nomem; @@ -1447,7 +1445,7 @@ static struct node *construct_node(struct connection = *conn, const void *ctx, =20 /* No children, no data */ node->children =3D node->data =3D NULL; - node->childlen =3D node->datalen =3D 0; + node->hdr.childlen =3D node->hdr.datalen =3D 0; node->acc.memory =3D 0; node->parent =3D parent; =20 @@ -1499,7 +1497,7 @@ static struct node *create_node(struct connection *co= nn, const void *ctx, ta_node_created(conn->transaction); =20 node->data =3D data; - node->datalen =3D datalen; + node->hdr.datalen =3D datalen; =20 /* * We write out the nodes bottom up. @@ -1579,7 +1577,7 @@ static int do_write(const void *ctx, struct connectio= n *conn, return errno; } else { node->data =3D in->buffer + offset; - node->datalen =3D datalen; + node->hdr.datalen =3D datalen; if (write_node(conn, node, NODE_MODIFY, false)) return errno; } @@ -1627,8 +1625,8 @@ static int remove_child_entry(struct connection *conn= , struct node *node, { size_t childlen =3D strlen(node->children + offset); =20 - memdel(node->children, offset, childlen + 1, node->childlen); - node->childlen -=3D childlen + 1; + memdel(node->children, offset, childlen + 1, node->hdr.childlen); + node->hdr.childlen -=3D childlen + 1; =20 return write_node(conn, node, NODE_MODIFY, true); } @@ -1638,8 +1636,9 @@ static int delete_child(struct connection *conn, { unsigned int i; =20 - for (i =3D 0; i < node->childlen; i +=3D strlen(node->children+i) + 1) { - if (streq(node->children+i, childname)) { + for (i =3D 0; i < node->hdr.childlen; + i +=3D strlen(node->children + i) + 1) { + if (streq(node->children + i, childname)) { errno =3D remove_child_entry(conn, node, i) ? EIO : 0; return errno; } @@ -1906,7 +1905,7 @@ int walk_node_tree(const void *ctx, struct connection= *conn, const char *root, /* node =3D=3D NULL possible only for the initial loop iteration. */ if (node) { /* Go one step up if ret or if last child finished. */ - if (ret || node->childoff >=3D node->childlen) { + if (ret || node->childoff >=3D node->hdr.childlen) { parent =3D node->parent; /* Call function AFTER processing a node. */ ret =3D walk_call_func(ctx, conn, node, parent, @@ -2343,10 +2342,10 @@ static void manual_node(const char *name, const cha= r *child) =20 node->name =3D name; node->perms =3D &perms; - node->num_perms =3D 1; + node->hdr.num_perms =3D 1; node->children =3D (char *)child; if (child) - node->childlen =3D strlen(child) + 1; + node->hdr.childlen =3D strlen(child) + 1; =20 if (write_node(NULL, node, NODE_CREATE, false)) barf_perror("Could not create initial node %s", name); @@ -3214,12 +3213,12 @@ static int dump_state_node(const void *ctx, struct = connection *conn, sn.conn_id =3D 0; sn.ta_id =3D 0; sn.ta_access =3D 0; - sn.perm_n =3D node->num_perms; + sn.perm_n =3D node->hdr.num_perms; sn.path_len =3D pathlen; - sn.data_len =3D node->datalen; - head.length +=3D node->num_perms * sizeof(*sn.perms); + sn.data_len =3D node->hdr.datalen; + head.length +=3D node->hdr.num_perms * sizeof(*sn.perms); head.length +=3D pathlen; - head.length +=3D node->datalen; + head.length +=3D node->hdr.datalen; head.length =3D ROUNDUP(head.length, 3); =20 if (fwrite(&head, sizeof(head), 1, fp) !=3D 1) @@ -3227,14 +3226,15 @@ static int dump_state_node(const void *ctx, struct = connection *conn, if (fwrite(&sn, sizeof(sn), 1, fp) !=3D 1) return dump_state_node_err(data, "Dump node state error"); =20 - ret =3D dump_state_node_perms(fp, node->perms, node->num_perms); + ret =3D dump_state_node_perms(fp, node->perms, node->hdr.num_perms); if (ret) return dump_state_node_err(data, ret); =20 if (fwrite(node->name, pathlen, 1, fp) !=3D 1) return dump_state_node_err(data, "Dump node path error"); =20 - if (node->datalen && fwrite(node->data, node->datalen, 1, fp) !=3D 1) + if (node->hdr.datalen && + fwrite(node->data, node->hdr.datalen, 1, fp) !=3D 1) return dump_state_node_err(data, "Dump node data error"); =20 ret =3D dump_state_align(fp); @@ -3419,17 +3419,17 @@ void read_state_node(const void *ctx, const void *s= tate) =20 node->acc.memory =3D 0; node->name =3D name; - node->generation =3D ++generation; - node->datalen =3D sn->data_len; + node->hdr.generation =3D ++generation; + node->hdr.datalen =3D sn->data_len; node->data =3D name + sn->path_len; - node->childlen =3D 0; + node->hdr.childlen =3D 0; node->children =3D NULL; - node->num_perms =3D sn->perm_n; + node->hdr.num_perms =3D sn->perm_n; node->perms =3D talloc_array(node, struct xs_permissions, - node->num_perms); + node->hdr.num_perms); if (!node->perms) barf("allocation error restoring node"); - for (i =3D 0; i < node->num_perms; i++) { + for (i =3D 0; i < node->hdr.num_perms; i++) { switch (sn->perms[i].access) { case 'r': node->perms[i].perms =3D XS_PERM_READ; diff --git a/tools/xenstore/xenstored_core.h b/tools/xenstore/xenstored_cor= e.h index 4bed462dda..cbed412a86 100644 --- a/tools/xenstore/xenstored_core.h +++ b/tools/xenstore/xenstored_core.h @@ -181,6 +181,7 @@ extern struct list_head connections; */ struct node_hdr { uint64_t generation; +#define NO_GENERATION ~((uint64_t)0) uint16_t num_perms; uint16_t datalen; uint32_t childlen; @@ -197,6 +198,10 @@ struct node_account_data { }; =20 struct node { + /* Copied to/from data base. */ + struct node_hdr hdr; + + /* Xenstore path. */ const char *name; /* Name used to access data base. */ const char *db_name; @@ -204,20 +209,13 @@ struct node { /* Parent (optional) */ struct node *parent; =20 - /* Generation count. */ - uint64_t generation; -#define NO_GENERATION ~((uint64_t)0) - /* Permissions. */ - unsigned int num_perms; struct xs_permissions *perms; =20 /* Contents. */ - unsigned int datalen; void *data; =20 /* Children, each nul-terminated. */ - unsigned int childlen; unsigned int childoff; /* Used by walk_node_tree() internally. */ char *children; =20 @@ -259,7 +257,7 @@ static inline unsigned int get_node_owner(const struct = node *node) static inline void node_to_node_perms(const struct node *node, struct node_perms *perms) { - perms->num =3D node->num_perms; + perms->num =3D node->hdr.num_perms; perms->p =3D node->perms; } =20 @@ -277,7 +275,7 @@ static inline unsigned int perm_for_conn_from_node(stru= ct connection *conn, static inline void node_perms_to_node(const struct node_perms *perms, struct node *node) { - node->num_perms =3D perms->num; + node->hdr.num_perms =3D perms->num; node->perms =3D perms->p; } =20 diff --git a/tools/xenstore/xenstored_domain.c b/tools/xenstore/xenstored_d= omain.c index 1ba73d9db2..fdf1095acb 100644 --- a/tools/xenstore/xenstored_domain.c +++ b/tools/xenstore/xenstored_domain.c @@ -1335,10 +1335,11 @@ int domain_adjust_node_perms(struct node *node) { unsigned int i; =20 - for (i =3D 1; i < node->num_perms; i++) { + for (i =3D 1; i < node->hdr.num_perms; i++) { if (node->perms[i].perms & XS_PERM_IGNORE) continue; - if (!chk_domain_generation(node->perms[i].id, node->generation)) + if (!chk_domain_generation(node->perms[i].id, + node->hdr.generation)) node->perms[i].perms |=3D XS_PERM_IGNORE; } =20 diff --git a/tools/xenstore/xenstored_transaction.c b/tools/xenstore/xensto= red_transaction.c index 213a2c436c..1f892b002d 100644 --- a/tools/xenstore/xenstored_transaction.c +++ b/tools/xenstore/xenstored_transaction.c @@ -232,7 +232,7 @@ int access_node(struct connection *conn, struct node *n= ode, bool introduce =3D false; =20 if (type !=3D NODE_ACCESS_READ) { - node->generation =3D ++generation; + node->hdr.generation =3D ++generation; if (conn && !conn->transaction) wrl_apply_debit_direct(conn); } @@ -259,12 +259,13 @@ int access_node(struct connection *conn, struct node = *node, if (!i->trans_name) goto nomem; i->node =3D strchr(i->trans_name, '/') + 1; - if (node->generation !=3D NO_GENERATION && node->num_perms) { + if (node->hdr.generation !=3D NO_GENERATION && + node->hdr.num_perms) { i->perms.p =3D talloc_array(i, struct xs_permissions, - node->num_perms); + node->hdr.num_perms); if (!i->perms.p) goto nomem; - i->perms.num =3D node->num_perms; + i->perms.num =3D node->hdr.num_perms; memcpy(i->perms.p, node->perms, i->perms.num * sizeof(*i->perms.p)); } @@ -282,9 +283,9 @@ int access_node(struct connection *conn, struct node *n= ode, * from the write types. */ if (type =3D=3D NODE_ACCESS_READ) { - i->generation =3D node->generation; + i->generation =3D node->hdr.generation; i->check_gen =3D true; - if (node->generation !=3D NO_GENERATION) { + if (node->hdr.generation !=3D NO_GENERATION) { ret =3D write_node_raw(conn, i->trans_name, node, NODE_CREATE, true); if (ret) --=20 2.35.3