Restore udev watches on block device changes

Patch cherry-picked from upstream git.

Closes: #789060
LP: #1466081
This commit is contained in:
Martin Pitt 2015-06-17 18:21:31 +02:00
parent 47d7095cbd
commit cf65a16b97
3 changed files with 23 additions and 0 deletions

2
debian/changelog vendored
View File

@ -41,6 +41,8 @@ systemd (220-7) UNRELEASED; urgency=medium
under other init systems, and systemd-sysctl also works there.
* 80-networking.rules: Only call agents for add|remove, as they don't handle
other events.
* Restore udev watches on block device changes. (Closes: #789060,
LP: #1466081)
-- Michael Biebl <biebl@debian.org> Fri, 12 Jun 2015 08:05:46 +0200

View File

@ -0,0 +1,20 @@
From: Tom Gundersen <teg@jklm.no>
Date: Fri, 29 May 2015 20:55:39 +0200
Subject: rules: restore block watch after CHANGE events
When processing an event, the watch is disabled, make sure it is restorted after
a CHANGE event has been processed.
---
rules/60-block.rules | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rules/60-block.rules b/rules/60-block.rules
index de41499..a69d648 100644
--- a/rules/60-block.rules
+++ b/rules/60-block.rules
@@ -8,4 +8,4 @@ ACTION=="add", SUBSYSTEM=="module", KERNEL=="block", ATTR{parameters/events_dfl_
ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change"
# watch metadata changes, caused by tools closing the device node which was opened for writing
-ACTION=="add", SUBSYSTEM=="block", KERNEL!="loop*|nvme*|sd*|vd*", OPTIONS+="watch"
+ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*", OPTIONS+="watch"

View File

@ -19,6 +19,7 @@ path-util-Fix-path_is_mount_point-for-files.patch
udev-input_id-refactor-device-detection.patch
udev-input_id-use-direct-property-and-mt-axis-for-to.patch
udev-input_id-use-ABS_MT_SLOT-1-to-exclude-non-touch.patch
rules-restore-block-watch-after-CHANGE-events.patch
## Debian specific patches
Add-back-support-for-Debian-specific-config-files.patch