b26fa1a2fbcfee7d03b0c8fd15ec3aa64ae70b9f |
|
10-Feb-2016 |
Daniel Mack <daniel@zonque.org> |
tree-wide: remove Emacs lines from all files
This should be handled fine now by .dir-locals.el, so need to carry that
stuff in every file. |
ecb6105a1bd8445a123343827d46bb527bcca92f |
|
08-Feb-2016 |
Klearchos Chaloulos <klearchos.chaloulos@nokia.com> |
journal: Drop monotonicity check when appending to journal file
Remove the check that triggers rotation of the journal file when the arriving log entry had a monotonic timestamp smaller that the previous log entry. This check causes unnecessary rotations when journal-remote was receiving from multiple senders, therefore monotonicity can not be guaranteed. Also, it does not offer any useful functionality for systemd-journald. |
31981791c543c54aca12973e955924d525e8f1eb |
|
06-Feb-2016 |
Vito Caputo <vcaputo@gnugeneration.com> |
journal: add missing space to switch statement |
90d222c190fc9d4c91f04a1bf0c90c259dcff6d2 |
|
05-Feb-2016 |
Vito Caputo <vito.caputo@coreos.com> |
journal: add asserts on f->(data|field)_hash_table
Functions dereferencing these members should assert their non-NULL state. |
c88cc6af706f563bec799c892f1ce84c91626a2a |
|
05-Feb-2016 |
Vito Caputo <vito.caputo@coreos.com> |
journal: add asserts for f->header
Just some additional asserts in functions dereferencing f->header. |
e167d7fd8d5fe918b6d675e16aeca2c43398a5b2 |
|
26-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
journald: minor fixes
This primarily contains some minor coding style fixups for 7a24f3bf2fb181243a1957a0cdd54cd919396793 and earlier changes. Specifically:
* Don't log at log levels above LOG_DEBUG from "library" code like journal-file.c
* Don't negate errno values before passing them to log_debug_errno(), as the call can handle this fine anyway
* Cast some calls we knowingly ignore the return values of to (void)
* Don't clobber function call-by-ref return values on failure
* Don't mix function calls and variable declarations in one line
There's also one more relevant change: when failing to enqueue a journal change fs event, we'll run it immediately. |
7a24f3bf2fb181243a1957a0cdd54cd919396793 |
|
15-Jan-2016 |
Vito Caputo <vito.caputo@coreos.com> |
journal: coalesce ftruncate()s in 250ms windows
Prior to this change every journal append causes an ftruncate() for the
sake of inotify propagation of the mmap-based writes.
With this change the notification is deferred up to ~250ms, coalescing
any repeated journal writes during the deferred period into a single
ftruncate(). The ftruncate() call isn't free and doing it on every
append adds unnecessary overhead and latency in the journald event loop.
Introduces journal_file_enable_post_change_timer() which manages a
timer on the provided sd-event instance for scheduling coalesced
ftruncates. The ftruncate() behavior is unchanged unless
journal_file_enable_post_change_timer() is called on the JournalFile.
While not a tremendous improvement, profiling systemd-journald event loop
latencies using instrumentation as introduced by 34b8751 it was observed that
coalescing the ftruncates was low-hanging fruit worth pursuing.
Note orders 12 and 13 shifting left into order 11 and order 6 dipping into
order 5:
Unmodified:
log2(us) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
-----------------------------------------------------------
[10685.414572] 0 0 0 0 38 602 61 2 290 60 1643 2554 13 1 4 1 0 0 1
[10690.415114] 0 0 0 0 0 646 54 7 309 44 2073 2148 17 1 3 0 0 0 1
[10695.415509] 0 0 0 0 1 650 73 3 324 37 2071 2270 9 0 0 1 0 1 0
[10700.416297] 0 0 0 0 0 659 50 4 318 38 2111 2152 6 0 1 0 0 1 1
[10705.417136] 0 0 0 0 2 660 48 4 320 38 2129 2146 12 1 1 0 0 1 1
[10710.489114] 0 0 0 0 0 673 38 3 321 37 1925 2339 7 0 0 0 0 1 1
[10715.489613] 0 0 0 0 3 656 64 8 317 48 2365 2007 7 0 0 0 0 0 1
Coalesced:
log2(us) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
-----------------------------------------------------------
[ 6169.161360] 0 0 0 1 24 786 54 11 389 24 4192 771 6 4 0 0 1 0 1
[ 6174.161705] 0 0 0 1 18 800 35 6 380 27 3977 893 3 1 0 0 1 0 1
[ 6179.162741] 0 0 0 1 28 768 51 4 391 16 3998 831 5 3 0 0 0 0 2
[ 6184.162856] 0 0 0 0 19 770 60 2 376 26 3795 1004 9 5 1 0 1 0 1
[ 6189.163279] 0 0 0 0 28 761 49 7 372 27 3729 1056 3 2 0 0 1 0 1
[ 6194.164255] 0 0 0 0 25 785 49 7 394 19 3996 908 6 3 2 0 0 0 1
[ 6199.164658] 0 0 0 0 29 797 35 5 389 18 3995 898 3 4 1 1 1 0 1
The remaining high-order delays are a result of the synchronous fsyncs in
systemd-journald, beyond the scope of this commit. |
5d6f46b6bf7804af8c1ba780f72a37dc37193428 |
|
13-Dec-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal: add dst_allocated_size parameter for compress_blob
compress_blob took src, src_size, dst and *dst_size, but dst_size
wasn't used as an input parameter with the size of dst, but only as an
output parameter. dst was implicitly assumed to be at least src_size-1.
This code wasn't *wrong*, because the only real caller in
journal-file.c got it right. But it was misleading, and the tests in
test-compress.c got it wrong, and worked only because the output
buffer happened to be the same size as input buffer. So add a seperate
dst_allocated_size parameter to make it explicit what the size of the
buffer is, and to allow test to proceed with different output buffer
sizes. |
f649045c10ace1b49cb6fbefdc33747a1aab28bc |
|
10-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
journal: make mmap_cache_unref() a NOP when NULL is passed, like all other destructors |
16098e93792912f0086e365730972b9974633277 |
|
06-Nov-2015 |
Michael Olbrich <m.olbrich@pengutronix.de> |
journal: reduce minimum journal file size to 512 KiB
For low end embedded systems 4 MiB for each journal file is a lot of
memory. Journald will use at least 512 KiB even if JOURNAL_FILE_SIZE_MIN is
set to less than that so just use 512 KiB. |
cfb571f30fd415304b2f674f1615dc861058c347 |
|
03-Nov-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal: return better error for empty files
When reading stuff, we should only return EIO when an actual read error
occured, not when we don't like the data for whatever reason.
We already return ENODATA for all other kinds of file truncation, hence
do the same for the most obvious kind, so that callers know what ENODATA
means. |
b5efdb8af40ea759a1ea584c1bc44ecc81dd00ce |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out allocation calls into alloc-util.[ch] |
c8b3094de58e3b1e37d06f3d56c9346cffbe320a |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out file attribute calls to chattr-util.[ch] |
89a5a90cb0935cdad84a0b98d41789ad879d0d83 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split xattr-related calls into xattr-util.[ch] |
6bedfcbb2970e06a4d3280c8fb62083d252ede73 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split string parsing related calls from util.[ch] into parse-util.[ch] |
3ffd4af22052963e7a29431721ee204e634bea75 |
|
25-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out fd-related operations into fd-util.[ch]
There are more than enough to deserve their own .c file, hence move them
over. |
07630cea1f3a845c09309f197ac7c4f11edd3b62 |
|
24-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split our string related calls from util.[ch] into its own file string-util.[ch]
There are more than enough calls doing string manipulations to deserve
its own files, hence do something about it.
This patch also sorts the #include blocks of all files that needed to be
updated, according to the sorting suggestions from CODING_STYLE. Since
pretty much every file needs our string manipulation functions this
effectively means that most files have sorted #include blocks now.
Also touches a few unrelated include files. |
0240c603691e006165d8687d6a2c70859755b11f |
|
24-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
journal: irrelevant coding style fixes |
d1afbcd22170e95c79261340071d376fe41fc3af |
|
24-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
journal: fix error handling when compressing journal objects
Let's make sure we handle compression errors properly, and don't
misunderstand an error for success.
Also, let's actually compress things if lz4 is enabled.
Fixes #1662. |
8580d1f73db36e9383e674e388b4fb55828c0c66 |
|
02-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
journal: rework vacuuming logic
Implement a maximum limit on number of journal files to keep around.
Enforcing a limit is useful on this since our performance when viewing
pays a heavy penalty for each journal file to interleve. This setting is
turned on now by default, and set to 100.
Also, actully implement what 348ced909724a1331b85d57aede80a102a00e428
promised: use whatever we find on disk at startup as lower bound on how
much disk space we can use. That commit introduced some provisions to
implement this, but actually never did.
This also adds "journalctl --vacuum-files=" to vacuum files on disk by
their number explicitly. |
65089b82401cd395786a7987c470056ff3f01151 |
|
02-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
journal: improve some messages
Indicate that we are ignoring errors, when we ignore them, and log that
at LOG_WARNING level.
Use the right error code for the log message. |
070052aba36e5e90d67141110fdcaf5014e36362 |
|
02-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
journal: simplify things by using the LESS_BY() macro |
804ae586d475d77946debb22c1bc9ee049d4750c |
|
02-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
journal: make journal_file_close() return NULL
The way it is customary everywhere else in our sources. |
59f448cf15f94bc5ebfd5b254de6f2441d02fbec |
|
10-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: never use the off_t unless glibc makes us use it
off_t is a really weird type as it is usually 64bit these days (at least
in sane programs), but could theoretically be 32bit. We don't support
off_t as 32bit builds though, but still constantly deal with safely
converting from off_t to other types and back for no point.
Hence, never use the type anymore. Always use uint64_t instead. This has
various benefits, including that we can expose these values directly as
D-Bus properties, and also that the values parse the same in all cases. |
dc4ebc0787a299f064553e6d28a7f35574ce1c2a |
|
17-Aug-2015 |
Markus Elfring <elfring@users.sourceforge.net> |
Bug #944: Deletion of unnecessary checks before calls of the function "free"
The function "free" is documented in the way that no action shall occur for
a passed null pointer. It is therefore not needed that a function caller
repeats a corresponding check.
http://stackoverflow.com/questions/18775608/free-a-null-pointer-anyway-or-check-first
This issue was fixed by using the software Coccinelle 1.0.1. |
dade37d403f1b8c1d7bb2efbe2361f2a3e999613 |
|
24-Jul-2015 |
Lennart Poettering <lennart@poettering.net> |
journal: avoid mapping empty data and field hash tables
When a new journal file is created we write the header first, then sync
and only then create the data and field hash tables in them. That means
to other processes it might appear that the files have a valid header
but not data and field hash tables. Our reader code should be able to
deal with this.
With this change we'll not map the two hash tables right-away after
opening a file for reading anymore (because that will of course fail if
the objects are missing), but delay this until the first time we access
them. On top of that, when we want to look something up in the hash
tables and we notice they aren't initialized yet, we consider them
empty.
This improves handling of some journal files reported in #487. |
fc68c92973e5437ee0489c1bc80d80f0a7b6ca0b |
|
22-Apr-2015 |
Lennart Poettering <lennart@poettering.net> |
journal: don't force FS_NOCOW_FL on new journal files, but warn if it is missing
This way users have the freedom to set or unset the FS_NOCOW_FL flag on
their journal files by setting it on the journal directory. Since our
default tmpfiles configuration now sets this flag on the directory the
flag is set by default on new files, however people can opt-out of this
by masking the tmpfiles file for it. |
3df3e884ae1237ef0d4d23b0e80f4ffda95ac135 |
|
11-Apr-2015 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
shared: add random-util.[ch] |
1ed8f8c16da99551c6731764759878a0bc243fde |
|
08-Apr-2015 |
Lennart Poettering <lennart@poettering.net> |
util: merge change_attr_fd() and chattr_fd() |
a7f7d1bde43fc825c49afea3f946f5b4b3d563e0 |
|
27-Mar-2015 |
Harald Hoyer <harald@redhat.com> |
fix gcc warnings about uninitialized variables
like:
src/shared/install.c: In function ‘unit_file_lookup_state’:
src/shared/install.c:1861:16: warning: ‘r’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
return r < 0 ? r : state;
^
src/shared/install.c:1796:13: note: ‘r’ was declared here
int r;
^ |
977eaa1eae53af7f418d87fcb42f4a4d34aad739 |
|
10-Mar-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal: fix return code
Introduced in fa6ac76083b8ff.
Might be related to CID #1261724, but I don't know if coverity can
recurse this deep. |
d587eca5104b212793b310d8590db480f1004d3a |
|
10-Mar-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-file: update format string to remove cast |
288359dba1417703c7eaf008f153339c6c321412 |
|
10-Mar-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal: align comments to make them more legible |
65eae3b76243d2dfd869f8c43b787575f7b4b994 |
|
02-Mar-2015 |
Cristian RodrÃguez <crrodriguez@opensuse.org> |
journal: fix Inappropriate ioctl for device on ext4
Logs constantly show
systemd-journald[395]: Failed to set file attributes: Inappropriate ioctl for device
This is because ext4 does not support FS_NOCOW_FL.
[zj: fold into one conditional as suggested on the ML and
fix (preexisting) r/errno confusion in error message.] |
950c07d421c04e5aae99973479f4f13131fb45e1 |
|
25-Feb-2015 |
Michal Schmidt <mschmidt@redhat.com> |
journal: make skipping of exhausted journal files effective again
Commit 668c965af "journal: skipping of exhausted journal files is bad if
direction changed" fixed a correctness issue, but it also significantly
limited the cases where the optimization that skips exhausted journal
files could apply.
As a result, some journalctl queries are much slower in v219 than in v218.
(e.g. queries where a "--since" cutoff should have quickly eliminated
older journal files from consideration, but didn't.)
If already in the initial iteration find_location_with_matches() finds
no entry, the journal file's location is not updated. This is fine,
except that:
- We must update at least f->last_direction. The optimization relies on
it. Let's separate that from journal_file_save_location() and update
it immediately after the direction checks.
- The optimization was conditional on "f->current_offset > 0", but it
would always be 0 in this scenario. This check is unnecessary for the
optimization. |
2eec67acbb00593e414549a7e5b35eb7dd776b1b |
|
23-Feb-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
remove unused includes
This patch removes includes that are not used. The removals were found with
include-what-you-use which checks if any of the symbols from a header is
in use. |
2a560338c471f47ca0caf6f1ec8c54a61e005d7f |
|
10-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
journald: don't specify inline in local functions
Leave it to the compiler to figure out whether it shall inline stuff or
not.
Only place where using static inline is OK to use is in in header
files, really. |
8facc3498ed037f842891ff55d1f60fe834f4ba0 |
|
22-Jan-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Fix some format strings for enums, they are signed |
d61b600dde1f267a408440011aa980e0ed44bea6 |
|
08-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
util: make it easy to initialize the crtime from the current time in fd_setcrtime() |
11689d2a021d95a8447d938180e0962cd9439763 |
|
08-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
journald: turn off COW for journal files on btrfs
btrfs' COW logic results in heavily fragment journal files, which is
detrimental for perfomance. Hence, turn off COW for journal files as we
create them.
Turning off COW comes at the cost of data integrity guarantees, but this
should be acceptable, given that we do our own checksumming, and
generally have a pretty conservative write pattern.
Also see discussion on linux-btrfs:
http://www.spinics.net/lists/linux-btrfs/msg41001.html |
b9a1617d75c16a48cccf4ff135013dca9af94e7d |
|
06-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
journal: consider file deletion errors a reason for rotation |
f27a386430cc7a27ebd06899d93310fb3bd4cee7 |
|
06-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
journald: whenever we rotate a file, btrfs defrag it
Our write pattern is quite awful for CoW file systems (btrfs...), as we
keep updating file parts in the beginning of the file. This results in
fragmented journal files. Hence: when rotating files, defragment them,
since at that point we know that no further write accesses will be made. |
2678031a179a9b91fc799f8ef951a548c66c4b49 |
|
05-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
journald: when we detect the journal file we are about to write to has been deleted, rotate
https://bugzilla.redhat.com/show_bug.cgi?id=1171719 |
805d14864f8d6936202b85730a7d8a77317d1202 |
|
05-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
journald: add some additional checks before we divide by values read from journal file headers
Since the file headers might be replaced by zeroed pages now due to
sigbus we should make sure we don't end up dividing by zero because we
don't check values read from journal file headers for changes. |
fa6ac76083b8ffc1309876459f54f9f0e2843731 |
|
05-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
journald: process SIGBUS for the memory maps we set up
Even though we use fallocate() it appears that file systems like btrfs
will trigger SIGBUS on certain low-disk-space situation. We should
handle that, hence catch the signal, add it to a list of invalidated
pages, and replace the page with an empty memory area. After each write
check if SIGBUS was triggered, and consider the write invalid if it was.
This should make journald a lot more robust with file systems where
fallocate() is not reliable, for example all CoW file systems
(btrfs...), where changing written data can fail with disk full errors.
https://bugzilla.redhat.com/show_bug.cgi?id=1045810 |
4a4d89b682d2a8d32e899c4b47950f64df74fb7c |
|
24-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
util: make creation time xattr logic more generic |
f534928ad7aaeec0bec2d653b4a50e79b0fc8418 |
|
18-Dec-2014 |
Michal Schmidt <mschmidt@redhat.com> |
journal: journal_file_next_entry() does not need pointer to current Object
The current offset is sufficient information. |
d8ae66d7faee23a74a69119270bf622100705f72 |
|
18-Dec-2014 |
Michal Schmidt <mschmidt@redhat.com> |
journal: compare candidate entries using JournalFiles' locations
When comparing the locations of candidate entries, we can rely on the
location information stored in struct JournalFile. |
6573ef05a3cbe15949acfbbf1ad03726068907bd |
|
18-Dec-2014 |
Michal Schmidt <mschmidt@redhat.com> |
journal: keep per-JournalFile location info during iteration
In next_beyond_location() when we find a candidate entry in a journal
file, save its location information in struct JournalFile.
The purpose of remembering the locations of candidate entries is to be
able to save work in the next iteration. This patch does only the
remembering part.
LOCATION_SEEK means the location identifies a candidate entry.
When a winner is picked from among candidates, it becomes
LOCATION_DISCRETE.
LOCATION_TAIL here signifies we've iterated the file to the end (or the
beginning in the case of reversed direction). |
1fc605b0e130149a44abfa38c33f4535cfe548ea |
|
18-Dec-2014 |
Michal Schmidt <mschmidt@redhat.com> |
journal: abstract the resetting of JournalFile's location |
14499361a537f769fadfb2e9323c8a65d31e6862 |
|
18-Dec-2014 |
Michal Schmidt <mschmidt@redhat.com> |
journal: delete unused function journal_file_skip_entry()
Its only caller is a test. |
ae2adbcd09bd383b5a18728dfd32cf604c2c910e |
|
18-Dec-2014 |
Michal Schmidt <mschmidt@redhat.com> |
journal: delete unused function journal_file_move_to_entry_by_offset() |
69adae5168da231c6cf319f708860954701b25ed |
|
13-Dec-2014 |
Michal Schmidt <mschmidt@redhat.com> |
journal: replace contexts hashmap with a plain array
try_context() is such a hot path that the hashmap lookup is expensive.
The number of contexts is small - it is the number of object types.
Using a hashmap is overkill. A plain array will do.
Before:
$ time ./journalctl --since=2014-06-01 --until=2014-07-01 > /dev/null
real 0m9.445s
user 0m9.228s
sys 0m0.213s
After:
$ time ./journalctl --since=2014-06-01 --until=2014-07-01 > /dev/null
real 0m5.438s
user 0m5.266s
sys 0m0.170s |
7a9dabea7eabd4dd87f8774234265590d34761da |
|
13-Dec-2014 |
Michal Schmidt <mschmidt@redhat.com> |
journal: push type_to_context conversion down to journal_file_move_to() |
7851983162ef851d5b9ce12bd88de86fc402f88a |
|
13-Dec-2014 |
Michal Schmidt <mschmidt@redhat.com> |
journal: have a named enum ObjectType |
d05089d86ef032b245c7f928e623b88c82998ab0 |
|
13-Dec-2014 |
Michal Schmidt <mschmidt@redhat.com> |
journal: consistently use OBJECT_<type> names instead of numbers
Note that numbers 0 and -1 are both replaced with OBJECT_UNUSED,
because they are treated the same everywhere (e.g. type_to_context()
translates them both to 0). |
d3d3208f607693b8fde5226efa0cc15ec17670a0 |
|
13-Dec-2014 |
Michal Schmidt <mschmidt@redhat.com> |
journal: move type_to_context() to journal-file.c
It has no other callers. It does not need to be in the header file. |
1b8951e5bd9b2bf1722098a861055cae0bb52088 |
|
13-Dec-2014 |
Michal Schmidt <mschmidt@redhat.com> |
journal: remove journal_file_object_keep/release functions
The only user is sd_journal_enumerate_unique() and, as explained in
the previous commit (fed67c38e3 "journal: map objects to context set by
caller, not by actual object type"), the use of them there is now
superfluous. Let's remove them.
This reverts major parts of commits:
ae97089d49 journal: fix access to munmapped memory in
sd_journal_enumerate_unique
06cc69d44c sd-journal: fix sd_journal_enumerate_unique skipping values
Tested with an "--enable-debug" build and "journalctl --list-boots".
It gives the expected number of results. Additionally, if I then revert
the previous commit ("journal: map objects to context set by caller, not
to actual object type"), it crashes with SIGSEGV, as expected. |
fed67c38e3f1cecf4c0571f5603d47b35bff6576 |
|
13-Dec-2014 |
Michal Schmidt <mschmidt@redhat.com> |
journal: map objects to context set by caller, not by actual object type
When the caller of journal_file_move_to_object() specifies type==0,
the object header is at first mapped in context 0. Then after the header
is checked, the whole object is mapped in a context determined by
the actual object type (which is not even range-checked using
type_to_context()). This looks wrong. It should map in the
caller-specified context.
An old comment in sd_journal_enumerate_unique() supports this view:
/* We do not use the type context here, but 0 instead,
* so that we can look at this data object at the same
* time as one on another file */
Clearly the expectation was that the data object will remain mapped
in context 0 without being pushed away by mapping other objects in
context OBJECT_DATA.
I suspect that this was the real bug that got fixed by ae97089d49
"journal: fix access to munmapped memory in sd_journal_enumerate_unique".
In other words, journal_file_object_keep/release are superfluous after
applying this patch. |
7517e17443225fafea86b21e42a36af69feb1dbc |
|
11-Dec-2014 |
Torstein Husebø <torstein@huseboe.net> |
journald: correct spacing near eol code comments |
2173cbf847fc53ca24950e77958c902edecfc207 |
|
08-Dec-2014 |
Olivier Brunel <jjk@jjacky.com> |
journal: Fix navigating backwards missing entries
With DIRECTION_UP (i.e. navigating backwards) in generic_array_bisect() when the
needle was found as the last item in the array, it wasn't actually processed as
match, resulting in entries being missed.
https://bugs.freedesktop.org/show_bug.cgi?id=86855 |
56f64d95763a799ba4475daf44d8e9f72a1bd474 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: use log_*_errno whenever %m is in the format string
If the format string contains %m, clearly errno must have a meaningful
value, so we might as well use log_*_errno to have ERRNO= logged.
Using:
find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/'
Plus some whitespace, linewrap, and indent adjustments. |
294330896d1ad26c10eecf6c3bf20d73b5ec624b |
|
27-Oct-2014 |
Lennart Poettering <lennart@poettering.net> |
journald: be nice to coverity, add an extra assert
coverity otherwise assumes that the chain object might be NULL. |
4743015db6ad394bd43efadb0651e3906b4efc25 |
|
23-Oct-2014 |
Michal Schmidt <mschmidt@redhat.com> |
journal: make JournalFile::chain_cache an OrderedHashmap
The order of entries may matter here. Oldest entries are evicted first
when the cache is full.
(Though I don't see anything to rejuvenate entries on cache hits.) |
06cc69d44c8ff2b652527357f28acd4cbe77c814 |
|
10-Oct-2014 |
Jan Janssen <medhefgo@web.de> |
sd-journal: fix sd_journal_enumerate_unique skipping values
sd_journal_enumerate_unique will lock its mmap window to prevent it
from being released by calling mmap_cache_get with keep_always=true.
This call may return windows that are wider, but compatible with the
parameters provided to it.
This can result in a mismatch where the window to be released cannot
properly be selected, because we have more than one window matching the
parameters of mmap_cache_release. Therefore, introduce a release_cookie
to be used when releasing the window.
https://bugs.freedesktop.org/show_bug.cgi?id=79380 |
d5099efc47d4e6ac60816b5381a5f607ab03f06e |
|
15-Sep-2014 |
Michal Schmidt <mschmidt@redhat.com> |
hashmap: introduce hash_ops to make struct Hashmap smaller
It is redundant to store 'hash' and 'compare' function pointers in
struct Hashmap separately. The functions always comprise a pair.
Store a single pointer to struct hash_ops instead.
systemd keeps hundreds of hashmaps, so this saves a little bit of
memory. |
0f99f74a14ef193c1ebde687c5cc76e1d67b85ef |
|
28-Aug-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
sd-journal: verify that object start with the field name
If the journal is corrupted, we might return an object that does
not start with the expected field name and/or is shorter than it
should. |
fa1c4b518ec7d8ec2d647213ee651cde4d6c9d7e |
|
04-Aug-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Fix misuse of uint64_t as size_t
They have different size on 32 bit, so they are really not interchangable. |
b3306e9c3c1e036396bc6bf74555eecea3f45ad9 |
|
16-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal: allow files with no data whatsoever
If a file was opened for writing, and then closed immediately without
actually writing any entries, on subsequent opening, it would be
considered "corrupted". This should be totally fine, and even in
read mode, an empty file can become non-empty later on. |
3b1a55e110ab387a8d213581983e20c0a63d7894 |
|
11-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Fix build without any compression enabled |
92261977d81fd6a5bfb1418eddd86582d8a57fcd |
|
09-Jul-2014 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
fix #ifdef |
d89c8fdf48c7bad5816b9f2e77e8361721f22517 |
|
07-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal: add LZ4 as optional compressor
Add liblz4 as an optional dependency when requested with --enable-lz4,
and use it in preference to liblzma for journal blob and coredump
compression. To retain backwards compatibility, XZ is used to
decompress old blobs.
Things will function correctly only with lz4-119.
Based on the benchmarks found on the web, lz4 seems to be the best
choice for "quick" compressors atm.
For pkg-config status, see http://code.google.com/p/lz4/issues/detail?id=135. |
d2edfae0f9bdbecf6a8518e2a5bcf06f470e0d9e |
|
28-May-2014 |
Kay Sievers <kay@vrfy.org> |
build-sys: use glibc's xattr support instead of requiring libattr |
03e334a1c7dc8c20c38902aa039440763acc9b17 |
|
18-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
util: replace close_nointr_nofail() by a more useful safe_close()
safe_close() automatically becomes a NOP when a negative fd is passed,
and returns -1 unconditionally. This makes it easy to write lines like
this:
fd = safe_close(fd);
Which will close an fd if it is open, and reset the fd variable
correctly.
By making use of this new scheme we can drop a > 200 lines of code that
was required to test for non-negative fds or to reset the closed fd
variable afterwards. |
fb099c8d2af6620db2709e826a258089d10cdfe8 |
|
05-Mar-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal: assume that next entry is after previous entry
With a corrupted file, we can get in a situation where two entries
in the entry array point to the same object. Then journal_file_next_entry
will find the first one using generic_arrray_bisect, and try to move to
the second one, but since the address is the same, generic_array_get will
return the first one. journal_file_next_entry ends up in an infinite loop.
https://bugzilla.redhat.com/show_bug.cgi?id=1047039 |
bdd13f6be4b588568683a1ab54f421fc6a636dbb |
|
25-Feb-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Remove dead lines in various places
As pointed-out by clang -Wunreachable-code.
No behaviour changes. |
748db5928c573fd699cd88f32fe21a456fa46d3e |
|
20-Feb-2014 |
Daniel Mack <zonque@gmail.com> |
journal: fix compiler warning in journal_file_append_data()
gcc (4.8.2, arm) does not understand that journal_file_append_field()
will always set 'fo' when it returns 0, so this warning is bogus.
Anyway, fix it by initialiting fo = NULL. |
29804cc1e0f37ee34301530fd7f1eb8550be464e |
|
31-Jan-2014 |
Greg KH <gregkh@linuxfoundation.org> |
use memzero(foo, length); for all memset(foo, 0, length); calls
In trying to track down a stupid linker bug, I noticed a bunch of
memset() calls that should be using memzero() to make it more "obvious"
that the options are correct (i.e. 0 is not the length, but the data to
set). So fix up all current calls to memset(foo, 0, length) to
memzero(foo, length). |
ae97089d49d1795a35a443b7b830ee666028e733 |
|
11-Jan-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal: fix access to munmapped memory in sd_journal_enumerate_unique
sd_j_e_u needs to keep a reference to an object while comparing it
with possibly duplicate objects in other files. Because the size of
mmap cache is limited, with enough files and object to compare to,
at some point the object being compared would be munmapped, resulting
in a segmentation fault.
Fix this issue by turning keep_always into a reference count that can
be increased and decreased. Other callers which set keep_always=true
are unmodified: their references are never released but are ignored
when the whole file is closed, which happens at some point. keep_always
is increased in sd_j_e_u and later on released. |
af13a6b0606f166c93cafc9892343f167f880281 |
|
05-Jan-2014 |
George McCollister <george.mccollister@gmail.com> |
journal: Add missing byte order conversions
Convert entry_array.items[0] to host byte order prior to passing it to
chain_cache_put().
[zj: also use le64toh in journal-verify.c]
https://bugs.freedesktop.org/show_bug.cgi?id=73194 |
9bf3b53533cdc9b95c921b71da755401f223f765 |
|
22-Dec-2013 |
Lennart Poettering <lennart@poettering.net> |
shared: switch our hash table implementation over to SipHash
SipHash appears to be the new gold standard for hashing smaller strings
for hashtables these days, so let's make use of it. |
0d647f7f73fa17074a1df81e2bdd00877554e436 |
|
17-Dec-2013 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
journal-file.c: remove redundant assignment of variable
we also do 'last_index = (uint64_t) -1;' at the end of the while
loop so there is no reason to also do it here. |
08c6f819cb0ed435649583da02fa0de965b32dbe |
|
17-Dec-2013 |
Shawn Landden <shawn@churchofgit.com> |
journal: fix against (theoretical) undefined behavior
While all the libc implementations I know return NULL when memchr's size
parameter is 0, without accessing any memory, passing NULL to memchr is
still invalid:
C11 7.24.1p2: Where an argument declared as "size_t n" specifies the length
of the array for a function, n can have the value zero on a call to that
function. Unless explicitly stated otherwise in the description of a
particular function in this subclause, pointer arguments on such a call
shall still have valid values, as described in 7.1.4. On such a call, a
function that locates a character finds no occurrence, a function that
compares two character sequences returns zero, and a function that copies
characters copies zero characters.
see http://llvm.org/bugs/show_bug.cgi?id=18247 |
4faa70046ca0c1775c8e231179716a78cf3291b1 |
|
16-Dec-2013 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
journal-file: protect against alloca(0) |
eda4b58b50509dc8ad0428a46e20f6c5cf516d58 |
|
27-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
journal: simplify pre-allocation logic
let's just do a single fallocate() as far as possible, and don't
distuingish between allocated space and file size.
This way we can save a syscall for each append, which makes quite some
benefits. |
248c78c79c5cca9b981800d816a77591e504066a |
|
27-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
journal: allow journal_file_copy_entry() to work on non-local files |
e5462cd80e5328a769137c261c93931ea0c27bab |
|
27-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
journal: fix iteration when we go backwards from the beginning of an array chain element |
f268980d2cee694fa4118a71402a47c316af0425 |
|
26-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
journal: optimize bisection logic a bit by caching the last position
This way we can do a quick restart limiting a bit how wildly we need to
jump around during the bisection process. |
b8e891e699e1336c5527f8203e4e8f67c9bbeb84 |
|
26-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
journal: make table const |
a676e66535e12458ea6d366a653f8dd60f982504 |
|
26-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
journal: when appending to journal file, allocate larger blocks at once |
9588bc32096fc8342bfd8b989689717186d7d86e |
|
08-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
Remove dead code and unexport some calls
"make check-api-unused" informs us about code that is not used anymore
or that is exported but only used internally. Fix these all over the
place. |
7ff7394d9e4e9189c30fd018235e6b1728c6f2d0 |
|
13-Oct-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Never call qsort on potentially NULL arrays
This extends 62678ded 'efi: never call qsort on potentially
NULL arrays' to all other places where qsort is used and it
is not obvious that the count is non-zero. |
57535f4703b5de5d03ad6e35bd06247d378f46fe |
|
10-Oct-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journald: replace new+snprintf with asprintf |
8c92d4bbc7a538ada11d7e85016cce141beb0e6c |
|
02-Oct-2013 |
Lennart Poettering <lennart@poettering.net> |
journald: add missing error check |
718fe4b1d50f89cbc11318edb0c2c3de9be2ac34 |
|
18-Jun-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: properly print headers of empty journals |
ed375bebf46c1251f4baa170b39ee93761dbdb19 |
|
10-Jun-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: print monotonic timestamp in --header |
2765b7bb6924e2c26c7bf60bd692a4bc121d9582 |
|
10-Jun-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journalctl: print proper IDs with --header
The same buffer was used for two different IDs, messing up
the output. |
507f22bd0172bff5e5d98145b1419bd472a2c57f |
|
10-Jun-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Use stdint.h macros instead of casts to print uint64_t values
Casts are visually heavy, and can obscure unwanted truncations. |
253f59dff9c93ee1d2c33444b5715e42bc1c6889 |
|
07-May-2013 |
Lennart Poettering <lennart@poettering.net> |
journald: be more careful when we try to flush the runtime journal to disk and the disk is close to being full
Bump the minimal size of the journal so that we can be sure creating the
journal file will always succeed. Previously the minimum size was
smaller than a empty jounral file... |
47838ab3250d975cf4c23819ee695ed0e9861c04 |
|
04-May-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal: as a µ-opt, use sizeof instead of strlen |
8621b1109b0bbe097f2b3bfce2211fe8474c567b |
|
03-May-2013 |
Colin Guthrie <colin@mageia.org> |
journal: Set the default keep free value to 15% (up from 5%)
As some SSDs are still seeing performance degredation when
reaching 85% usage the default value of 5% seems a little low.
Set this to 15% by default. |
44a6b1b68029833893f6e9cee35aa27a974038f6 |
|
03-May-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Add __attribute__((const, pure, format)) in various places
I'm assuming that it's fine if a _const_ or _pure_ function
calls assert. It is assumed that the assert won't trigger,
and even if it does, it can only trigger on the first call
with a given set of parameters, and we don't care if the
compiler moves the order of calls. |
9607d9470eec07df817e58f64d312ccb5ac4cfcc |
|
02-Apr-2013 |
Cristian RodrÃguez <crrodriguez@opensuse.org> |
Always use our own MAX/MIN definitions
code in src/shared/macro.h only defined MAX/MIN in case
they were not defined previously. however the MAX/MIN
macros implemented in glibc are not of the "safe" kind but defined
as:
define MIN(a,b) (((a)<(b))?(a):(b))
define MAX(a,b) (((a)>(b))?(a):(b))
Avoid nasty side effects by using our own versions instead.
Also fix the warnings derived from this change.
[zj: - modify MAX3 macro to fix warning about _a shadowing _a,
- do bootchart/svg.c too,
- remove unused MIN3.] |
26687bf8a907009dedcff79346860ed41511405e |
|
25-Mar-2013 |
Oleksii Shevchuk <alxchk@gmail.com> |
journal: Add sync timer to journal server
Add option to force journal sync with fsync. Default timeout is 5min.
Interval configured via SyncIntervalSec option at journal.conf. Synced
journal files will be marked as OFFLINE.
Manual sync can be performed via sending SIGUSR1. |
93b73b064c663d6248bebfbbbd82989b5ca10fc5 |
|
21-Nov-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: by default do not decompress dat objects larger than 64K
This introduces a new data threshold setting for sd_journal objects
which controls the maximum size of objects to decompress. This is
relieves the library from having to decompress full data objects even
if a client program is only interested in the initial part of them.
This speeds up "systemd-coredumpctl" drastically when invoked without
parameters. |
34741aa3e2ee1e67a4cc735b7492aec13f0d822c |
|
26-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: special case the trivial cache chain cache entry |
a4bcff5ba36115495994e9f9ba66074471de76ab |
|
26-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: introduce entry array chain cache
When traversing entry array chains for a bisection or for retrieving an
item by index we previously always started at the beginning of the
chain. Since we tend to look at the same chains repeatedly, let's cache
where we have been the last time, and maybe we can skip ahead with this
the next time.
This turns most bisections and index lookups from O(log(n)*log(n)) into
O(log(n)). More importantly however, we seek around on disk much less,
which is good to reduce buffer cache and seek times on rotational disks. |
0598fd4a9548fbe0b642d7ef6eb0ed490ec0ee0f |
|
18-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: suggest rotation when fields are not indexed |
3c1668da6202f1ead3d4d3981b89e9da1a0e98e3 |
|
18-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: add ability to list values a specified field can take in all entries of the journal
The new 'unique' API allows listing all unique field values that a field
specified by a field name can take in all entries of the journal. This
allows answering queries such as "What units logged to the journal?",
"What hosts have logged into the journal?", "Which boot IDs have logged
into the journal?".
Ultimately this allows implementation of tools similar to lastlog based
on journal data.
Note that listing these field values will not work for journal files
created with older journald, as the field values are not indexed in
older files. |
fb0951b02ebf51a93acf12721d8857d31ce57ba3 |
|
16-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: implement time-based rotation/vacuuming
This also enables time-based rotation (but not vacuuming) after 1month,
so that not more one month of journal is lost at a time per vacuuming. |
1f2da9ec5152cbf48c214969e079d9281ef68660 |
|
16-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: sort data items of entries by offset
This should slightly optimize disk access patterns on rotating disks for
simple readers. |
f1889c9119bd4de2f4e016a8113a1c1b2f467713 |
|
24-Sep-2012 |
Mirco Tischler <mt-ml@gmx.de> |
journal: set seal even for readonly journalfiles
journalctl needs to know wether the file has been sealed to
be able to do verification. |
0559d3a58ac25a37b832f12fbdefef58fd351270 |
|
21-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: don't allow journal_file_open() to be called with ret being NULL |
c53158818d8cdaf46b3f1b5299b9bda118a1043f |
|
13-Sep-2012 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
man: fix a bunch of typos in docs
https://bugs.freedesktop.org/show_bug.cgi?id=54501 |
b588975fb0292cbb23770d6fc2349f57ab5b0db8 |
|
13-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: never assert directly on data read from the journal |
5996c7c295e073ce21d41305169132c8aa993ad0 |
|
13-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
journald: don't reposition window if we don't have to |
49a32d43de3bd57bced22ed9a94342ea1efbb31c |
|
11-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: don't set seal flag if we don't have gcrypt built-in |
48b617399d7d8446c5310b2568b2af6f13331b4c |
|
11-Sep-2012 |
Michael Olbrich <m.olbrich@pengutronix.de> |
journal: don't try to compress without XZ
otherwise the header contains the HEADER_INCOMPATIBLE_COMPRESSED
flag even though the data is not compressed and reading the journal
fails. |
7762e02b172913e8af82f6ba013487527413be84 |
|
10-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
journald: detect invalid header pointers correctly |
a1a03e3075316e2376176fc54c74e071adc9d71a |
|
07-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: add call to determine current journal file disk usage |
2b43f939a4b3ad5aeb2650868b0234ff42ec0045 |
|
06-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
journald: avoid logging to kmsg in the normal paths |
fcde238921b857679363a95488a5a5af1dc1f243 |
|
21-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: be more careful when keeping around mmaps we still need |
feb12d3ed2c7f9132c64773c7c41b9e3a608a814 |
|
20-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: make libgcrypt dependency optional |
8088cbd3cfcf539c984d8042cd2b92ebbfda6d82 |
|
20-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: use a macro to check for file header flags |
f7fab8a5ae7a3b378040203821383f5a8fc91126 |
|
20-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: fix tag ordering check |
84168d8068bb67dcd5468ab3b376535d81643aef |
|
18-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
mmap: resize arrays dynamically |
fb9a24b6b1ed5b1f42e6e350ccdb7e11800a83bd |
|
18-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: even more simple static object tests |
c586dbf110abdbf0317bdd0f0a5900d709194409 |
|
18-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: fix verification without key |
db11ac1ab56bc13514a029e7d126c5efe2c68bc2 |
|
18-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journald: add additional simple static tests to verifier |
a0108012974558c5a7dcf8c76456be6a07b0e95d |
|
17-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: be fine with opening rotated/corrupted journal files |
3223f44f2312d01113a9c51f898528041cc7bd8d |
|
17-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: show new header fields in header dump |
baed47c3c20512507e497058d388782400a072f6 |
|
17-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: rework terminology
Let's clean up our terminology a bit. New terminology:
FSS = Forward Secure Sealing
FSPRG = Forward Secure Pseudo-Random Generator
FSS is the combination of FSPRG and a HMAC.
Sealing = process of adding authentication tags to the journal.
Verification = process of checking authentication tags to the journal.
Sealing Key = The key used for adding authentication tags to the journal.
Verification Key = The key used for checking authentication tags of the journal.
Key pair = The pair of Sealing Key and Verification Key
Internally, the Sealing Key is the combination of the FSPRG State plus
change interval/start time.
Internally, the Verification Key is the combination of the FSPRG Seed
plus change interval/start time. |
14d10188de1fd58e663d73683a400d8d7dc67dba |
|
16-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: add FSPRG journal authentication |
b7c9ae91d111b3e89d1ffc00e08f9ed97a8ff5db |
|
16-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: parse fsprg seed |
2dee23ebe09965308c67a661ed0a8d2cc0ae1d5f |
|
16-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: count number of entry arrays in header |
27370278976735ea365c5169e8916b5eec6e6bdc |
|
16-Aug-2012 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal: rename 'mmap' to 'mmap_cache' to appease gcc
warning: declaration of 'mmap' shadows a global declaration [-Wshadow] |
f59a5f6b873d8bf994e2d85671f2554b9fdd62db |
|
16-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: verify hashes only during actual verification, not all the time |
0284adc6a60ce0af1107cb0b50041a65d731f39e |
|
16-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: split up journal-file.c |
f65425cbc4385b4f5b20ded641cbb07ad6a0938f |
|
16-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: add superficial structure verifier |
beec00856158b703f2125a3d936080346a8a8de1 |
|
16-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: implement basic journal file verification logic |
16e9f408fa9a9626059bdd6c89dc175e06b9e976 |
|
16-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: implement generic sharable mmap caching logic
instead of having one simple per-file cache implement an more
comprehensive one that works for multiple files and can actually
maintain multiple maps per file and per object type. |
d98cc1f29fbf31ccc500d6e20c29b636b9af7e0f |
|
13-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: include tag object header in hmac |
b0af6f41ea67c97b8beb16fd1d63042379bbf103 |
|
13-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: add all objects we add to HMAC |
7560fffcd2531786b9c1ca657667a43e90331326 |
|
13-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journald: initial version of FSPRG hookup
This adds forward-secure authentication of journal files. This patch
includes key generation as well as tagging of journal files,
Verification of journal files will be added in a later patch. |
64825d3c589cd8742887f30acde8c57eceac2001 |
|
08-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
fix a couple of issues found with llvm-analyze |
a1a1898f7190a25a579556826379f7486f87459b |
|
19-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: rotate busy files away when we try to write to them |
361f9cbc7e6c7d3ac41892f5a5aebd1ef4049b95 |
|
18-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: when we suggest a rotation, explain why |
dfabe643f3560dcf147f49ec11e95b95c718c3da |
|
18-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: estimate data hash table size a bit larger by default |
cd96b3b86abb4a88cac2722bdfb6e5d4413f6831 |
|
17-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: actually set archived files to archived state |
dc36ac673356534b8b32c31e1892e55b8f891381 |
|
17-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: decode more header files in --header |
4a92baf3fa97c73f04438b5814db58783f920b32 |
|
17-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: size journal data hash table based on maximum file size metrics
The default of 2047 hash table entries turned out to result in way too
many collisions for bigger files, hence scale the hash table size by the
estimated maximum file size. |
71fa6f006f92831c0c02e844b4c35e4b7197c6d6 |
|
17-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: immediately rotate when the journal was previously not closed properly |
dca6219e04505e9fa10b32e71059ce2abfae1dad |
|
17-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: automatically rotate journal files if the data hash table is full > 75%
Previously, when the main data hash table grows too full the performance
simply started to decrease drastically. Instead, now simply rotate to a
new journal file as the hash table gets to full, so that we can start
with a new fresh empty hash table. |
162566a4a12c35e1e86e35ced1748354f7ec935e |
|
16-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: use tail/head timestamps from header for cutoff logic
We have them, they are faster to use them, so use them... |
74d29da52409ab149738ea76824679d29598e0ac |
|
16-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
journald: don't enforce monotonicity of realtime clocks when copying entries
After all the point of the realtime clock (in contrast to the monotonic
clock) is that it does not have to be strictly monotonic, hence don't
enforce this when flushing the journal from /run to /var. |
cbdca8525b4f36297cb9e5cb090a9648763ed1bf |
|
13-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: beef up journal matches considerably
we now can take multiple matches, and they will apply as AND if they
apply to different fields and OR if they apply to the same fields. Also,
terms of this kind can be combined with an overreaching OR. |
91a31dde6e92c0d4c42abadf970083f6faba87ec |
|
13-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: fix seeking by realtime/seqnum |
ecf68b1d3833c2ee3156a813ad42cf155dc4ace4 |
|
13-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: fix bad memory access |
a536e2613f278970b1ab11788caf1a9a51e1a103 |
|
13-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: fix bisection logic for first entry |
10b6f904cc58c5a725f123e17819516eca606a3e |
|
17-Jun-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: fix monotonic seeking |
089842938dd0f4080084044bb9a1a3b00137926a |
|
17-Jun-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: expose and make use of cutoff times of journal
This helps explaining when the log output of "systemctl status" is
incomplete because the logs got rotated since the service was started. |
8db4213e7b38ebc54bfdc7215991cc23b9580e3a |
|
17-Jun-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: correct list link up on hash collisions |
8144056fa63291e5b25d91a48cd77b91e845eabf |
|
17-Jun-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: add basic object definition for signatures |
23b0b2b2647d3f0f3fd0219c877d6233b4585421 |
|
17-Jun-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: replace arena offset by header size |
d384c7a8741aa5dda89c6eee63bfa3107181ee17 |
|
12-Jun-2012 |
Michal Schmidt <mschmidt@redhat.com> |
journal-file: fix mmap leak
https://bugzilla.redhat.com/show_bug.cgi?id=831132 |
fec2aa2f9ee0748fdb7148613b8a359d246cc32a |
|
22-May-2012 |
Guillermo Vidal <guillermo.vidal@continental-corporation.com> |
Fixed handling of posix_fallocate() returned value
According to the man pages of posix_fallocate, it returns zero on
success or an error number on failure; however, errno is not set
on failure. If the kernel or a library other than glibc does not
support the function for example, EOPNOTSUPP will be returned and
the error will not be handled properly with original code. |
7ea07dcddafe573c699fc48171b57b912897e7e2 |
|
13-Apr-2012 |
Lennart Poettering <lennart@poettering.net> |
fix a couple of things found with the llvm static analyzer |
5430f7f2bc7330f3088b894166bf3524a067e3d8 |
|
12-Apr-2012 |
Lennart Poettering <lennart@poettering.net> |
relicense to LGPLv2.1 (with exceptions)
We finally got the OK from all contributors with non-trivial commits to
relicense systemd from GPL2+ to LGPL2.1+.
Some udev bits continue to be GPL2+ for now, but we are looking into
relicensing them too, to allow free copy/paste of all code within
systemd.
The bits that used to be MIT continue to be MIT.
The big benefit of the relicensing is that closed source code may now
link against libsystemd-login.so and friends. |
1fa80181aecd4b9db513f16c136157a4546686d3 |
|
02-Apr-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: decrease default mmap window size to allow a bigger number of journals to be traversed in parallel |
4fd052aede13eb3041277c54ac2f5dee6e6c29cf |
|
22-Mar-2012 |
Frederic Crozat <fcrozat@suse.com> |
add sparse support to detect endianness bug
le16/32/64_t type should be used when storing little-endian value
header to integrate with sparse from Josh Triplett <josh@joshtriplett.org> |
0071d9f1db6dc9a1035cf5afb81455b67ed462f6 |
|
21-Mar-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: react with immediate rotation to a couple of more errors |
b47ffcfdfd46de119e0fe8d1c48105bd7c21ddd4 |
|
15-Mar-2012 |
Lennart Poettering <lennart@poettering.net> |
man: document systemd-journald.conf(5) |
ccdbaf911196e2fc80eaa914bf22e01035ee1f3f |
|
15-Mar-2012 |
Frederic Crozat <fcrozat@suse.com> |
journal: only use uint8_t for state |
e7bf07b3d444dddf67503df56acfbdbbe3e5261a |
|
15-Mar-2012 |
Lennart Poettering <lennart@poettering.net> |
journald: be a bit more verbose |
a3a52c0fd0c2597bf8233730c3ed3408affe0c9f |
|
15-Mar-2012 |
Lennart Poettering <lennart@poettering.net> |
journald: fix calculation of disk space |
15944db87130f9b58565023c46c22bd73b0b71be |
|
15-Mar-2012 |
Lennart Poettering <lennart@poettering.net> |
journald: copy metrics/compression state from template when rotating |
71100051c5d351daac20610f3a4b8c14901088d8 |
|
15-Mar-2012 |
Lennart Poettering <lennart@poettering.net> |
journald: increase max file size to 128MB |
5c70eab445bd1af346fea4e05f1249956223b45c |
|
15-Mar-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: vacuum corrupted files, too |
9447a7f1de5e5798cf324ef26579d0dd7e601203 |
|
15-Mar-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: if we encounter a corrupted file, rotate and go on |
48496df65c3ad1e3ad055d2b4632da7b73211715 |
|
06-Mar-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: make sure to refresh window position and pointer after we linked up a data object |
7be3aa1732f76245b58f8cdfe74707f8f7f67d18 |
|
05-Mar-2012 |
Frederic Crozat <fcrozat@suse.com> |
journal: fix endianness errors |
8dc6b88fd2dad113d7dab776d623d7b301e4b754 |
|
29-Feb-2012 |
Dirk Eibach <eibach@gdsys.de> |
systemd-journald: fix endianess bug |
be19b7df6ebe9cc521e929c5de2fe74ef84f7f80 |
|
31-Jan-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: increase compression threshold for objects from 64 to 512
Apparently the perfomance price for compression is to steep to apply it
for all objects >= 64 and < 512 in size, as measured by Arjan Van De
Ven, hence increase the threshold to 512 which yields better results. |
a7bc2c2ac8d26779ed1154841545e8c0efbef31c |
|
14-Jan-2012 |
Lennart Poettering <lennart@poettering.net> |
util: introduce FORMAT_BYTES_MAX |
b785c858c3baf855ec42e3b83f5d23dadfece069 |
|
11-Jan-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: fix more 32/64 bit issues |
7f120cc6a2eeea1b695222ff6e8e83b4f14ace59 |
|
11-Jan-2012 |
Lennart Poettering <lennart@poettering.net> |
journald: don't assume size_t and uint64_t are the same |
1921a5cb3d3124d62ac397592d9f1f302ca90be5 |
|
11-Jan-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: don't realign window twice |
aaf53376aaac326b700fd3f8e28bbd842f0a9ed1 |
|
07-Jan-2012 |
Lennart Poettering <lennart@poettering.net> |
journald: remove inner loop debug message |
fd8ee359a014916ac62ae2b58f6736ccb48c6d4e |
|
04-Jan-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: it's not a problem if the realtime jumps, hence don't ensure monotonicity of realtime for entries we write |
a99c349d0d54ca4946c6f81670ab9890f2b4f497 |
|
04-Jan-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: when increasing window, make sure to use the increased window |
4bbdcdb301f8ef6f8b9e943210ab61250003c517 |
|
04-Jan-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: apply seek check before resizing window, and refresh stat data if necessary |
b788cc23aa50682fe80c1b78cc5e42aaf7d76bc5 |
|
04-Jan-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: add memory barrier before linking in newly created entries |
6c8a39b883d77a1e04f2947a2e890dfb8dd51d04 |
|
31-Dec-2011 |
Kay Sievers <kay.sievers@vrfy.org> |
journal: silence gcc warnings |
babfc09177c1e71cec6c1ef9602e265ed40cfe4f |
|
31-Dec-2011 |
Lennart Poettering <lennart@poettering.net> |
journal: automatically deduce journal metrics from file system sizes |
cf244689e9d1ab50082c9ddd0f3c4d1eb982badc |
|
29-Dec-2011 |
Lennart Poettering <lennart@poettering.net> |
journald: flush /run to /var as soon as it becomes available |
2a59ea54f136f8fcf6a4e1bdfc51448c81281a3e |
|
28-Dec-2011 |
Lennart Poettering <lennart@poettering.net> |
journal: never mmap beyond file size |
85a131e8d8aa9fe3c2115e281569bed64a4200f1 |
|
27-Dec-2011 |
Lennart Poettering <lennart@poettering.net> |
journal: fix hash table lookup logic |
440ee3665e252dc004e356da0f5b51ad26ea2cbe |
|
21-Dec-2011 |
Lennart Poettering <lennart@poettering.net> |
journal: properly handle first inline bisect array entry |
807e17f05e217b474af39503efb9503d81b12596 |
|
21-Dec-2011 |
Lennart Poettering <lennart@poettering.net> |
journal: add inline compression support with XZ |
bc85bfee87e11317fbcd1160c9003860dc6edde9 |
|
20-Dec-2011 |
Lennart Poettering <lennart@poettering.net> |
journal: fix space reservation limit enforcement |
466ccd92e2f9ad712332012e1b3643a34b006a45 |
|
20-Dec-2011 |
Lennart Poettering <lennart@poettering.net> |
journal: fix matches |
50f20cfdb0f127e415ab38c024d9ca7a3602f74b |
|
19-Dec-2011 |
Lennart Poettering <lennart@poettering.net> |
journal: implement inotify-based live logging logic |
de190aef08bb267b645205a747762df573b36834 |
|
08-Nov-2011 |
Lennart Poettering <lennart@poettering.net> |
journal: implement multiple field matches |
e892bd1797e99c8afaa6afdbe413fda78937c9c3 |
|
15-Oct-2011 |
Lennart Poettering <lennart@poettering.net> |
journal: unify code for up and for down traversal |
de7b95cdc3228131498021c2fdcf6647004c3920 |
|
15-Oct-2011 |
Lennart Poettering <lennart@poettering.net> |
journal: properly implement matching with multiple matches |
c2373f848dddcc1827cf715c5ef778dc8d475761 |
|
14-Oct-2011 |
Lennart Poettering <lennart@poettering.net> |
journal: synchronize seqnum across files |
3fbf9cbb02690e40cd65802e777519f3f3c8d88a |
|
14-Oct-2011 |
Lennart Poettering <lennart@poettering.net> |
journal: implement parallel file traversal |
0ac38b707212e9aa40e25d65ffbae648cc9116f5 |
|
13-Oct-2011 |
Lennart Poettering <lennart@poettering.net> |
journal: implementation rotation |
38ac38b298a91c358285b7330aa66679338af874 |
|
12-Oct-2011 |
Lennart Poettering <lennart@poettering.net> |
journal: only fallocate() what we really need to avoid slowness on file systems which do not support fallocate natively |
cec736d21ff86c4ac81b4d306ddba2120333818c |
|
08-Oct-2011 |
Lennart Poettering <lennart@poettering.net> |
journal: implement parallel traversal in client |