X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ovsdb%2Frow.h;h=302f61ab1712f5d316c2799590a591f88a9a28e5;hb=abaad8cf1b5089e17a4af0ab1ff644bfcf63cad9;hp=55c4f1426d872699e7cbd3c7719b1bbd6b18cab7;hpb=a4af00400a835eb87569ba40e21874c05e872c0f;p=openvswitch diff --git a/ovsdb/row.h b/ovsdb/row.h index 55c4f142..302f61ab 100644 --- a/ovsdb/row.h +++ b/ovsdb/row.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2009 Nicira Networks +/* Copyright (c) 2009, 2010 Nicira Networks * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,6 +29,13 @@ struct ovsdb_row { struct ovsdb_table *table; /* Table to which this belongs. */ struct hmap_node hmap_node; /* Element in ovsdb_table's 'rows' hmap. */ struct ovsdb_txn_row *txn_row; /* Transaction that row is in, if any. */ + + /* Number of refs to this row from other rows, in this table or other + * tables, through 'uuid' columns that have a 'refTable' constraint + * pointing to this table. A row with nonzero 'n_refs' cannot be deleted. + * Updated and checked only at transaction commit. */ + size_t n_refs; + struct ovsdb_datum fields[]; }; @@ -50,7 +57,7 @@ void ovsdb_row_update_columns(struct ovsdb_row *, const struct ovsdb_row *, struct ovsdb_error *ovsdb_row_from_json(struct ovsdb_row *, const struct json *, - const struct ovsdb_symbol_table *, + struct ovsdb_symbol_table *, struct ovsdb_column_set *included) WARN_UNUSED_RESULT; struct json *ovsdb_row_to_json(const struct ovsdb_row *,