Zbigniew Jędrzejewski-Szmek d743bb
From d6bc07b87a56804a8bc063c16ee0106cdb86f72d Mon Sep 17 00:00:00 2001
Zbigniew Jędrzejewski-Szmek d743bb
From: kjackiewicz <kjackiewicz@users.noreply.github.com>
Zbigniew Jędrzejewski-Szmek d743bb
Date: Tue, 30 May 2017 15:19:03 +0200
Zbigniew Jędrzejewski-Szmek d743bb
Subject: [PATCH] rules: watch metadata changes in mmcblk devices (#6050)
Zbigniew Jędrzejewski-Szmek d743bb
Zbigniew Jędrzejewski-Szmek d743bb
Formatting sd-cards does not trigger "change" uevents. As a result clients
Zbigniew Jędrzejewski-Szmek d743bb
using udev API don't get any updates afterwards and get outdated information
Zbigniew Jędrzejewski-Szmek d743bb
about the device.
Zbigniew Jędrzejewski-Szmek d743bb
Zbigniew Jędrzejewski-Szmek d743bb
Include mmcblk* in a match for watch option assignment.
Zbigniew Jędrzejewski-Szmek d743bb
(cherry picked from commit e74d0a9a5cdd8562aeaab1994ebd9c4cd07e82c3)
Zbigniew Jędrzejewski-Szmek d743bb
---
Zbigniew Jędrzejewski-Szmek d743bb
 rules/60-block.rules | 2 +-
Zbigniew Jędrzejewski-Szmek d743bb
 1 file changed, 1 insertion(+), 1 deletion(-)
Zbigniew Jędrzejewski-Szmek d743bb
Zbigniew Jędrzejewski-Szmek d743bb
diff --git a/rules/60-block.rules b/rules/60-block.rules
Zbigniew Jędrzejewski-Szmek d743bb
index 42c75974a5..343fc06f85 100644
Zbigniew Jędrzejewski-Szmek d743bb
--- a/rules/60-block.rules
Zbigniew Jędrzejewski-Szmek d743bb
+++ b/rules/60-block.rules
Zbigniew Jędrzejewski-Szmek d743bb
@@ -8,4 +8,4 @@ ACTION=="add", SUBSYSTEM=="module", KERNEL=="block", ATTR{parameters/events_dfl_
Zbigniew Jędrzejewski-Szmek d743bb
 ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change"
Zbigniew Jędrzejewski-Szmek d743bb
 
Zbigniew Jędrzejewski-Szmek d743bb
 # watch metadata changes, caused by tools closing the device node which was opened for writing
Zbigniew Jędrzejewski-Szmek d743bb
-ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*|pmem*", OPTIONS+="watch"
Zbigniew Jędrzejewski-Szmek d743bb
+ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*|pmem*|mmcblk*", OPTIONS+="watch"