diff options
author | Khem Raj <raj.khem@gmail.com> | 2014-03-04 15:22:15 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-03-07 14:49:22 +0000 |
commit | e201f291b269c70d732778b34de01529aca387b5 (patch) | |
tree | 46c7cc8eed2c33b8e971980d967c46cd3587e5d8 /meta/recipes-core/systemd/systemd/journal-when-appending-to-journal-file-allocate-larg.patch | |
parent | 27c8a9a282358b9a8a330252ee2104b250777b38 (diff) | |
download | openembedded-core-contrib-e201f291b269c70d732778b34de01529aca387b5.tar.gz |
Upgrade to systemd-stable v208
Additional changes in ptest code since now
we have directories and not only bunch of files
under test/ dir so a simple install does not
work anymore we have to cp the files
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-core/systemd/systemd/journal-when-appending-to-journal-file-allocate-larg.patch')
-rw-r--r-- | meta/recipes-core/systemd/systemd/journal-when-appending-to-journal-file-allocate-larg.patch | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/meta/recipes-core/systemd/systemd/journal-when-appending-to-journal-file-allocate-larg.patch b/meta/recipes-core/systemd/systemd/journal-when-appending-to-journal-file-allocate-larg.patch deleted file mode 100644 index 89573bbaf9..0000000000 --- a/meta/recipes-core/systemd/systemd/journal-when-appending-to-journal-file-allocate-larg.patch +++ /dev/null @@ -1,83 +0,0 @@ -From c0658e1948c301177b1527227be0c18932cd7cce Mon Sep 17 00:00:00 2001 -From: Lennart Poettering <lennart@poettering.net> -Date: Tue, 26 Nov 2013 18:39:42 +0100 -Subject: [PATCH] journal: when appending to journal file, allocate larger - blocks at once - -(cherry picked from commit a676e66535e12458ea6d366a653f8dd60f982504) - -Conflicts: - src/journal/journal-file.c ---- - src/journal/journal-file.c | 26 +++++++++++++++++--------- - 1 file changed, 17 insertions(+), 9 deletions(-) - -Upstream-Status: Backport - -Index: systemd-208/src/journal/journal-file.c -=================================================================== ---- systemd-208.orig/src/journal/journal-file.c 2014-02-07 22:37:06.013722798 -0800 -+++ systemd-208/src/journal/journal-file.c 2014-02-07 22:44:51.563341090 -0800 -@@ -68,6 +68,9 @@ - /* How many entries to keep in the entry array chain cache at max */ - #define CHAIN_CACHE_MAX 20 - -+/* How much to increase the journal file size at once each time we allocate something new. */ -+#define FILE_SIZE_INCREASE (8ULL*1024ULL*1024ULL) /* 8MB */ -+ - int journal_file_set_online(JournalFile *f) { - assert(f); - -@@ -218,8 +221,7 @@ - journal_file_set_online(f); - - /* Sync the online state to disk */ -- msync(f->header, PAGE_ALIGN(sizeof(Header)), MS_SYNC); -- fdatasync(f->fd); -+ fsync(f->fd); - - return 0; - } -@@ -313,7 +315,7 @@ - } - - static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size) { -- uint64_t old_size, new_size; -+ uint64_t old_size, new_size, file_size; - int r; - - assert(f); -@@ -333,12 +335,10 @@ - if (new_size <= old_size) - return 0; - -- if (f->metrics.max_size > 0 && -- new_size > f->metrics.max_size) -+ if (f->metrics.max_size > 0 && new_size > f->metrics.max_size) - return -E2BIG; - -- if (new_size > f->metrics.min_size && -- f->metrics.keep_free > 0) { -+ if (new_size > f->metrics.min_size && f->metrics.keep_free > 0) { - struct statvfs svfs; - - if (fstatvfs(f->fd, &svfs) >= 0) { -@@ -363,8 +363,16 @@ - if (r != 0) - return -r; - -- if (fstat(f->fd, &f->last_stat) < 0) -- return -errno; -+ /* Increase the file size a bit further than this, so that we -+ * we can create larger memory maps to cache */ -+ file_size = ((new_size+FILE_SIZE_INCREASE-1) / FILE_SIZE_INCREASE) * FILE_SIZE_INCREASE; -+ if (file_size > (uint64_t) f->last_stat.st_size) { -+ if (file_size > new_size) -+ ftruncate(f->fd, file_size); -+ -+ if (fstat(f->fd, &f->last_stat) < 0) -+ return -errno; -+ } - - f->header->arena_size = htole64(new_size - le64toh(f->header->header_size)); - |