1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/lib
Zdenek Kabelac 027a55d0fb Optimise _eat_space and _get_token
Makes the code more readable and has a smaller number of memory
accesses thus it's small optimisation as well.

For _get_token() optimize number parsing. Check for '.' char only
if it's not a digit. Move pointer incrementation into one place.

For _eat_space() check only p->te for '\0' in skipping of comment line.
Avoid check for '\0' when we know it is space. Also master while loop
doesn't need checking p->tb for '\0'. We just need to check p->tb
isn't already at the end of buffer. This could give 'extra' loop cycle
if we are already there - but safes memory access in every other case.
2011-03-10 14:51:35 +00:00
..
activate Add fall through comments 2011-02-28 19:53:03 +00:00
cache Avoid possible endless loop in _free_vginfo when 4 or more VGs have same name. 2011-03-10 03:03:03 +00:00
commands Replace PV_MIN_SIZE with function pv_min_size() 2011-02-18 14:11:22 +00:00
config Optimise _eat_space and _get_token 2011-03-10 14:51:35 +00:00
datastruct Some const cleanups 2010-12-20 13:19:13 +00:00
device Handle decimal digits with --units instead of ignoring them silently. 2011-02-18 23:09:55 +00:00
display Fix some compile warnings on RHEL5 2011-03-01 20:17:56 +00:00
error Remove const usage from destroy callbacks 2010-12-20 13:32:49 +00:00
filters Const fixing 2011-02-18 14:47:28 +00:00
format1 Refactor vg allocation code 2011-03-10 12:43:29 +00:00
format_pool Refactor vg allocation code 2011-03-10 12:43:29 +00:00
format_text Refactor vg allocation code 2011-03-10 12:43:29 +00:00
freeseg Remove const usage from destroy callbacks 2010-12-20 13:32:49 +00:00
label Add dm_zalloc and use it and dm_pool_zalloc throughout. 2010-09-30 21:06:50 +00:00
locking Critical section 2011-02-18 14:16:11 +00:00
log Critical section 2011-02-18 14:16:11 +00:00
metadata Refactor code for _lv_postoder 2011-03-10 14:40:32 +00:00
mirror Fix !DEVMAPPER_SUPPORT build 2011-02-18 14:29:39 +00:00
misc Replace PV_MIN_SIZE with function pv_min_size() 2011-02-18 14:11:22 +00:00
mm Use lvm_getpagesize wrapper 2011-03-06 17:52:07 +00:00
replicator Remove const usage from destroy callbacks 2010-12-20 13:32:49 +00:00
report Fix reading of released memory 2011-03-05 12:14:00 +00:00
snapshot Fix !DEVMAPPER_SUPPORT build 2011-02-18 14:29:39 +00:00
striped Remove const usage from destroy callbacks 2010-12-20 13:32:49 +00:00
unknown Remove const usage from destroy callbacks 2010-12-20 13:32:49 +00:00
uuid Const fixing 2011-02-18 14:47:28 +00:00
zero Remove const usage from destroy callbacks 2010-12-20 13:32:49 +00:00
Makefile.in Refactor the percent (mirror sync, snapshot usage) handling code to use 2010-11-30 11:53:31 +00:00