ryantimwilson / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone
Zbigniew Jędrzejewski-Szmek e4a83a
From 983c520982b548c9bb8f2689a93f2fb35c54c392 Mon Sep 17 00:00:00 2001
Zbigniew Jędrzejewski-Szmek e4a83a
From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= <crrodriguez@opensuse.org>
Zbigniew Jędrzejewski-Szmek e4a83a
Date: Sun, 1 Mar 2015 21:13:10 -0300
Zbigniew Jędrzejewski-Szmek e4a83a
Subject: [PATCH] journal: fix Inappropriate ioctl for device on ext4
Zbigniew Jędrzejewski-Szmek e4a83a
Zbigniew Jędrzejewski-Szmek e4a83a
Logs constantly show
Zbigniew Jędrzejewski-Szmek e4a83a
Zbigniew Jędrzejewski-Szmek e4a83a
systemd-journald[395]: Failed to set file attributes: Inappropriate ioctl for device
Zbigniew Jędrzejewski-Szmek e4a83a
Zbigniew Jędrzejewski-Szmek e4a83a
This is because ext4 does not support FS_NOCOW_FL.
Zbigniew Jędrzejewski-Szmek e4a83a
Zbigniew Jędrzejewski-Szmek e4a83a
[zj: fold into one conditional as suggested on the ML and
Zbigniew Jędrzejewski-Szmek e4a83a
     fix (preexisting) r/errno confusion in error message.]
Zbigniew Jędrzejewski-Szmek e4a83a
Zbigniew Jędrzejewski-Szmek e4a83a
(cherry picked from commit 65eae3b76243d2dfd869f8c43b787575f7b4b994)
Zbigniew Jędrzejewski-Szmek e4a83a
---
Zbigniew Jędrzejewski-Szmek e4a83a
 src/journal/journal-file.c | 4 ++--
Zbigniew Jędrzejewski-Szmek e4a83a
 1 file changed, 2 insertions(+), 2 deletions(-)
Zbigniew Jędrzejewski-Szmek e4a83a
Zbigniew Jędrzejewski-Szmek e4a83a
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
Zbigniew Jędrzejewski-Szmek e4a83a
index 2845e05ce0..0f28718b0e 100644
Zbigniew Jędrzejewski-Szmek e4a83a
--- a/src/journal/journal-file.c
Zbigniew Jędrzejewski-Szmek e4a83a
+++ b/src/journal/journal-file.c
Zbigniew Jędrzejewski-Szmek e4a83a
@@ -2611,8 +2611,8 @@ int journal_file_open(
Zbigniew Jędrzejewski-Szmek e4a83a
                  * shouldn't be too bad, given that we do our own
Zbigniew Jędrzejewski-Szmek e4a83a
                  * checksumming). */
Zbigniew Jędrzejewski-Szmek e4a83a
                 r = chattr_fd(f->fd, true, FS_NOCOW_FL);
Zbigniew Jędrzejewski-Szmek e4a83a
-                if (r < 0)
Zbigniew Jędrzejewski-Szmek e4a83a
-                        log_warning_errno(errno, "Failed to set file attributes: %m");
Zbigniew Jędrzejewski-Szmek e4a83a
+                if (r < 0 && r != -ENOTTY)
Zbigniew Jędrzejewski-Szmek e4a83a
+                        log_warning_errno(r, "Failed to set file attributes: %m");
Zbigniew Jędrzejewski-Szmek e4a83a
 
Zbigniew Jędrzejewski-Szmek e4a83a
                 /* Let's attach the creation time to the journal file,
Zbigniew Jędrzejewski-Szmek e4a83a
                  * so that the vacuuming code knows the age of this