diff --git a/debian/changelog b/debian/changelog index 4a24bb5b7..1749177de 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Fri, 12 Jun 2015 08:05:46 +0200 diff --git a/debian/patches/rules-restore-block-watch-after-CHANGE-events.patch b/debian/patches/rules-restore-block-watch-after-CHANGE-events.patch new file mode 100644 index 000000000..f5cc835d6 --- /dev/null +++ b/debian/patches/rules-restore-block-watch-after-CHANGE-events.patch @@ -0,0 +1,20 @@ +From: Tom Gundersen +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" diff --git a/debian/patches/series b/debian/patches/series index 74295a198..5b8e61fb8 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -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