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