55d1226d79
- Add two patches from hare@suse.com 1011-64-btrfs.rules-skip-btrfs-check-if-devices-are-not-r.patch 1012-Skip-persistent-device-link-creation-on-multipath-de.patch to solve bnc#872929 - Increase result size for programs stdout (bnc#867840). add: 1010-udev-increase-result-size-for-programs.patch - Update udev-generate-peristent-rule.sh to the latest version. - Clean-up spec file, re-arange patch to suit the setup, all udev patches start with 1XXX-*.{patch,diff}. - Rename: 0013-cdrom_id-use-the-old-MMC-fallback.patch to 1009-cdrom_id-use-the-old-MMC-fallback.patch - Rename: 1009-make-xsltproc-use-correct-ROFF-links.patch to 0009-make-xsltproc-use-correct-ROFF-links.patch - Rename: 1010-do-not-install-sulogin-unit-with-poweroff.patch to 0010-do-not-install-sulogin-unit-with-poweroff.patch - Rename: 1014-journald-with-journaling-FS.patch to 0014-journald-with-journaling-FS.patch - Rename: 1018-Make-LSB-Skripts-know-about-Required-and-Should.patch to 0018-Make-LSB-Skripts-know-about-Required-and-Should.patch - Rename: 1019-make-completion-smart-to-be-able-to-redirect.patch to 0019-make-completion-smart-to-be-able-to-redirect.patch - Rename: 1022-systemd-tmpfiles-ownerkeep.patch to 0022-systemd-tmpfiles-ownerkeep.patch - Add two patches from hare@suse.com 1011-64-btrfs.rules-skip-btrfs-check-if-devices-are-not-r.patch 1012-Skip-persistent-device-link-creation-on-multipath-de.patch to solve bnc#872929 OBS-URL: https://build.opensuse.org/request/show/229621 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=181
53 lines
2.3 KiB
Diff
53 lines
2.3 KiB
Diff
--- systemd-208/src/journal/journald-server.c
|
|
+++ systemd-208/src/journal/journald-server.c 2013-12-10 16:31:50.770235717 +0000
|
|
@@ -21,6 +21,7 @@
|
|
|
|
#include <sys/signalfd.h>
|
|
#include <sys/ioctl.h>
|
|
+#include <linux/fs.h>
|
|
#include <linux/sockios.h>
|
|
#include <sys/statvfs.h>
|
|
#include <sys/mman.h>
|
|
@@ -878,7 +879,7 @@ finish:
|
|
|
|
|
|
static int system_journal_open(Server *s) {
|
|
- int r;
|
|
+ int r, fd;
|
|
char *fn;
|
|
sd_id128_t machine;
|
|
char ids[33];
|
|
@@ -905,7 +906,31 @@ static int system_journal_open(Server *s
|
|
(void) mkdir("/var/log/journal/", 0755);
|
|
|
|
fn = strappenda("/var/log/journal/", ids);
|
|
- (void) mkdir(fn, 0755);
|
|
+ (void)mkdir(fn, 0755);
|
|
+
|
|
+ /*
|
|
+ * On journaling and/or compressing file systems avoid doubling the
|
|
+ * efforts for the system, that is set NOCOW and NOCOMP inode flags.
|
|
+ * Check for every single flag as otherwise some of the file systems
|
|
+ * may return EOPNOTSUPP on one unkown flag (like BtrFS does).
|
|
+ */
|
|
+ if ((fd = open(fn, O_DIRECTORY)) >= 0) {
|
|
+ long flags;
|
|
+ if (ioctl(fd, FS_IOC_GETFLAGS, &flags) == 0) {
|
|
+ int old = flags;
|
|
+ if (!(flags&FS_NOATIME_FL) && ioctl(fd, FS_IOC_SETFLAGS, flags|FS_NOATIME_FL) == 0)
|
|
+ flags |= FS_NOATIME_FL;
|
|
+ if (!(flags&FS_NOCOW_FL) && ioctl(fd, FS_IOC_SETFLAGS, flags|FS_NOCOW_FL) == 0)
|
|
+ flags |= FS_NOCOW_FL;
|
|
+ if (!(flags&FS_NOCOMP_FL) && s->compress) {
|
|
+ flags &= ~FS_COMPR_FL;
|
|
+ flags |= FS_NOCOMP_FL;
|
|
+ }
|
|
+ if (old != flags)
|
|
+ ioctl(fd, FS_IOC_SETFLAGS, flags);
|
|
+ }
|
|
+ close(fd);
|
|
+ }
|
|
|
|
fn = strappenda(fn, "/system.journal");
|
|
r = journal_file_open_reliably(fn, O_RDWR|O_CREAT, 0640, s->compress, s->seal, &s->system_metrics, s->mmap, NULL, &s->system_journal);
|