From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 19 Jun 2007 21:48:19 -0000 Subject: [Cluster-devel] conga/ricci/modules/storage VG.cpp parted_wrap ... Message-ID: <20070619214819.5303.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit CVSROOT: /cvs/cluster Module name: conga Branch: RHEL5 Changes by: rmccabe at sourceware.org 2007-06-19 21:48:19 Modified files: ricci/modules/storage: VG.cpp parted_wrapper.cpp Log message: Fix 239388: conga storage: default VG creation should be clustered if a cluster node Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/storage/VG.cpp.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.8.2.4&r2=1.8.2.5 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/storage/parted_wrapper.cpp.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.8.2.2&r2=1.8.2.3 --- conga/ricci/modules/storage/VG.cpp 2007/03/30 14:38:33 1.8.2.4 +++ conga/ricci/modules/storage/VG.cpp 2007/06/19 21:48:18 1.8.2.5 @@ -354,10 +354,15 @@ props.set(Variable("extent_size", 4 * 1024 * 1024 /* 4 MB */, ext_sizes)); - + // clustered - props.set(Variable("clustered", false, true)); - + bool use_clustered = false; + try { + LVM::check_locking(); + use_clustered = true; + } catch ( ... ) { } + props.set(Variable("clustered", use_clustered, true)); + // new sources VG unused(VG_PREFIX); for (list >::iterator iter = unused.sources.begin(); --- conga/ricci/modules/storage/parted_wrapper.cpp 2007/03/20 16:17:35 1.8.2.2 +++ conga/ricci/modules/storage/parted_wrapper.cpp 2007/06/19 21:48:18 1.8.2.3 @@ -680,7 +680,7 @@ else if (s[s.size()-2] == 'g') multiplier = 1000 * 1000 * 1000; else if (s[s.size()-2] == 't') - multiplier = 1000 * 1000 * 1000 * 1000; + multiplier = (long long) 1000 * 1000 * 1000 * 1000; } return (long long) utils::to_float(s) * multiplier;