1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00
lvm2/lib/device
Peter Rajnoha d090d6574e device: also cache device size
Add "size" and "size_seqno" to struct device to cache device's size
and also to control its lifetime - the cached value is valid as long
as the global _dev_size_seqno is equal to the device's size_seqno,
otherwise we need to get the size again and cache the new value.

This patch also adds new dev_size_seqno_inc() fn for the appropriate
parts of the code to increment current global value of _dev_size_seqno
and hence to cause all currently cached values for device sizes to
be invalidated.

The device size is now cached because we're planning to reuse this
information for further checks and we want to avoid checking it more
than necessary to save resources.
2016-01-22 14:13:34 +01:00
..
dev-cache.c doc: change fsf address 2016-01-21 12:11:37 +01:00
dev-cache.h doc: change fsf address 2016-01-21 12:11:37 +01:00
dev-dasd.c doc: change fsf address 2016-01-21 12:11:37 +01:00
dev-ext-udev-constants.h doc: change fsf address 2016-01-21 12:11:37 +01:00
dev-ext.c doc: change fsf address 2016-01-21 12:11:37 +01:00
dev-io.c device: also cache device size 2016-01-22 14:13:34 +01:00
dev-luks.c doc: change fsf address 2016-01-21 12:11:37 +01:00
dev-md.c doc: change fsf address 2016-01-21 12:11:37 +01:00
dev-swap.c doc: change fsf address 2016-01-21 12:11:37 +01:00
dev-type.c doc: change fsf address 2016-01-21 12:11:37 +01:00
dev-type.h doc: change fsf address 2016-01-21 12:11:37 +01:00
device-types.h doc: change fsf address 2016-01-21 12:11:37 +01:00
device.h device: also cache device size 2016-01-22 14:13:34 +01:00