master - devices: Detect rotational devices.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b9c16b750694c4ec03d05bc9e4a12cecc4d9450f Commit: b9c16b750694c4ec03d05bc9e4a12cecc4d9450f Parent: 979be63f2537373b49e47aa3e8ce3f9bf2a4279f Author: Alasdair G Kergon <[email protected]> AuthorDate: Tue Sep 16 00:44:25 2014 +0100 Committer: Alasdair G Kergon <[email protected]> CommitterDate: Tue Sep 16 00:44:25 2014 +0100
devices: Detect rotational devices.
Add dev_is_rotational() for future use by allocation code.
--- WHATS_NEW | 1 + lib/device/dev-type.c | 57 ++++++++++++++++++++++++++++++------------------- lib/device/dev-type.h | 2 + 3 files changed, 38 insertions(+), 22 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.112 - ===================================== + Add function to detect rotational devices. Review internal checks for mirror/raid/pvmove volumes. Track mirror segment type with separate MIRROR flag. Fix cmirror endian conversions.
lib/device/dev-type.c +35 -22
134 lines not on this page · raw message
lib/device/dev-type.h +2 -0
@@ -82,4 +82,6 @@ unsigned long dev_optimal_io_size(struct dev_types *dt, struct device *dev);unsigned long dev_discard_max_bytes (struct dev_types *dt,struct device *dev);unsigned long dev_discard_granularity (struct dev_types *dt,struct device *dev); +int dev_is_rotational (struct dev_types *dt,struct device *dev); +#endif