[PATCH v2 00/20] Split parsing and defining logic of daemon's logging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



v2 of the original series
https://www.redhat.com/archives/libvir-list/2016-May/msg00229.html

since v1:
- as Cole pointed out in 20/38 of the original series, the patches were not
designed in an elegant way and they were hard to review, so this series reworked
the whole series:
    -> first the existing methods that do combine parsing and defining logic
    and which should be dropped are renamed to a more accurate name
    -> all the necessary methods to achieve the "split" are introduced
    gradually, interconnected with each other
    -> finally, all the callers switch to the new logic introduced in the early
    patches in a transparent way
    -> all the original poorly named methods are completely dropped

- also, the original series introduced a new set of API locks because there was
an issue with 2 concurrent setters that while setter1 was preparing its local
set of outputs to replace the existing global one, setter2 might just replace
the global set with its copy, invalidating all fds of the setter1's set because
the original series used a concept of *copying* (not duplicating) of fds, so
the copied fd would be invalidated by issuing reset by setter2.
This series however, duplicates the file-based outputs'
(that should remain opened) fds. So even if setter2 replaces the original set
with its copy and calls reset, effectively closing all fds, it does not matter
for setter1, since unlink only decrements the number of references to a
specific opened fd.


Erik Skultety (20):
  virlog: Rename virLogParse* to virLogParseAndDefine*
  virlog: Introduce virLogOutputNew
  virlog: Introduce virLogFilterNew
  virlog: Introduce virLogFindOutput
  virlog: Introduce virLogDefineOutputs
  virlog: Introduce virLogDefineFilters
  virlog: Introduce virLogNewOutputTo* as a replacement for
    virLogAddOutputTo*
  virlog: Take a special care of syslog when setting new set of log
    outputs
  virlog: Introduce virLogParseOutput
  virlog: Introduce virLogParseFilter
  virlog: Introduce virLogParseOutputs
  virlog: Introduce virLogParseFilters
  virlog: Introduce virLogSetOutputs
  virlog: Introduce virLogSetFilters
  daemon: Split output parsing and output defining
  daemon: Split filter parsing and filter defining
  virlog: Remove functions that aren't used anywhere anymore
  virlog: Make some of the methods static
  virlog: Store the journald fd within the output object
  virlog: Split parsing and setting priority

 daemon/libvirtd.c         |    8 +-
 src/libvirt_private.syms  |   10 +-
 src/locking/lock_daemon.c |    8 +-
 src/logging/log_daemon.c  |    8 +-
 src/util/virlog.c         | 1079 ++++++++++++++++++++++++++-------------------
 src/util/virlog.h         |   61 +--
 tests/eventtest.c         |    3 +-
 tests/testutils.c         |   11 +-
 tests/virlogtest.c        |   10 +-
 9 files changed, 702 insertions(+), 496 deletions(-)

-- 
2.5.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]