aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0013-journal-fix-Inappropriate-ioctl-for-device-on-ext4.patch
blob: a49d626824956b246ae89416a13b89d7d1870ad7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From 65eae3b76243d2dfd869f8c43b787575f7b4b994 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= <crrodriguez@opensuse.org>
Date: Sun, 1 Mar 2015 21:13:10 -0300
Subject: [PATCH] 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.]

Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
---
 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 9c9a548..0e33a0f 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -2609,8 +2609,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
-- 
1.9.3