]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: add a brief comment about the origin of the filters
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 6 Apr 2022 11:18:51 +0000 (20:18 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 6 Apr 2022 13:28:44 +0000 (15:28 +0200)
I am not sure whether the original discussions are correct or not.
This is just for adding references for future verification for the
filters.

src/udev/udevd.c

index 4a37a769247465296fa75049a3ec3b366077c790..078cd960b429f17e4a1fa163460934be37e4366b 100644 (file)
@@ -442,6 +442,12 @@ static int device_get_whole_disk(sd_device *dev, sd_device **ret_device, const c
         if (r < 0)
                 return log_device_debug_errno(dev, r, "Failed to get sysname: %m");
 
+        /* Exclude the following devices:
+         * For "dm-", see the comment added by e918a1b5a94f270186dca59156354acd2a596494.
+         * For "md", see the commit message of 2e5b17d01347d3c3118be2b8ad63d20415dbb1f0,
+         * but not sure the assumption is still valid even when partitions are created on the md
+         * devices, surprisingly which seems to be possible, see PR #22973.
+         * For "drbd", see the commit message of fee854ee8ccde0cd28e0f925dea18cce35f3993d. */
         if (STARTSWITH_SET(val, "dm-", "md", "drbd"))
                 goto irrelevant;