summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2016-05-09 11:44:26 -0400
committerDavid Sterba <dsterba@suse.com>2016-06-01 14:56:56 +0200
commit62c0666378eb70285b6a3052bf4144d2132a5891 (patch)
tree8c0f16f348604089ccf39d89bd58297c79a7c4f4 /configure.ac
parent640391b2997dced1af3d189759fdd2939c558546 (diff)
btrfs-progs: udev: add rules for dm devices
Systemd's btrfs rule runs btrfs dev ready on each device as it's discovered. The btrfs command is executed as a builtin command via an IMPORT{builtin} rule, which means it gets executed at rule evaluation time, not rule execution time. That means that the device mapper links haven't been setup yet and the only nodes that can be depended upon are /dev/dm-#. That we see /dev/mapper/name names in /proc/mounts is only because we replace the device name we have cached with the one passed in via mount. If we have a multi-device file system and the primary device is removed, the remaining devices will show /dev/dm-#. In addition, if the udev rule is executed again by someone generating a change event (e.g. partprobe), the names are also replaced by the /dev/dm-# names. This patch adds a new rule that adds a run rule that calls btrfs dev ready again using the device mapper links once they're created. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac2
1 files changed, 2 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 797eb790..68a37012 100644
--- a/configure.ac
+++ b/configure.ac
@@ -124,6 +124,8 @@ PKG_STATIC(UUID_LIBS_STATIC, [uuid])
PKG_CHECK_MODULES(ZLIB, [zlib])
PKG_STATIC(ZLIB_LIBS_STATIC, [zlib])
+PKG_CHECK_VAR([UDEVDIR], [udev], [udevdir])
+
dnl lzo library does not provide pkg-config, let use classic way
AC_CHECK_LIB([lzo2], [lzo_version], [
LZO2_LIBS="-llzo2"