aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorRandy Witt <randy.e.witt@linux.intel.com>2015-03-06 14:15:33 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-16 17:38:50 +0000
commit18304e03c8ab8de94b6001a8a5677b57862da0f4 (patch)
tree61ee16b619dd13f2f6ad96ef8290aff4a79e5c29 /meta/recipes-core
parentb4c7921001a30e0162cacbe12b1a5b888b36db57 (diff)
downloadopenembedded-core-contrib-18304e03c8ab8de94b6001a8a5677b57862da0f4.tar.gz
systemd: Fix journal "Failed to set file attributes:" warning
This is a backport of an upstream patch that fixes the "Failed to set file attributes: Inappropriate ioctl for device" message when the device exists on ext4 filesystems. No functionality is changed, the patch just removes a potentially misleading warning. Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/systemd/systemd/0013-journal-fix-Inappropriate-ioctl-for-device-on-ext4.patch37
-rw-r--r--meta/recipes-core/systemd/systemd_219.bb1
2 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/0013-journal-fix-Inappropriate-ioctl-for-device-on-ext4.patch b/meta/recipes-core/systemd/systemd/0013-journal-fix-Inappropriate-ioctl-for-device-on-ext4.patch
new file mode 100644
index 00000000000..a49d6268249
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0013-journal-fix-Inappropriate-ioctl-for-device-on-ext4.patch
@@ -0,0 +1,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
+
diff --git a/meta/recipes-core/systemd/systemd_219.bb b/meta/recipes-core/systemd/systemd_219.bb
index d5eed08f1f8..238ee6707b2 100644
--- a/meta/recipes-core/systemd/systemd_219.bb
+++ b/meta/recipes-core/systemd/systemd_219.bb
@@ -43,6 +43,7 @@ SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=
file://0001-tmpfiles-avoid-creating-duplicate-acl-entries.patch \
file://0002-tmpfiles-quietly-ignore-ACLs-on-unsupported-filesyst.patch \
file://0012-systemd-tmpfiles.c-Honor-ordering-within-files-as-th.patch \
+ file://0013-journal-fix-Inappropriate-ioctl-for-device-on-ext4.patch \
file://tmpfiles-pam.patch \
file://touchscreen.rules \
file://00-create-volatile.conf \
; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
Quote from bug 1443 which explains what the patch does : 

  We build some random program and link it with -lust.  When we run it,
  it dies with a SIGSEGV before reaching main().
  
  Libust.so depends on liburcu-bp.so from the usermode-rcu package.
  Although libust.so is not prelinked, liburcu-bp.so IS prelinked; this
  is critical.
  
  Libust.so uses a TLS / __thread variable that is defined in liburcu-
  bp.so.  There are special ARM-specific relocation types that allow two
  shared libraries to share thread-specific data.  This is critical too.
  
  One more critical issue: although liburcu-bp.so is prelinked, we can't
  load it at its prelinked address, because we also link against
  librt.so, and librt.so uses that address.
  
  The dynamic linker is forced to relink liburcu-bp.so at a different
  address.  In the course of relinking, it processes the special ARM
  relocation record mentioned above.  The prelinker has already filled
  in the information, which is a short offset into a table of thread-
  specific data that is allocated per-thread for each library that uses
  TLS.  Because the normal behavior of a relocation is to add the symbol
  value to an addend stored at the address being relocated, we end up
  adding the short offset to itself, doubling it.
  
  Now we have an awkward situation.  The libust.so library doesn't know
  about the addend, so its TLS data for this element is correct.  The
  liburcu-bp.so library has a different offset for the element.  When we
  go to initialize the element for the first time in liburcu-bp.so, we
  write the address of the result at the doubled (broken) offset.
  Later, when we refer to the address from libust.so, we check the value
  at the correct offset, but it's NULL, so we eat hot SIGSEGV.

Upstream-Status: Pending

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
---
 .../libc/ports/sysdeps/arm/dl-machine.h            |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

ndex 8d905e8..dcfa71e 100644
Index: git/sysdeps/arm/dl-machine.h
===================================================================
--- git.orig/sysdeps/arm/dl-machine.h	2014-08-27 05:30:47.748070587 +0000
+++ git/sysdeps/arm/dl-machine.h	2014-08-27 05:30:47.740070587 +0000
@@ -495,7 +495,7 @@
 
 	case R_ARM_TLS_DTPOFF32:
 	  if (sym != NULL)
-	    *reloc_addr += sym->st_value;
+	    *reloc_addr = sym->st_value;
 	  break;
 
 	case R_ARM_TLS_TPOFF32: