summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2017-11-17 01:08:03 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-12-02 11:25:32 +0000
commitbfd899ae342b2aae80790bda283c322301b7e64a (patch)
tree6bb25d1e614b5f8369fa8c78bcc23aab164b6c58 /meta/recipes-core/systemd
parent6ee124905f5241ea2b96822111a08e1463d319d2 (diff)
downloadpoky-bfd899ae342b2aae80790bda283c322301b7e64a.tar.gz
systemd: fix formatting IDE storage does not trigger "change" uevents
Formatting IDE storage does not trigger "change" uevents. As a result clients using udev API don't get any updates afterwards and get outdated information about the device. ... root@qemux86-64:~# mkfs.ext4 -F /dev/hda1 Creating filesystem with 262144 4k blocks and 65536 inodes Filesystem UUID: 98791eb2-2bf3-47ad-b4d8-4cf7e914eee2 root@qemux86-64:~# ls /dev/disk/by-uuid/98791eb2-2bf3-47ad-b4d8-4cf7e914eee2 ls: cannot access '/dev/disk/by-uuid/98791eb2-2bf3-47ad-b4d8-4cf7e914eee2': No such file or directory ... Include hd* in a match for watch option assignment. (From OE-Core rev: c0df31a593ce94b66100b5d4a64b38568494d56e) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/systemd')
-rw-r--r--meta/recipes-core/systemd/systemd/0020-rules-watch-metadata-changes-in-ide-devices.patch43
-rw-r--r--meta/recipes-core/systemd/systemd_234.bb1
2 files changed, 44 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/0020-rules-watch-metadata-changes-in-ide-devices.patch b/meta/recipes-core/systemd/systemd/0020-rules-watch-metadata-changes-in-ide-devices.patch
new file mode 100644
index 0000000000..17d698a06c
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0020-rules-watch-metadata-changes-in-ide-devices.patch
@@ -0,0 +1,43 @@
1From 8207d645582e96c56950674e104653d0cd552d60 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Fri, 17 Nov 2017 09:46:00 +0800
4Subject: [PATCH] rules: watch metadata changes in ide devices
5
6Formatting IDE storage does not trigger "change" uevents. As a result
7clients using udev API don't get any updates afterwards and get outdated
8information about the device.
9...
10root@qemux86-64:~# mkfs.ext4 -F /dev/hda1
11Creating filesystem with 262144 4k blocks and 65536 inodes
12Filesystem UUID: 98791eb2-2bf3-47ad-b4d8-4cf7e914eee2
13
14root@qemux86-64:~# ls /dev/disk/by-uuid/98791eb2-2bf3-47ad-b4d8-4cf7e914eee2
15ls: cannot access '/dev/disk/by-uuid/98791eb2-2bf3-47ad-b4d8-4cf7e914eee2': No such file or directory
16...
17Include hd* in a match for watch option assignment.
18
19Upstream-Status: Denied
20
21qemu by default emulates IDE and the linux-yocto kernel(s) use
22CONFIG_IDE instead of the more modern libsata, so disks appear as
23/dev/hd*. A similar patch rejected by upstream because CONFIG_IDE
24is deprecated.
25
26Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
27---
28 rules/60-block.rules | 2 +-
29 1 file changed, 1 insertion(+), 1 deletion(-)
30
31diff --git a/rules/60-block.rules b/rules/60-block.rules
32index 343fc06..b5237da 100644
33--- a/rules/60-block.rules
34+++ b/rules/60-block.rules
35@@ -8,4 +8,4 @@ ACTION=="add", SUBSYSTEM=="module", KERNEL=="block", ATTR{parameters/events_dfl_
36 ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change"
37
38 # watch metadata changes, caused by tools closing the device node which was opened for writing
39-ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*|pmem*|mmcblk*", OPTIONS+="watch"
40+ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*|pmem*|mmcblk*|hd*", OPTIONS+="watch"
41--
421.8.3.1
43
diff --git a/meta/recipes-core/systemd/systemd_234.bb b/meta/recipes-core/systemd/systemd_234.bb
index bfcecb3d4e..765daf2084 100644
--- a/meta/recipes-core/systemd/systemd_234.bb
+++ b/meta/recipes-core/systemd/systemd_234.bb
@@ -27,6 +27,7 @@ SRC_URI = "git://github.com/systemd/systemd.git;protocol=git \
27 file://0017-remove-duplicate-include-uchar.h.patch \ 27 file://0017-remove-duplicate-include-uchar.h.patch \
28 file://0018-check-for-uchar.h-in-configure.patch \ 28 file://0018-check-for-uchar.h-in-configure.patch \
29 file://0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch \ 29 file://0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch \
30 file://0020-rules-watch-metadata-changes-in-ide-devices.patch \
30 file://0001-add-fallback-parse_printf_format-implementation.patch \ 31 file://0001-add-fallback-parse_printf_format-implementation.patch \
31 file://0002-src-basic-missing.h-check-for-missing-strndupa.patch \ 32 file://0002-src-basic-missing.h-check-for-missing-strndupa.patch \
32 file://0003-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \ 33 file://0003-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \