[ovs-git] [openvswitch/ovs] 875f8c: log: Make reading in writing mode less of an error...

GitHub noreply at github.com
Sun Dec 24 20:02:06 UTC 2017


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 875f8c13cb401e55fb02c200f8b3febc7d2ac9b6
      https://github.com/openvswitch/ovs/commit/875f8c13cb401e55fb02c200f8b3febc7d2ac9b6
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2017-12-24 (Sun, 24 Dec 2017)

  Changed paths:
    M ovsdb/log.c

  Log Message:
  -----------
  log: Make reading in writing mode less of an error.

Clients are intended to use the OVSDB log code by reading zero or more
records and then writing zero or more records, but not reading after any
write has occurred.  Until now, ovsdb_log_read() has signaled the latter
behavior as an error.  Upcoming changes to OVSDB are going to make it an
expected behavior in some cases, so this commit changes it so that it
just becomes an empty read.

Signed-off-by: Ben Pfaff <blp at ovn.org>
Acked-by: Justin Pettit <jpettit at ovn.org>


  Commit: 421fc8a1359e50049c1509bc920e64e6591dc925
      https://github.com/openvswitch/ovs/commit/421fc8a1359e50049c1509bc920e64e6591dc925
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2017-12-24 (Sun, 24 Dec 2017)

  Changed paths:
    M ovsdb/log.c
    M ovsdb/log.h
    M tests/ovsdb-log.at
    M tests/test-ovsdb.c

  Log Message:
  -----------
  log: New functions for replacing a log's contents.

These functions will acquire users in future commits.

This new functionality made the internal state machine of the log hard
enough to understand that I thought that it was best to make it explicit
with a 'state' variable, so this commit introduces one.

This commit duplicates code and logic from ovsdb_rename() and
ovsdb_compact() in ovsdb/file.c.  A future commit removes this duplication.

Signed-off-by: Ben Pfaff <blp at ovn.org>
Acked-by: Justin Pettit <jpettit at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/1e0b7e94ecf3...421fc8a1359e


More information about the git mailing list