diff options
author | Tony Asleson <tasleson@redhat.com> | 2013-01-08 14:29:56 -0600 |
---|---|---|
committer | Tony Asleson <tasleson@redhat.com> | 2013-07-02 14:24:33 -0500 |
commit | 60c78e6aef9b744d6313ac0cf3ebb62b74066eb3 (patch) | |
tree | 672f3fe4c9d80a9e151e36e91ed98af4af884f17 /lib/misc/lvm-percent.h | |
parent | d52b6be455126e7b6a46c39127ca343982955b19 (diff) | |
download | lvm2-60c78e6aef9b744d6313ac0cf3ebb62b74066eb3.tar.gz |
lvm2app: Move percent_of_extents to lvm-percent.[h|c]
Signed-off-by: Tony Asleson <tasleson@redhat.com>
Diffstat (limited to 'lib/misc/lvm-percent.h')
-rw-r--r-- | lib/misc/lvm-percent.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/misc/lvm-percent.h b/lib/misc/lvm-percent.h index bf30a7ef8..ff3de42fa 100644 --- a/lib/misc/lvm-percent.h +++ b/lib/misc/lvm-percent.h @@ -31,6 +31,21 @@ typedef int32_t percent_t; typedef enum { + SIGN_NONE = 0, + SIGN_PLUS = 1, + SIGN_MINUS = 2 +} sign_t; + +typedef enum { + PERCENT_NONE = 0, + PERCENT_VG, + PERCENT_FREE, + PERCENT_LV, + PERCENT_PVS, + PERCENT_ORIGIN +} percent_type_t; + +typedef enum { PERCENT_0 = 0, PERCENT_1 = 1000000, PERCENT_100 = 100 * PERCENT_1, @@ -41,4 +56,6 @@ typedef enum { float percent_to_float(percent_t v); percent_t make_percent(uint64_t numerator, uint64_t denominator); +uint32_t percent_of_extents(uint32_t percents, uint32_t count, int roundup); + #endif |