]> sourceware.org Git - lvm2.git/commit
dev-cache: skip VGID/LVID indexing if /sys/dev/block is not present
authorPeter Rajnoha <prajnoha@redhat.com>
Fri, 1 Apr 2016 15:04:11 +0000 (17:04 +0200)
committerPeter Rajnoha <prajnoha@redhat.com>
Fri, 1 Apr 2016 15:09:15 +0000 (17:09 +0200)
commit42f04a0f77ee94b01d652d6c11d10e85aa46a897
treedb9bd956ef02cf68acc6011017b5d5fa088e1755
parent9f28eb4c20ecb772f1b8a912c43f243d63a7e5f3
dev-cache: skip VGID/LVID indexing if /sys/dev/block is not present

/sys/dev/block is available since kernel version 2.2.26 (~ 2008):
https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-dev

The VGID/LVID indexing code relies on this feature so skip indexing
if it's not available to avoid error messages about inability to open
/sys/dev/block directory.

We're not going to provide fallback code to read the /sys/block/
instead in this case as that's not that efficient - it needs extra
reads for getting major:minor and reading partitions would also
pose further reads and that's not worth it.
lib/device/dev-cache.c
This page took 0.034821 seconds and 5 git commands to generate.