]> git.proxmox.com Git - systemd.git/commitdiff
journald: Suppress expected cases of "Failed to set file attributes" errors
authorMartin Pitt <martin.pitt@ubuntu.com>
Wed, 4 Mar 2015 06:32:42 +0000 (07:32 +0100)
committerMartin Pitt <martin.pitt@ubuntu.com>
Wed, 4 Mar 2015 06:32:42 +0000 (07:32 +0100)
Patch cherry-picked from upstream git.

LP: #1427899

debian/changelog
debian/patches/Bring-tmpfiles.d-tmp.conf-in-line-with-Debian-defaul.patch
debian/patches/journal-fix-Inappropriate-ioctl-for-device-on-ext4.patch [new file with mode: 0644]
debian/patches/series

index faf9f5f138ffeb41930aa8d4cab1c5991dfd5fb4..f9a95429e75f775089b064f07775c4c1b73cfdf4 100644 (file)
@@ -3,6 +3,10 @@ systemd (219-5) UNRELEASED; urgency=medium
   [ Didier Roche ]
   * Add "systemd-fsckd" autopkgtest. (LP: #1427312)
 
+  [ Martin Pitt ]
+  * journald: Suppress expected cases of "Failed to set file attributes"
+    errors. (LP: #1427899)
+
  -- Martin Pitt <mpitt@debian.org>  Tue, 03 Mar 2015 14:51:46 +0100
 
 systemd (219-4) experimental; urgency=medium
index 3822c167de32e8fe59bf7df16c3ea9038866b1c2..e0c34e4ce162bf0920844bae568fe1753584db60 100644 (file)
@@ -8,7 +8,7 @@ Closes: #675422
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/tmpfiles.d/tmp.conf b/tmpfiles.d/tmp.conf
-index ffdd82f..6d92bc3 100644
+index ffdd82f..f5a773e 100644
 --- a/tmpfiles.d/tmp.conf
 +++ b/tmpfiles.d/tmp.conf
 @@ -8,8 +8,8 @@
diff --git a/debian/patches/journal-fix-Inappropriate-ioctl-for-device-on-ext4.patch b/debian/patches/journal-fix-Inappropriate-ioctl-for-device-on-ext4.patch
new file mode 100644 (file)
index 0000000..44f6c39
--- /dev/null
@@ -0,0 +1,31 @@
+From: =?utf-8?q?Cristian_Rodr=C3=ADguez?= <crrodriguez@opensuse.org>
+Date: Sun, 1 Mar 2015 21:13:10 -0300
+Subject: 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.]
+---
+ src/journal/journal-file.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
+index 2845e05..0f28718 100644
+--- a/src/journal/journal-file.c
++++ b/src/journal/journal-file.c
+@@ -2611,8 +2611,8 @@ int journal_file_open(
+                  * shouldn't be too bad, given that we do our own
+                  * checksumming). */
+                 r = chattr_fd(f->fd, true, FS_NOCOW_FL);
+-                if (r < 0)
+-                        log_warning_errno(errno, "Failed to set file attributes: %m");
++                if (r < 0 && r != -ENOTTY)
++                        log_warning_errno(r, "Failed to set file attributes: %m");
+                 /* Let's attach the creation time to the journal file,
+                  * so that the vacuuming code knows the age of this
index b7fad7b7c6b1e28d175a2b1b9710a6d9866b4671..546956e566cc9cb9bd3ff74ae7ad375e14a99f03 100644 (file)
@@ -12,6 +12,7 @@ Add-man-page-and-references-to-it.patch
 Add-mock-fsck-process.patch
 tmpfiles-avoid-creating-duplicate-acl-entries.patch
 bootchart-fix-default-init-path.patch
+journal-fix-Inappropriate-ioctl-for-device-on-ext4.patch
 
 ## Debian specific patches
 Add-back-support-for-Debian-specific-config-files.patch