forked from pool/systemd
Accepting request 243083 from home:jeff_mahoney:branches:Base:System
- udev: use device mapper target name for btrfs device ready (bnc#888215). - Add udev-use-device-mapper-target-name-for-btrfs-device-ready.patch - udev: use device mapper target name for btrfs device ready (bnc#888215). - Add udev-use-device-mapper-target-name-for-btrfs-device-ready.patch OBS-URL: https://build.opensuse.org/request/show/243083 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=743
This commit is contained in:
parent
86eff7bc2d
commit
34a6759c99
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 30 21:10:32 UTC 2014 - jeffm@suse.com
|
||||
|
||||
- udev: use device mapper target name for btrfs device ready (bnc#888215).
|
||||
- Add udev-use-device-mapper-target-name-for-btrfs-device-ready.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 30 12:53:07 UTC 2014 - werner@suse.de
|
||||
|
||||
|
@ -884,6 +884,8 @@ Patch1057: 1057-udev-unify-event-timeout-handling.patch
|
||||
Patch1058: 1058-udev-unify-event-timeout-handling.patch
|
||||
# PATCH-FIX-UPSTREAM 1059-udev-fixup-commit-dd5eddd28a74a49607a8fffcaf960040db.patch
|
||||
Patch1059: 1059-udev-fixup-commit-dd5eddd28a74a49607a8fffcaf960040db.patch
|
||||
# PATCH-FIX-SUSE udev-use-device-mapper-target-name-for-btrfs-device-ready.patch
|
||||
Patch1060: udev-use-device-mapper-target-name-for-btrfs-device-ready.patch
|
||||
|
||||
%description
|
||||
Systemd is a system and service manager, compatible with SysV and LSB
|
||||
@ -1491,6 +1493,7 @@ cp %{SOURCE7} m4/
|
||||
%patch1058 -p0
|
||||
%endif
|
||||
%patch1059 -p0
|
||||
%patch1060 -p1
|
||||
|
||||
# ensure generate files are removed
|
||||
rm -f units/emergency.service
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 30 21:10:21 UTC 2014 - jeffm@suse.com
|
||||
|
||||
- udev: use device mapper target name for btrfs device ready (bnc#888215).
|
||||
- Add udev-use-device-mapper-target-name-for-btrfs-device-ready.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 30 12:53:07 UTC 2014 - werner@suse.de
|
||||
|
||||
|
@ -879,6 +879,8 @@ Patch1057: 1057-udev-unify-event-timeout-handling.patch
|
||||
Patch1058: 1058-udev-unify-event-timeout-handling.patch
|
||||
# PATCH-FIX-UPSTREAM 1059-udev-fixup-commit-dd5eddd28a74a49607a8fffcaf960040db.patch
|
||||
Patch1059: 1059-udev-fixup-commit-dd5eddd28a74a49607a8fffcaf960040db.patch
|
||||
# PATCH-FIX-SUSE udev-use-device-mapper-target-name-for-btrfs-device-ready.patch
|
||||
Patch1060: udev-use-device-mapper-target-name-for-btrfs-device-ready.patch
|
||||
|
||||
%description
|
||||
Systemd is a system and service manager, compatible with SysV and LSB
|
||||
@ -1486,6 +1488,7 @@ cp %{SOURCE7} m4/
|
||||
%patch1058 -p0
|
||||
%endif
|
||||
%patch1059 -p0
|
||||
%patch1060 -p1
|
||||
|
||||
# ensure generate files are removed
|
||||
rm -f units/emergency.service
|
||||
|
@ -0,0 +1,43 @@
|
||||
From: Jeff Mahoney <jeffm@suse.com>
|
||||
Subject: udev: use device mapper target name for btrfs device ready
|
||||
References: bnc#888215
|
||||
|
||||
When udev gets a change event for a block device, it calls the builtin
|
||||
btrfs helper to scan it for a btrfs file system. If the file system was
|
||||
mounted using a device mapper node, mount(8) will have looked up the
|
||||
device mapper table and used the /dev/mapper/<name> node for mount.
|
||||
|
||||
If something like partprobe runs, and then causes change events to be
|
||||
handled, the btrfs ready event is handled using /dev/dm-N instead of
|
||||
the device mapper named node. Btrfs caches the last name passed to
|
||||
the scanning ioctl and uses that to report the device name for
|
||||
things like /proc/mounts.
|
||||
|
||||
So, after running partprobe we go from:
|
||||
/dev/mapper/test-test on /mnt type btrfs (rw,relatime,space_cache)
|
||||
... to ...
|
||||
/dev/dm-0 on /mnt type btrfs (rw,relatime,space_cache)
|
||||
|
||||
This doesn't apply only to LVM device, but multipath as well.
|
||||
|
||||
If the device is a DM device, udev will have already cached the table name
|
||||
from sysfs and we can use that to pass /dev/mapper/<name> to the builtin
|
||||
so that the correct name is used.
|
||||
|
||||
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
|
||||
---
|
||||
rules/64-btrfs.rules | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/rules/64-btrfs.rules
|
||||
+++ b/rules/64-btrfs.rules
|
||||
@@ -6,7 +6,8 @@ ENV{ID_FS_TYPE}!="btrfs", GOTO="btrfs_en
|
||||
ENV{SYSTEMD_READY}=="0", GOTO="btrfs_end"
|
||||
|
||||
# let the kernel know about this btrfs filesystem, and check if it is complete
|
||||
-IMPORT{builtin}="btrfs ready $devnode"
|
||||
+ENV{DM_NAME}=="", IMPORT{builtin}="btrfs ready $devnode"
|
||||
+ENV{DM_NAME}=="?*", IMPORT{builtin}="btrfs ready /dev/mapper/$env{DM_NAME}"
|
||||
|
||||
# mark the device as not ready to be used by the system
|
||||
ENV{ID_BTRFS_READY}=="0", ENV{SYSTEMD_READY}="0"
|
Loading…
Reference in New Issue
Block a user