diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2011-02-18 14:11:22 +0000 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2011-02-18 14:11:22 +0000 |
commit | 794e94fe163a9f1ce0974a4a76e96927222f909c (patch) | |
tree | e7129650cc2efab5e27fa0e65924c2bd59ea4bbb /tools/pvresize.c | |
parent | 9dd091e4f4cfa577bf6ee69089a7dfaea1cd2dc4 (diff) | |
download | lvm2-794e94fe163a9f1ce0974a4a76e96927222f909c.tar.gz |
Replace PV_MIN_SIZE with function pv_min_size()
Add configurable option to define minimal size of
of block device usable as a PV.
pv_min_size() is added to lvm-globals and it's being
initialized through _process_config.
Macro PV_MIN_SIZE is unused and removed.
New define DEFAULT_PV_MIN_SIZE_KB is added to lvm-global
and unlike PV_MIN_SIZE it uses KB units.
Should help users with various slow devices attached to the system,
which cannot be easily filtered out (like FDD on /dev/sdX):
https://bugzilla.redhat.com/show_bug.cgi?id=644578
Diffstat (limited to 'tools/pvresize.c')
-rw-r--r-- | tools/pvresize.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/pvresize.c b/tools/pvresize.c index 8582ef429..a471f368e 100644 --- a/tools/pvresize.c +++ b/tools/pvresize.c @@ -111,9 +111,9 @@ static int _pv_resize_single(struct cmd_context *cmd, size = new_size; } - if (size < PV_MIN_SIZE) { - log_error("%s: Size must exceed minimum of %ld sectors.", - pv_name, PV_MIN_SIZE); + if (size < pv_min_size()) { + log_error("%s: Size must exceed minimum of %" PRIu64 " sectors.", + pv_name, pv_min_size()); goto out; } |