]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
rules: block: add support for pmem devices (#3683)
authorbgbhpe <brian.boylston@hpe.com>
Fri, 8 Jul 2016 15:43:56 +0000 (11:43 -0400)
committerLennart Poettering <lennart@poettering.net>
Fri, 8 Jul 2016 15:43:56 +0000 (17:43 +0200)
Persistent memory devices can be exposed as block devices as /dev/pmemN
and /dev/pmemNs.  pmemN is the raw device and is byte-addressable from
within the kernel and when mmapped by applications from a DAX-mounted
file system.  pmemNs has the block translation table (BTT) layered on top,
offering atomic sector/block access.  Both pmemN and pmemNs are expected
to contain file systems.

blkid(8) and lsblk(8) seem to correctly report on pmemN and pmemNs.
systemd v219 will populate /dev/disk/by-uuid/ when, for example, mkfs is
used on pmem, but systemd v228 does not.

Add pmem to the whitelist.

rules/60-block.rules
rules/60-persistent-storage.rules

index c74caca49f0c9bd96df9a4c53105ddf0909ef6b2..42c75974a571acb6a10a3eaec58308de0fcd982d 100644 (file)
@@ -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!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*", OPTIONS+="watch"
+ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*|pmem*", OPTIONS+="watch"
index cbd44cb242e622c2d2cd6463289fe67b06cabcda..dbf10b286f2485a9b909fbd6a2af21cf1afb1f0a 100644 (file)
@@ -6,7 +6,7 @@
 ACTION=="remove", GOTO="persistent_storage_end"
 
 SUBSYSTEM!="block", GOTO="persistent_storage_end"
-KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|scm*", GOTO="persistent_storage_end"
+KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|scm*|pmem*", GOTO="persistent_storage_end"
 
 # ignore partitions that span the entire disk
 TEST=="whole_disk", GOTO="persistent_storage_end"