Re: [systemd-devel] [PATCH] journal: Fix navigating backwards missing entries
On Fri, 05.12.14 16:06, Olivier Brunel (j...@jjacky.com) wrote: 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 --- This was a good excuse for me to dive in and learn about journal's internals, but someone with actual knowledge of said internals should review this, in case I missed something. Patch looks correct! Thanks a ton for tracking this down! Much appreciated! Applied! Lennart -- Lennart Poettering, Red Hat ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH] journal: Fix navigating backwards missing entries
Hi, I just verified that this patch also fixes https://bugs.freedesktop.org/show_bug.cgi?id=84867 . On 12/05/2014 10:06 AM, Olivier Brunel wrote: 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 --- This was a good excuse for me to dive in and learn about journal's internals, but someone with actual knowledge of said internals should review this, in case I missed something. src/journal/journal-file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index 7858435..c5d2d19 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c @@ -1657,7 +1657,7 @@ static int generic_array_bisect( } } -if (k n) { +if (k = n) { if (direction == DIRECTION_UP) { i = n; subtract_one = true; -- Kind regards, b. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] [PATCH] 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 --- This was a good excuse for me to dive in and learn about journal's internals, but someone with actual knowledge of said internals should review this, in case I missed something. src/journal/journal-file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index 7858435..c5d2d19 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c @@ -1657,7 +1657,7 @@ static int generic_array_bisect( } } -if (k n) { +if (k = n) { if (direction == DIRECTION_UP) { i = n; subtract_one = true; -- 2.1.3 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel