Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
List overview
Download
lvm2-commits
October 2014
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
lvm2-commits@lists.fedorahosted.org
5 participants
169 discussions
Start a n
N
ew thread
master - cleanup: commands.h shorted string
by Zdenek Kabelac
24 Oct '14
24 Oct '14
Gitweb:
http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=df933c2ac92203c7…
Commit: df933c2ac92203c7352be2e7062ca8c01777cb51 Parent: f1cb267274916fcd63456a859ff433bdceefef07 Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Sat Oct 18 10:58:23 2014 +0200 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Fri Oct 24 16:39:31 2014 +0200 cleanup: commands.h shorted string Replace " "\n" with simplier \n" --- tools/commands.h | 498 +++++++++++++++++++++++++++--------------------------- 1 files changed, 249 insertions(+), 249 deletions(-) diff --git a/tools/commands.h b/tools/commands.h index 2e99fb1..524297d 100644 --- a/tools/commands.h +++ b/tools/commands.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved. - * Copyright (C) 2004-2013 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2014 Red Hat, Inc. All rights reserved. * * This file is part of LVM2. * @@ -17,13 +17,13 @@ xx(e2fsadm, "Resize logical volume and ext2 filesystem", "e2fsadm " - "[-d|--debug] " "[-h|--help] " "[-n|--nofsck]" "\n" - "\t{[-l|--extents] [+|-]LogicalExtentsNumber |" "\n" - "\t [-L|--size] [+|-]LogicalVolumeSize[bBsSkKmMgGtTpPeE]}" "\n" - "\t[-t|--test] " "\n" - "\t[-v|--verbose] " "\n" - "\t[--version] " "\n" - "\tLogicalVolumePath" "\n", + "[-d|--debug] " "[-h|--help] " "[-n|--nofsck]\n" + "\t{[-l|--extents] [+|-]LogicalExtentsNumber |\n" + "\t [-L|--size] [+|-]LogicalVolumeSize[bBsSkKmMgGtTpPeE]}\n" + "\t[-t|--test]\n" + "\t[-v|--verbose]\n" + "\t[--version]\n" + "\tLogicalVolumePath\n", extents_ARG, size_ARG, nofsck_ARG, test_ARG) *********/ @@ -31,7 +31,7 @@ xx(e2fsadm, xx(devtypes, "Display recognised built-in block device types", PERMITTED_READ_ONLY, - "devtypes" "\n" + "devtypes\n" "\t[--aligned]\n" "\t[--binary]\n" "\t[--commandprofile ProfileName]\n" @@ -47,7 +47,7 @@ xx(devtypes, "\t[--separator Separator]\n" "\t[--unbuffered]\n" "\t[--unquoted]\n" - "\t[--version]" "\n", + "\t[--version]\n", aligned_ARG, binary_ARG, nameprefixes_ARG, noheadings_ARG, nosuffix_ARG, options_ARG, @@ -58,19 +58,19 @@ xx(dumpconfig, "Dump configuration", PERMITTED_READ_ONLY, "dumpconfig\n" - "\t[-f|--file filename] \n" - "\t[--type {current|default|diff|missing|new|profilable|profilable-command|profilable-metadata} \n" - "\t[--atversion version]] \n" - "\t[--ignoreadvanced] \n" - "\t[--ignoreunsupported] \n" - "\t[--config ConfigurationString] \n" - "\t[--commandprofile ProfileName] \n" - "\t[--profile ProfileName] \n" - "\t[--metadataprofile ProfileName] \n" - "\t[--mergedconfig] \n" + "\t[-f|--file filename]\n" + "\t[--type {current|default|diff|missing|new|profilable|profilable-command|profilable-metadata}\n" + "\t[--atversion version]]\n" + "\t[--ignoreadvanced]\n" + "\t[--ignoreunsupported]\n" + "\t[--config ConfigurationString]\n" + "\t[--commandprofile ProfileName]\n" + "\t[--profile ProfileName]\n" + "\t[--metadataprofile ProfileName]\n" + "\t[--mergedconfig]\n" "\t[--validate]\n" - "\t[--withcomments] \n" - "\t[--withversions] \n" + "\t[--withcomments]\n" + "\t[--withversions]\n" "\t[ConfigurationNode...]\n", atversion_ARG, configtype_ARG, file_ARG, ignoreadvanced_ARG, ignoreunsupported_ARG, mergedconfig_ARG, metadataprofile_ARG, @@ -84,7 +84,7 @@ xx(formats, xx(help, "Display help for commands", PERMITTED_READ_ONLY, - "help <command>" "\n") + "help <command>\n") /********* xx(lvactivate, @@ -117,13 +117,13 @@ xx(lvchange, "\t[--ignoremonitoring]\n" "\t[--ignoreskippedcluster]\n" "\t[-k|--setactivationskip {y|n}]\n" - "\t[-K|--ignoreactivationskip] \n" + "\t[-K|--ignoreactivationskip]\n" "\t[--monitor {y|n}]\n" "\t[--poll {y|n}]\n" "\t[--noudevsync]\n" "\t[-M|--persistent y|n] [--major major] [--minor minor]\n" "\t[--metadataprofile ProfileName]\n" - "\t[-P|--partial] " "\n" + "\t[-P|--partial]\n" "\t[-p|--permission r|rw]\n" "\t[--[raid]minrecoveryrate Rate]\n" "\t[--[raid]maxrecoveryrate Rate]\n" @@ -253,15 +253,15 @@ xx(lvconvert, xx(lvcreate, "Create a logical volume", 0, - "lvcreate " "\n" + "lvcreate\n" "\t[-A|--autobackup {y|n}]\n" "\t[-a|--activate [a|e|l]{y|n}]\n" "\t[--addtag Tag]\n" "\t[--alloc AllocationPolicy]\n" "\t[-H|--cache\n" - "\t [-c|--chunksize ChunkSize]\n" "\t [--cachemode {writeback|writethrough}]\n" "\t[--cachepool CachePoolLogicalVolume{Name|Path}]\n" + "\t[-c|--chunksize ChunkSize]\n" "\t[-C|--contiguous {y|n}]\n" "\t[--commandprofile ProfileName]\n" "\t[-d|--debug]\n" @@ -270,7 +270,7 @@ xx(lvcreate, "\t[--monitor {y|n}]\n" "\t[-i|--stripes Stripes [-I|--stripesize StripeSize]]\n" "\t[-k|--setactivationskip {y|n}]\n" - "\t[-K|--ignoreactivationskip] \n" + "\t[-K|--ignoreactivationskip]\n" "\t{-l|--extents LogicalExtentsNumber[%{VG|PVS|FREE}] |\n" "\t -L|--size LogicalVolumeSize[bBsSkKmMgGtTpPeE]}\n" "\t[-M|--persistent {y|n}] [--major major] [--minor minor]\n" @@ -279,15 +279,14 @@ xx(lvcreate, "\t[-n|--name LogicalVolumeName]\n" "\t[--noudevsync]\n" "\t[-p|--permission {r|rw}]\n" + "\t[--poolmetadatasize MetadataSize[bBsSkKmMgG]]\n" + "\t[--poolmetadataspare {y|n}]]\n" "\t[--[raid]minrecoveryrate Rate]\n" "\t[--[raid]maxrecoveryrate Rate]\n" "\t[-r|--readahead ReadAheadSectors|auto|none]\n" "\t[-R|--regionsize MirrorLogRegionSize]\n" "\t[-T|--thin\n" - "\t [-c|--chunksize ChunkSize]\n" "\t [--discards {ignore|nopassdown|passdown}]\n" - "\t [--poolmetadatasize MetadataSize[bBsSkKmMgG]]\n" - "\t [--poolmetadataspare {y|n}]]\n" "\t[--thinpool ThinPoolLogicalVolume{Name|Path}]\n" "\t[-t|--test]\n" "\t[--type VolumeType]\n" @@ -297,15 +296,16 @@ xx(lvcreate, "\t[--version]\n" "\tVolumeGroupName [PhysicalVolumePath...]\n\n" - "lvcreate \n" + "lvcreate\n" "\t{ {-s|--snapshot} OriginalLogicalVolume[Path] |\n" "\t [-s|--snapshot] VolumeGroupName[Path] -V|--virtualsize VirtualSize}\n" - "\t {-T|--thin} VolumeGroupName[Path][/PoolLogicalVolume] \n" + "\t {-H|--cache} VolumeGroupName[Path][/OriginalLogicalVolume]\n" + "\t {-T|--thin} VolumeGroupName[Path][/PoolLogicalVolume]\n" "\t -V|--virtualsize VirtualSize}\n" - "\t[-c|--chunksize]\n" "\t[-A|--autobackup {y|n}]\n" "\t[--addtag Tag]\n" "\t[--alloc AllocationPolicy]\n" + "\t[-c|--chunksize]\n" "\t[-C|--contiguous {y|n}]\n" "\t[--commandprofile ProfileName]\n" "\t[-d|--debug]\n" @@ -315,7 +315,7 @@ xx(lvcreate, "\t[--monitor {y|n}]\n" "\t[-i|--stripes Stripes [-I|--stripesize StripeSize]]\n" "\t[-k|--setactivationskip {y|n}]\n" - "\t[-K|--ignoreactivationskip] \n" + "\t[-K|--ignoreactivationskip]\n" "\t{-l|--extents LogicalExtentsNumber[%{VG|FREE|ORIGIN}] |\n" "\t -L|--size LogicalVolumeSize[bBsSkKmMgGtTpPeE]}\n" "\t[--poolmetadatasize MetadataVolumeSize[bBsSkKmMgG]]\n" @@ -326,10 +326,10 @@ xx(lvcreate, "\t[-p|--permission {r|rw}]\n" "\t[-r|--readahead ReadAheadSectors|auto|none]\n" "\t[-t|--test]\n" - "\t[--thinpool ThinPoolLogicalVolume[Path]]\n" + "\t[{--thinpool ThinPoolLogicalVolume[Path] |\n" + "\t --cachepool CachePoolLogicalVolume[Path]}]\n" "\t[-v|--verbose]\n" "\t[--version]\n" - "\t[PhysicalVolumePath...]\n\n", addtag_ARG, alloc_ARG, autobackup_ARG, activate_ARG, available_ARG, @@ -357,11 +357,11 @@ xx(lvdisplay, "\t[--ignoreskippedcluster]\n" "\t[-m|--maps]\n" "\t[--nosuffix]\n" - "\t[-P|--partial] " "\n" + "\t[-P|--partial]\n" "\t[--readonly]\n" "\t[--units hHbBsSkKmMgGtTpPeE]\n" "\t[-v|--verbose]\n" - "\t[--version]" "\n" + "\t[--version]\n" "\t[LogicalVolume[Path] [LogicalVolume[Path]...]]\n" "\n" "lvdisplay --columns|-C\n" @@ -377,17 +377,17 @@ xx(lvdisplay, "\t[-o|--options [+]Field[,Field]]\n" "\t[-O|--sort [+|-]key1[,[+|-]key2[,...]]]\n" "\t[-S|--select Selection]\n" - "\t[-P|--partial] " "\n" + "\t[-P|--partial]\n" "\t[--readonly]\n" "\t[--segments]\n" "\t[--separator Separator]\n" "\t[--unbuffered]\n" "\t[--units hHbBsSkKmMgGtTpPeE]\n" "\t[-v|--verbose]\n" - "\t[--version]" "\n" + "\t[--version]\n" "\t[LogicalVolume[Path] [LogicalVolume[Path]...]]\n", - aligned_ARG, all_ARG, colon_ARG, columns_ARG, ignorelockingfailure_ARG, + aligned_ARG, all_ARG, colon_ARG, columns_ARG, ignorelockingfailure_ARG, ignoreskippedcluster_ARG, maps_ARG, noheadings_ARG, nosuffix_ARG, options_ARG, sort_ARG, partial_ARG, readonly_ARG, segments_ARG, select_ARG, separator_ARG, unbuffered_ARG, units_ARG) @@ -415,7 +415,7 @@ xx(lvextend, "\t[-t|--test]\n" "\t[--type VolumeType]\n" "\t[-v|--verbose]\n" - "\t[--version]" "\n" + "\t[--version]\n" "\tLogicalVolume[Path] [ PhysicalVolumePath... ]\n", alloc_ARG, autobackup_ARG, extents_ARG, force_ARG, mirrors_ARG, @@ -432,7 +432,7 @@ xx(lvmchange, "\t[-h|--help]\n" "\t[-R|--reset]\n" "\t[-v|--verbose]\n" - "\t[--version]" "\n", + "\t[--version]\n", reset_ARG) @@ -445,7 +445,7 @@ xx(lvmdiskscan, "\t[-h|--help]\n" "\t[-l|--lvmpartition]\n" "\t[--readonly]\n" - "\t[--version]" "\n", + "\t[--version]\n", lvmpartition_ARG, readonly_ARG) @@ -457,8 +457,8 @@ xx(lvmsadc, "\t[-d|--debug]\n" "\t[-h|--help]\n" "\t[-v|--verbose]\n" - "\t[--version]" "\n" - "\t[LogFilePath]\n" ) + "\t[--version]\n" + "\t[LogFilePath]\n") xx(lvmsar, "Create activity report", @@ -470,7 +470,7 @@ xx(lvmsar, "\t[-h|--help]\n" "\t[-s|--stdin]\n" "\t[-v|--verbose]\n" - "\t[--version]" "\n" + "\t[--version]\n" "\tLogFilePath\n", full_ARG, stdin_ARG) @@ -491,7 +491,7 @@ xx(lvreduce, "\t[-r|--resizefs]\n" "\t[-t|--test]\n" "\t[-v|--verbose]\n" - "\t[--version]" "\n" + "\t[--version]\n" "\t[-y|--yes]\n" "\tLogicalVolume[Path]\n", @@ -510,7 +510,7 @@ xx(lvremove, "\t[--noudevsync]\n" "\t[-t|--test]\n" "\t[-v|--verbose]\n" - "\t[--version]" "\n" + "\t[--version]\n" "\tLogicalVolume[Path] [LogicalVolume[Path]...]\n", autobackup_ARG, force_ARG, noudevsync_ARG, test_ARG) @@ -519,15 +519,15 @@ xx(lvrename, "Rename a logical volume", 0, "lvrename\n" - "\t[-A|--autobackup {y|n}] " "\n" + "\t[-A|--autobackup {y|n}]\n" "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug] " "\n" - "\t[-h|-?|--help] " "\n" + "\t[-d|--debug]\n" + "\t[-h|-?|--help]\n" "\t[--noudevsync]\n" - "\t[-t|--test] " "\n" - "\t[-v|--verbose]" "\n" - "\t[--version] " "\n" - "\t{ OldLogicalVolumePath NewLogicalVolumePath |" "\n" + "\t[-t|--test]\n" + "\t[-v|--verbose]\n" + "\t[--version]\n" + "\t{ OldLogicalVolumePath NewLogicalVolumePath |\n" "\t VolumeGroupName OldLogicalVolumeName NewLogicalVolumeName }\n", autobackup_ARG, noudevsync_ARG, test_ARG) @@ -552,7 +552,7 @@ xx(lvresize, "\t[-t|--test]\n" "\t[--type VolumeType]\n" "\t[-v|--verbose]\n" - "\t[--version]" "\n" + "\t[--version]\n" "\tLogicalVolume[Path] [ PhysicalVolumePath... ]\n", alloc_ARG, autobackup_ARG, extents_ARG, force_ARG, nofsck_ARG, @@ -563,7 +563,7 @@ xx(lvresize, xx(lvs, "Display information about logical volumes", PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT, - "lvs" "\n" + "lvs\n" "\t[-a|--all]\n" "\t[--aligned]\n" "\t[--binary]\n" @@ -577,7 +577,7 @@ xx(lvs, "\t[--nosuffix]\n" "\t[-o|--options [+]Field[,Field]]\n" "\t[-O|--sort [+|-]key1[,[+|-]key2[,...]]]\n" - "\t[-P|--partial] " "\n" + "\t[-P|--partial]\n" "\t[--readonly]\n" "\t[--rows]\n" "\t[--segments]\n" @@ -588,7 +588,7 @@ xx(lvs, "\t[--units hHbBsSkKmMgGtTpPeE]\n" "\t[--unquoted]\n" "\t[-v|--verbose]\n" - "\t[--version]" "\n" + "\t[--version]\n" "\t[LogicalVolume[Path] [LogicalVolume[Path]...]]\n", aligned_ARG, all_ARG, binary_ARG, ignorelockingfailure_ARG, @@ -600,17 +600,17 @@ xx(lvs, xx(lvscan, "List all logical volumes in all volume groups", PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT, - "lvscan " "\n" + "lvscan\n" "\t[-a|--all]\n" - "\t[-b|--blockdevice] " "\n" + "\t[-b|--blockdevice]\n" "\t[--cache]\n" "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug] " "\n" - "\t[-h|-?|--help] " "\n" + "\t[-d|--debug]\n" + "\t[-h|-?|--help]\n" "\t[--ignorelockingfailure]\n" - "\t[-P|--partial] " "\n" + "\t[-P|--partial]\n" "\t[--readonly]\n" - "\t[-v|--verbose] " "\n" + "\t[-v|--verbose]\n" "\t[--version]\n", all_ARG, blockdevice_ARG, ignorelockingfailure_ARG, partial_ARG, @@ -633,7 +633,7 @@ xx(pvchange, "\t[-v|--verbose]\n" "\t[--addtag Tag]\n" "\t[--deltag Tag]\n" - "\t[--version]" "\n" + "\t[--version]\n" "\t[PhysicalVolumePath...]\n", all_ARG, allocatable_ARG, allocation_ARG, autobackup_ARG, deltag_ARG, @@ -642,14 +642,14 @@ xx(pvchange, xx(pvresize, "Resize physical volume(s)", 0, - "pvresize " "\n" + "pvresize\n" "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]" "\n" - "\t[-h|-?|--help] " "\n" - "\t[--setphysicalvolumesize PhysicalVolumeSize[bBsSkKmMgGtTpPeE]" "\n" - "\t[-t|--test] " "\n" - "\t[-v|--verbose] " "\n" - "\t[--version] " "\n" + "\t[-d|--debug]\n" + "\t[-h|-?|--help]\n" + "\t[--setphysicalvolumesize PhysicalVolumeSize[bBsSkKmMgGtTpPeE]\n" + "\t[-t|--test]\n" + "\t[-v|--verbose]\n" + "\t[--version]\n" "\tPhysicalVolume [PhysicalVolume...]\n", physicalvolumesize_ARG, test_ARG) @@ -661,9 +661,9 @@ xx(pvck, "\t[--commandprofile ProfileName]\n" "\t[-d|--debug]\n" "\t[-h|--help]\n" - "\t[--labelsector sector] " "\n" + "\t[--labelsector sector]\n" "\t[-v|--verbose]\n" - "\t[--version]" "\n" + "\t[--version]\n" "\tPhysicalVolume [PhysicalVolume...]\n", labelsector_ARG) @@ -671,27 +671,27 @@ xx(pvck, xx(pvcreate, "Initialize physical volume(s) for use by LVM", 0, - "pvcreate " "\n" + "pvcreate\n" "\t[--norestorefile]\n" "\t[--restorefile file]\n" "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]" "\n" - "\t[-f[f]|--force [--force]] " "\n" - "\t[-h|-?|--help] " "\n" - "\t[--labelsector sector] " "\n" - "\t[-M|--metadatatype 1|2]" "\n" - "\t[--pvmetadatacopies #copies]" "\n" - "\t[--bootloaderareasize BootLoaderAreaSize[bBsSkKmMgGtTpPeE]]" "\n" - "\t[--metadatasize MetadataSize[bBsSkKmMgGtTpPeE]]" "\n" - "\t[--dataalignment Alignment[bBsSkKmMgGtTpPeE]]" "\n" - "\t[--dataalignmentoffset AlignmentOffset[bBsSkKmMgGtTpPeE]]" "\n" - "\t[--setphysicalvolumesize PhysicalVolumeSize[bBsSkKmMgGtTpPeE]" "\n" - "\t[-t|--test] " "\n" - "\t[-u|--uuid uuid] " "\n" - "\t[-v|--verbose] " "\n" - "\t[-y|--yes]" "\n" + "\t[-d|--debug]\n" + "\t[-f[f]|--force [--force]]\n" + "\t[-h|-?|--help]\n" + "\t[--labelsector sector]\n" + "\t[-M|--metadatatype 1|2]\n" + "\t[--pvmetadatacopies #copies]\n" + "\t[--bootloaderareasize BootLoaderAreaSize[bBsSkKmMgGtTpPeE]]\n" + "\t[--metadatasize MetadataSize[bBsSkKmMgGtTpPeE]]\n" + "\t[--dataalignment Alignment[bBsSkKmMgGtTpPeE]]\n" + "\t[--dataalignmentoffset AlignmentOffset[bBsSkKmMgGtTpPeE]]\n" + "\t[--setphysicalvolumesize PhysicalVolumeSize[bBsSkKmMgGtTpPeE]\n" + "\t[-t|--test]\n" + "\t[-u|--uuid uuid]\n" + "\t[-v|--verbose]\n" + "\t[-y|--yes]\n" "\t[-Z|--zero {y|n}]\n" - "\t[--version] " "\n" + "\t[--version]\n" "\tPhysicalVolume [PhysicalVolume...]\n", dataalignment_ARG, dataalignmentoffset_ARG, bootloaderareasize_ARG, @@ -703,18 +703,18 @@ xx(pvcreate, xx(pvdata, "Display the on-disk metadata for physical volume(s)", 0, - "pvdata " "\n" - "\t[-a|--all] " "\n" + "pvdata\n" + "\t[-a|--all]\n" "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug] " "\n" - "\t[-E|--physicalextent] " "\n" - "\t[-h|-?|--help]" "\n" - "\t[-L|--logicalvolume] " "\n" - "\t[-P[P]|--physicalvolume [--physicalvolume]]" "\n" - "\t[-U|--uuidlist] " "\n" - "\t[-v[v]|--verbose [--verbose]] " "\n" - "\t[-V|--volumegroup]" "\n" - "\t[--version] " "\n" + "\t[-d|--debug]\n" + "\t[-E|--physicalextent]\n" + "\t[-h|-?|--help]\n" + "\t[-L|--logicalvolume]\n" + "\t[-P[P]|--physicalvolume [--physicalvolume]]\n" + "\t[-U|--uuidlist]\n" + "\t[-v[v]|--verbose [--verbose]]\n" + "\t[-V|--volumegroup]\n" + "\t[--version]\n" "\tPhysicalVolume [PhysicalVolume...]\n", all_ARG, logicalextent_ARG, physicalextent_ARG, @@ -736,7 +736,7 @@ xx(pvdisplay, "\t[-s|--short]\n" "\t[--units hHbBsSkKmMgGtTpPeE]\n" "\t[-v|--verbose]\n" - "\t[--version]" "\n" + "\t[--version]\n" "\t[PhysicalVolumePath [PhysicalVolumePath...]]\n" "\n" "pvdisplay --columns|-C\n" @@ -757,7 +757,7 @@ xx(pvdisplay, "\t[--unbuffered]\n" "\t[--units hHbBsSkKmMgGtTpPeE]\n" "\t[-v|--verbose]\n" - "\t[--version]" "\n" + "\t[--version]\n" "\t[PhysicalVolumePath [PhysicalVolumePath...]]\n", aligned_ARG, all_ARG, colon_ARG, columns_ARG, ignorelockingfailure_ARG, @@ -768,7 +768,7 @@ xx(pvdisplay, xx(pvmove, "Move extents from one physical volume to another", ALL_VGS_IS_DEFAULT, /* For polldaemon to find pvmoves in-progress using process_each_vg. */ - "pvmove " "\n" + "pvmove\n" "\t[--abort]\n" "\t[--alloc AllocationPolicy]\n" "\t[--atomic]\n" @@ -793,15 +793,15 @@ xx(pvmove, xx(pvremove, "Remove LVM label(s) from physical volume(s)", 0, - "pvremove " "\n" + "pvremove\n" "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]" "\n" - "\t[-f[f]|--force [--force]] " "\n" - "\t[-h|-?|--help] " "\n" - "\t[-t|--test] " "\n" - "\t[-v|--verbose] " "\n" - "\t[--version] " "\n" - "\t[-y|--yes]" "\n" + "\t[-d|--debug]\n" + "\t[-f[f]|--force [--force]]\n" + "\t[-h|-?|--help]\n" + "\t[-t|--test]\n" + "\t[-v|--verbose]\n" + "\t[--version]\n" + "\t[-y|--yes]\n" "\tPhysicalVolume [PhysicalVolume...]\n", force_ARG, test_ARG) @@ -809,13 +809,13 @@ xx(pvremove, xx(pvs, "Display information about physical volumes", CACHE_VGMETADATA | PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT | ENABLE_ALL_DEVS, - "pvs" "\n" + "pvs\n" "\t[-a|--all]\n" "\t[--aligned]\n" "\t[--binary]\n" "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]" "\n" - "\t[-h|-?|--help] " "\n" + "\t[-d|--debug]\n" + "\t[-h|-?|--help]\n" "\t[--ignorelockingfailure]\n" "\t[--ignoreskippedcluster]\n" "\t[--nameprefixes]\n" @@ -823,7 +823,7 @@ xx(pvs, "\t[--nosuffix]\n" "\t[-o|--options [+]Field[,Field]]\n" "\t[-O|--sort [+|-]key1[,[+|-]key2[,...]]]\n" - "\t[-P|--partial] " "\n" + "\t[-P|--partial]\n" "\t[--readonly]\n" "\t[--rows]\n" "\t[--segments]\n" @@ -846,19 +846,19 @@ xx(pvs, xx(pvscan, "List all physical volumes", PERMITTED_READ_ONLY, - "pvscan " "\n" + "pvscan\n" "\t[-b|--background]\n" "\t[--cache [-a|--activate ay] [ DevicePath | --major major --minor minor]...]\n" "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug] " "\n" - "\t{-e|--exported | -n|--novolumegroup} " "\n" - "\t[-h|-?|--help]" "\n" + "\t[-d|--debug]\n" + "\t{-e|--exported | -n|--novolumegroup}\n" + "\t[-h|-?|--help]\n" "\t[--ignorelockingfailure]\n" - "\t[-P|--partial] " "\n" + "\t[-P|--partial]\n" "\t[--readonly]\n" - "\t[-s|--short] " "\n" - "\t[-u|--uuid] " "\n" - "\t[-v|--verbose] " "\n" + "\t[-s|--short]\n" + "\t[-u|--uuid]\n" + "\t[-v|--verbose]\n" "\t[--version]\n", activate_ARG, available_ARG, backgroundfork_ARG, cache_long_ARG, @@ -878,16 +878,16 @@ xx(tags, xx(vgcfgbackup, "Backup volume group configuration(s)", PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT, - "vgcfgbackup " "\n" + "vgcfgbackup\n" "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug] " "\n" - "\t[-f|--file filename] " "\n" - "\t[-h|-?|--help] " "\n" + "\t[-d|--debug]\n" + "\t[-f|--file filename]\n" + "\t[-h|-?|--help]\n" "\t[--ignorelockingfailure]\n" - "\t[-P|--partial] " "\n" + "\t[-P|--partial]\n" "\t[--readonly]\n" - "\t[-v|--verbose]" "\n" - "\t[--version] " "\n" + "\t[-v|--verbose]\n" + "\t[--version]\n" "\t[VolumeGroupName...]\n", file_ARG, ignorelockingfailure_ARG, partial_ARG, readonly_ARG) @@ -895,17 +895,17 @@ xx(vgcfgbackup, xx(vgcfgrestore, "Restore volume group configuration", 0, - "vgcfgrestore " "\n" + "vgcfgrestore\n" "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug] " "\n" - "\t[-f|--file filename] " "\n" + "\t[-d|--debug]\n" + "\t[-f|--file filename]\n" "\t[--force]\n" - "\t[-l[l]|--list [--list]]" "\n" - "\t[-M|--metadatatype 1|2]" "\n" - "\t[-h|--help]" "\n" - "\t[-t|--test] " "\n" - "\t[-v|--verbose]" "\n" - "\t[--version] " "\n" + "\t[-l[l]|--list [--list]]\n" + "\t[-M|--metadatatype 1|2]\n" + "\t[-h|--help]\n" + "\t[-t|--test]\n" + "\t[-v|--verbose]\n" + "\t[--version]\n" "\tVolumeGroupName", file_ARG, force_long_ARG, list_ARG, metadatatype_ARG, test_ARG) @@ -913,36 +913,36 @@ xx(vgcfgrestore, xx(vgchange, "Change volume group attributes", CACHE_VGMETADATA | PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT, - "vgchange" "\n" - "\t[-A|--autobackup {y|n}] " "\n" - "\t[--alloc AllocationPolicy] " "\n" - "\t[-P|--partial] " "\n" + "vgchange\n" + "\t[-A|--autobackup {y|n}]\n" + "\t[--alloc AllocationPolicy]\n" + "\t[-P|--partial]\n" "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug] " "\n" - "\t[--detachprofile] " "\n" - "\t[-h|--help] " "\n" + "\t[-d|--debug]\n" + "\t[--detachprofile]\n" + "\t[-h|--help]\n" "\t[--ignorelockingfailure]\n" "\t[--ignoremonitoring]\n" "\t[--ignoreskippedcluster]\n" - "\t[-K|--ignoreactivationskip] \n" + "\t[-K|--ignoreactivationskip]\n" "\t[--metadataprofile ProfileName]\n" "\t[--monitor {y|n}]\n" - "\t[--[vg]metadatacopies #copies] " "\n" + "\t[--[vg]metadatacopies #copies]\n" "\t[--poll {y|n}]\n" "\t[--noudevsync]\n" "\t[--refresh]\n" "\t[--sysinit]\n" - "\t[-t|--test]" "\n" - "\t[-u|--uuid] " "\n" - "\t[-v|--verbose] " "\n" - "\t[--version]" "\n" - "\t{-a|--activate [a|e|l]{y|n} |" "\n" - "\t[--activationmode {complete|degraded|partial}]" "\n" - "\t -c|--clustered {y|n} |" "\n" - "\t -x|--resizeable {y|n} |" "\n" - "\t -l|--logicalvolume MaxLogicalVolumes |" "\n" - "\t -p|--maxphysicalvolumes MaxPhysicalVolumes |" "\n" - "\t -s|--physicalextentsize PhysicalExtentSize[bBsSkKmMgGtTpPeE] |" "\n" + "\t[-t|--test]\n" + "\t[-u|--uuid]\n" + "\t[-v|--verbose]\n" + "\t[--version]\n" + "\t{-a|--activate [a|e|l]{y|n} |\n" + "\t[--activationmode {complete|degraded|partial}]\n" + "\t -c|--clustered {y|n} |\n" + "\t -x|--resizeable {y|n} |\n" + "\t -l|--logicalvolume MaxLogicalVolumes |\n" + "\t -p|--maxphysicalvolumes MaxPhysicalVolumes |\n" + "\t -s|--physicalextentsize PhysicalExtentSize[bBsSkKmMgGtTpPeE] |\n" "\t --addtag Tag |\n" "\t --deltag Tag}\n" "\t[VolumeGroupName...]\n", @@ -964,52 +964,52 @@ xx(vgck, "\t[-d|--debug]\n" "\t[-h|--help]\n" "\t[-v|--verbose]\n" - "\t[--version]" "\n" - "\t[VolumeGroupName...]\n" ) + "\t[--version]\n" + "\t[VolumeGroupName...]\n") xx(vgconvert, "Change volume group metadata format", 0, - "vgconvert " "\n" + "vgconvert\n" "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]" "\n" - "\t[-h|--help] " "\n" - "\t[--labelsector sector] " "\n" - "\t[-M|--metadatatype 1|2]" "\n" - "\t[--pvmetadatacopies #copies]" "\n" - "\t[--metadatasize MetadataSize[bBsSkKmMgGtTpPeE]]" "\n" - "\t[--bootloaderareasize BootLoaderAreaSize[bBsSkKmMgGtTpPeE]]" "\n" - "\t[-t|--test] " "\n" - "\t[-v|--verbose] " "\n" - "\t[--version] " "\n" + "\t[-d|--debug]\n" + "\t[-h|--help]\n" + "\t[--labelsector sector]\n" + "\t[-M|--metadatatype 1|2]\n" + "\t[--pvmetadatacopies #copies]\n" + "\t[--metadatasize MetadataSize[bBsSkKmMgGtTpPeE]]\n" + "\t[--bootloaderareasize BootLoaderAreaSize[bBsSkKmMgGtTpPeE]]\n" + "\t[-t|--test]\n" + "\t[-v|--verbose]\n" + "\t[--version]\n" "\tVolumeGroupName [VolumeGroupName...]\n", force_ARG, test_ARG, labelsector_ARG, bootloaderareasize_ARG, metadatatype_ARG, metadatacopies_ARG, pvmetadatacopies_ARG, - metadatasize_ARG ) + metadatasize_ARG) xx(vgcreate, "Create a volume group", 0, - "vgcreate" "\n" - "\t[-A|--autobackup {y|n}] " "\n" - "\t[--addtag Tag] " "\n" - "\t[--alloc AllocationPolicy] " "\n" - "\t[-c|--clustered {y|n}] " "\n" + "vgcreate\n" + "\t[-A|--autobackup {y|n}]\n" + "\t[--addtag Tag]\n" + "\t[--alloc AllocationPolicy]\n" + "\t[-c|--clustered {y|n}]\n" "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]" "\n" - "\t[-h|--help]" "\n" - "\t[-l|--maxlogicalvolumes MaxLogicalVolumes]" "\n" + "\t[-d|--debug]\n" + "\t[-h|--help]\n" + "\t[-l|--maxlogicalvolumes MaxLogicalVolumes]\n" "\t[--metadataprofile ProfileName]\n" - "\t[-M|--metadatatype 1|2] " "\n" - "\t[--[vg]metadatacopies #copies] " "\n" - "\t[-p|--maxphysicalvolumes MaxPhysicalVolumes] " "\n" - "\t[-s|--physicalextentsize PhysicalExtentSize[bBsSkKmMgGtTpPeE]] " "\n" - "\t[-t|--test] " "\n" - "\t[-v|--verbose]" "\n" - "\t[--version] " "\n" - "\t[-y|--yes]" "\n" - "\t[ PHYSICAL DEVICE OPTIONS ] " "\n" + "\t[-M|--metadatatype 1|2]\n" + "\t[--[vg]metadatacopies #copies]\n" + "\t[-p|--maxphysicalvolumes MaxPhysicalVolumes]\n" + "\t[-s|--physicalextentsize PhysicalExtentSize[bBsSkKmMgGtTpPeE]]\n" + "\t[-t|--test]\n" + "\t[-v|--verbose]\n" + "\t[--version]\n" + "\t[-y|--yes]\n" + "\t[ PHYSICAL DEVICE OPTIONS ]\n" "\tVolumeGroupName PhysicalDevicePath [PhysicalDevicePath...]\n", addtag_ARG, alloc_ARG, autobackup_ARG, clustered_ARG, maxlogicalvolumes_ARG, @@ -1021,40 +1021,40 @@ xx(vgcreate, xx(vgdisplay, "Display volume group information", PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT, - "vgdisplay " "\n" - "\t[-A|--activevolumegroups]" "\n" - "\t[-c|--colon | -s|--short | -v|--verbose]" "\n" + "vgdisplay\n" + "\t[-A|--activevolumegroups]\n" + "\t[-c|--colon | -s|--short | -v|--verbose]\n" "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug] " "\n" - "\t[-h|--help] " "\n" - "\t[--ignorelockingfailure]" "\n" + "\t[-d|--debug]\n" + "\t[-h|--help]\n" + "\t[--ignorelockingfailure]\n" "\t[--ignoreskippedcluster]\n" "\t[--nosuffix]\n" - "\t[-P|--partial] " "\n" + "\t[-P|--partial]\n" "\t[--readonly]\n" "\t[--units hHbBsSkKmMgGtTpPeE]\n" - "\t[--version]" "\n" + "\t[--version]\n" "\t[VolumeGroupName [VolumeGroupName...]]\n" "\n" "vgdisplay --columns|-C\n" "\t[--aligned]\n" "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug] " "\n" - "\t[-h|--help] " "\n" - "\t[--ignorelockingfailure]" "\n" + "\t[-d|--debug]\n" + "\t[-h|--help]\n" + "\t[--ignorelockingfailure]\n" "\t[--ignoreskippedcluster]\n" "\t[--noheadings]\n" "\t[--nosuffix]\n" "\t[-o|--options [+]Field[,Field]]\n" "\t[-O|--sort [+|-]key1[,[+|-]key2[,...]]]\n" - "\t[-P|--partial] " "\n" + "\t[-P|--partial]\n" "\t[-S|--select Selection]\n" "\t[--readonly]\n" "\t[--separator Separator]\n" "\t[--unbuffered]\n" "\t[--units hHbBsSkKmMgGtTpPeE]\n" - "\t[--verbose]" "\n" - "\t[--version]" "\n" + "\t[--verbose]\n" + "\t[--version]\n" "\t[VolumeGroupName [VolumeGroupName...]]\n", activevolumegroups_ARG, aligned_ARG, colon_ARG, columns_ARG, @@ -1065,13 +1065,13 @@ xx(vgdisplay, xx(vgexport, "Unregister volume group(s) from the system", ALL_VGS_IS_DEFAULT, - "vgexport " "\n" - "\t[-a|--all] " "\n" + "vgexport\n" + "\t[-a|--all]\n" "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug] " "\n" - "\t[-h|--help]" "\n" - "\t[-v|--verbose] " "\n" - "\t[--version] " "\n" + "\t[-d|--debug]\n" + "\t[-h|--help]\n" + "\t[-v|--verbose]\n" + "\t[--version]\n" "\tVolumeGroupName [VolumeGroupName...]\n", all_ARG, test_ARG) @@ -1088,9 +1088,9 @@ xx(vgextend, "\t[-h|--help]\n" "\t[-t|--test]\n" "\t[-v|--verbose]\n" - "\t[--version]" "\n" + "\t[--version]\n" "\t[-y|--yes]\n" - "\t[ PHYSICAL DEVICE OPTIONS ] " "\n" + "\t[ PHYSICAL DEVICE OPTIONS ]\n" "\tVolumeGroupName PhysicalDevicePath [PhysicalDevicePath...]\n", autobackup_ARG, test_ARG, @@ -1102,16 +1102,16 @@ xx(vgextend, xx(vgimport, "Register exported volume group with system", ALL_VGS_IS_DEFAULT, - "vgimport " "\n" + "vgimport\n" "\t[-a|--all]\n" "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug] " "\n" - "\t[-f|--force] " "\n" - "\t[-h|--help] " "\n" - "\t[-t|--test] " "\n" - "\t[-v|--verbose]" "\n" - "\t[--version]" "\n" - "\tVolumeGroupName..." "\n", + "\t[-d|--debug]\n" + "\t[-f|--force]\n" + "\t[-h|--help]\n" + "\t[-t|--test]\n" + "\t[-v|--verbose]\n" + "\t[--version]\n" + "\tVolumeGroupName...\n", all_ARG, force_ARG, test_ARG) @@ -1126,7 +1126,7 @@ xx(vgmerge, "\t[-l|--list]\n" "\t[-t|--test]\n" "\t[-v|--verbose]\n" - "\t[--version]" "\n" + "\t[--version]\n" "\tDestinationVolumeGroupName SourceVolumeGroupName\n", autobackup_ARG, list_ARG, test_ARG) @@ -1141,7 +1141,7 @@ xx(vgmknodes, "\t[--ignorelockingfailure]\n" "\t[--refresh]\n" "\t[-v|--verbose]\n" - "\t[--version]" "\n" + "\t[--version]\n" "\t[VolumeGroupName...]\n", ignorelockingfailure_ARG, refresh_ARG) @@ -1160,7 +1160,7 @@ xx(vgreduce, "\t[-f|--force]\n" "\t[-t|--test]\n" "\t[-v|--verbose]\n" - "\t[--version]" "\n" + "\t[--version]\n" "\tVolumeGroupName\n" "\t[PhysicalVolumePath...]\n", @@ -1178,7 +1178,7 @@ xx(vgremove, "\t[--noudevsync]\n" "\t[-t|--test]\n" "\t[-v|--verbose]\n" - "\t[--version]" "\n" + "\t[--version]\n" "\tVolumeGroupName [VolumeGroupName...]\n", force_ARG, noudevsync_ARG, test_ARG) @@ -1193,7 +1193,7 @@ xx(vgrename, "\t[-h|--help]\n" "\t[-t|--test]\n" "\t[-v|--verbose]\n" - "\t[--version]" "\n" + "\t[--version]\n" "\tOldVolumeGroupPath NewVolumeGroupPath |\n" "\tOldVolumeGroupName NewVolumeGroupName\n", @@ -1202,7 +1202,7 @@ xx(vgrename, xx(vgs, "Display information about volume groups", PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT, - "vgs" "\n" + "vgs\n" "\t[--aligned]\n" "\t[--binary]\n" "\t[-a|--all]\n" @@ -1216,7 +1216,7 @@ xx(vgs, "\t[--nosuffix]\n" "\t[-o|--options [+]Field[,Field]]\n" "\t[-O|--sort [+|-]key1[,[+|-]key2[,...]]]\n" - "\t[-P|--partial] " "\n" + "\t[-P|--partial]\n" "\t[--readonly]\n" "\t[--rows]\n" "\t[-S|--select Selection]\n" @@ -1245,31 +1245,31 @@ xx(vgscan, "\t[-h|--help]\n" "\t[--ignorelockingfailure]\n" "\t[--mknodes]\n" - "\t[-P|--partial] " "\n" + "\t[-P|--partial]\n" "\t[-v|--verbose]\n" - "\t[--version]" "\n", + "\t[--version]\n", cache_long_ARG, ignorelockingfailure_ARG, mknodes_ARG, partial_ARG) xx(vgsplit, "Move physical volumes into a new or existing volume group", 0, - "vgsplit " "\n" - "\t[-A|--autobackup {y|n}] " "\n" - "\t[--alloc AllocationPolicy] " "\n" - "\t[-c|--clustered {y|n}] " "\n" + "vgsplit\n" + "\t[-A|--autobackup {y|n}]\n" + "\t[--alloc AllocationPolicy]\n" + "\t[-c|--clustered {y|n}]\n" "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug] " "\n" - "\t[-h|--help] " "\n" - "\t[-l|--maxlogicalvolumes MaxLogicalVolumes]" "\n" - "\t[-M|--metadatatype 1|2] " "\n" - "\t[--[vg]metadatacopies #copies] " "\n" + "\t[-d|--debug]\n" + "\t[-h|--help]\n" + "\t[-l|--maxlogicalvolumes MaxLogicalVolumes]\n" + "\t[-M|--metadatatype 1|2]\n" + "\t[--[vg]metadatacopies #copies]\n" "\t[-n|--name LogicalVolumeName]\n" - "\t[-p|--maxphysicalvolumes MaxPhysicalVolumes] " "\n" - "\t[-t|--test] " "\n" - "\t[-v|--verbose] " "\n" - "\t[--version]" "\n" - "\tSourceVolumeGroupName DestinationVolumeGroupName" "\n" + "\t[-p|--maxphysicalvolumes MaxPhysicalVolumes]\n" + "\t[-t|--test]\n" + "\t[-v|--verbose]\n" + "\t[--version]\n" + "\tSourceVolumeGroupName DestinationVolumeGroupName\n" "\t[PhysicalVolumePath...]\n", alloc_ARG, autobackup_ARG, clustered_ARG, @@ -1279,4 +1279,4 @@ xx(vgsplit, xx(version, "Display software and driver version information", PERMITTED_READ_ONLY, - "version\n" ) + "version\n")
1
0
0
0
master - lv_manip: preserve read-only status in layered volume
by Zdenek Kabelac
24 Oct '14
24 Oct '14
Gitweb:
http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f1cb267274916fcd…
Commit: f1cb267274916fcd63456a859ff433bdceefef07 Parent: be3f666ef3ad25f2af598ecfa305ab9c2f7de3f4 Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Thu Oct 23 14:27:05 2014 +0200 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Fri Oct 24 16:39:31 2014 +0200 lv_manip: preserve read-only status in layered volume --- lib/metadata/lv_manip.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c index 3c84a5c..6240f14 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c @@ -6075,7 +6075,9 @@ struct logical_volume *insert_layer_for_lv(struct cmd_context *cmd, return NULL; } - if (!(layer_lv = lv_create_empty(name, NULL, LVM_READ | LVM_WRITE, + if (!(layer_lv = lv_create_empty(name, NULL, + /* Preserve read-only flag */ + LVM_READ | (lv_where->status & LVM_WRITE), ALLOC_INHERIT, lv_where->vg))) { log_error("Creation of layer LV failed"); return NULL;
1
0
0
0
master - lv_manip: improve should_wipe reporting
by Zdenek Kabelac
24 Oct '14
24 Oct '14
Gitweb:
http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=be3f666ef3ad25f2…
Commit: be3f666ef3ad25f2af598ecfa305ab9c2f7de3f4 Parent: 2fc403b0fc5c7fffec4d7864433d0db3c139995c Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Wed Oct 22 13:29:25 2014 +0200 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Fri Oct 24 16:39:31 2014 +0200 lv_manip: improve should_wipe reporting We want to print smarter warning message only when the zeroing was not provided on the first zeroable segment of newly created LV. Put warning within _should_wipe_lv function to avoid reevaluation of same conditions twice. --- WHATS_NEW | 1 + lib/metadata/lv_manip.c | 40 +++++++++++++++++++++++++--------------- 2 files changed, 26 insertions(+), 15 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index e2372e5..70b41bc 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.112 - ===================================== + Improve _should_wipe_lv() to warn with message. Inform about temporarily created volumes only in verbose mode. Better support for --test mode with pool creation. Query lock holding LV when replacing and converting raid volumes. diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c index 61620e5..3c84a5c 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c @@ -6530,14 +6530,31 @@ int lv_activation_skip(struct logical_volume *lv, activation_change_t activate, return 1; } -static int _should_wipe_lv(struct lvcreate_params *lp, struct logical_volume *lv) { - int r = lp->zero | lp->wipe_signatures; +static int _should_wipe_lv(struct lvcreate_params *lp, + struct logical_volume *lv, int warn) +{ + /* Unzeroable segment */ + if (first_seg(lv)->segtype->flags & SEG_CANNOT_BE_ZEROED) + return 0; - if (!seg_is_thin(lp) && !seg_is_cache_pool(lp)) - return r; + /* Thin snapshot need not to be zeroed */ + /* Thin pool with zeroing doesn't need zeroing or wiping */ + if (lv_is_thin_volume(lv) && + (first_seg(lv)->origin || + first_seg(first_seg(lv)->pool_lv)->zero_new_blocks)) + return 0; - if (lv_is_thin_volume(lv)) - return r && !lp->snapshot && !first_seg(first_seg(lv)->pool_lv)->zero_new_blocks; + /* Cannot zero read-only volume */ + if ((lv->status & LVM_WRITE) && + (lp->zero || lp->wipe_signatures)) + return 1; + + if (warn && (!lp->zero || !(lv->status & LVM_WRITE))) + log_warn("WARNING: Logical volume %s not zeroed.", + display_lvname(lv)); + if (warn && (!lp->wipe_signatures || !(lv->status & LVM_WRITE))) + log_verbose("Signature wiping on logical volume %s not requested.", + display_lvname(lv)); return 0; } @@ -7017,7 +7034,7 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg, } /* Do not scan this LV until properly zeroed/wiped. */ - if (_should_wipe_lv(lp, lv)) + if (_should_wipe_lv(lp, lv, 0)) lv->status |= LV_NOSCAN; if (lp->temporary) @@ -7073,14 +7090,7 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg, return NULL; } - if (!seg_is_thin(lp) && !lp->snapshot) { - if (!lp->zero) - log_warn("WARNING: \"%s/%s\" not zeroed", lv->vg->name, lv->name); - if (!lp->wipe_signatures) - log_verbose("Signature wiping on \"%s/%s\" not requested", lv->vg->name, lv->name); - } - - if (_should_wipe_lv(lp, lv)) { + if (_should_wipe_lv(lp, lv, 1)) { if (!wipe_lv(lv, (struct wipe_params) { .do_zero = lp->zero,
1
0
0
0
master - toollib: new arg list functions
by Zdenek Kabelac
24 Oct '14
24 Oct '14
Gitweb:
http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=2fc403b0fc5c7fff…
Commit: 2fc403b0fc5c7fffec4d7864433d0db3c139995c Parent: fd1aa7fd5a1ccd7ebcf3446988110ad5c16fddc7 Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Wed Oct 15 15:06:42 2014 +0200 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Fri Oct 24 16:39:31 2014 +0200 toollib: new arg list functions Check for negative arg list: arg_from_list_is_negative() Check for zero arg in list: arg_from_list_is_zero() --- tools/lvmcmdline.c | 35 +++++++++++++++++++++++++++++++++++ tools/tools.h | 2 ++ 2 files changed, 37 insertions(+), 0 deletions(-) diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c index 4c61332..6e13679 100644 --- a/tools/lvmcmdline.c +++ b/tools/lvmcmdline.c @@ -127,6 +127,41 @@ int arg_outside_list_is_set(const struct cmd_context *cmd, const char *err_found return 0; } +int arg_from_list_is_negative(const struct cmd_context *cmd, const char *err_found, ...) +{ + int arg, ret = 0; + va_list ap; + + va_start(ap, err_found); + while ((arg = va_arg(ap, int)) != -1) + if (arg_sign_value(cmd, arg, SIGN_NONE) == SIGN_MINUS) { + if (err_found) + log_error("%s %s.", arg_long_option_name(arg), err_found); + ret = 1; + } + va_end(ap); + + return ret; +} + +int arg_from_list_is_zero(const struct cmd_context *cmd, const char *err_found, ...) +{ + int arg, ret = 0; + va_list ap; + + va_start(ap, err_found); + while ((arg = va_arg(ap, int)) != -1) + if (arg_is_set(cmd, arg) && + !arg_int_value(cmd, arg, 0)) { + if (err_found) + log_error("%s %s.", arg_long_option_name(arg), err_found); + ret = 1; + } + va_end(ap); + + return ret; +} + unsigned grouped_arg_is_set(const struct arg_values *av, int a) { return grouped_arg_count(av, a) ? 1 : 0; diff --git a/tools/tools.h b/tools/tools.h index 5fa1ab6..75c3eaa 100644 --- a/tools/tools.h +++ b/tools/tools.h @@ -148,6 +148,8 @@ unsigned arg_count(const struct cmd_context *cmd, int a); unsigned arg_is_set(const struct cmd_context *cmd, int a); int arg_from_list_is_set(const struct cmd_context *cmd, const char *err_found, ...); int arg_outside_list_is_set(const struct cmd_context *cmd, const char *err_found, ...); +int arg_from_list_is_negative(const struct cmd_context *cmd, const char *err_found, ...); +int arg_from_list_is_zero(const struct cmd_context *cmd, const char *err_found, ...); const char *arg_long_option_name(int a); const char *arg_value(const struct cmd_context *cmd, int a); const char *arg_str_value(const struct cmd_context *cmd, int a, const char *def);
1
0
0
0
master - segments: disable init of free segment
by Zdenek Kabelac
24 Oct '14
24 Oct '14
Gitweb:
http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=fd1aa7fd5a1ccd7e…
Commit: fd1aa7fd5a1ccd7ebcf3446988110ad5c16fddc7 Parent: 128131dbc579daf510c4aa7b5cd8f0ca076539a3 Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Sat Oct 11 09:10:07 2014 +0200 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Fri Oct 24 16:39:31 2014 +0200 segments: disable init of free segment Since it is not needed and would require separate code for validation disable its initialization. --- lib/commands/toolcontext.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c index e38aa56..72525f5 100644 --- a/lib/commands/toolcontext.c +++ b/lib/commands/toolcontext.c @@ -1218,7 +1218,7 @@ static int _init_segtypes(struct cmd_context *cmd) init_striped_segtype, init_zero_segtype, init_error_segtype, - init_free_segtype, + /* disabled until needed init_free_segtype, */ #ifdef SNAPSHOT_INTERNAL init_snapshot_segtype, #endif
1
0
0
0
master - lvconvert: external detects more conflicts
by Zdenek Kabelac
24 Oct '14
24 Oct '14
Gitweb:
http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=128131dbc579daf5…
Commit: 128131dbc579daf510c4aa7b5cd8f0ca076539a3 Parent: 8a2f553b7d5f516ac750aadd4ca75cc4a20aef15 Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Sun Oct 19 22:04:02 2014 +0200 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Fri Oct 24 16:39:31 2014 +0200 lvconvert: external detects more conflicts Check for more prohibited types for external origin conversion. TODO: Move this function to separate validation code. (Continuing in release fixes.) --- tools/lvconvert.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tools/lvconvert.c b/tools/lvconvert.c index 9155998..eb8a83b 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -2664,12 +2664,16 @@ static int _lvconvert_thin(struct cmd_context *cmd, return 0; } - if (lv_is_cache_type(lv) || + if (lv_is_locked(lv) || + !lv_is_visible(lv) || + lv_is_cache_type(lv) || lv_is_cow(lv) || lv_is_pool(lv) || - lv_is_thin_pool_data(lv) || - lv_is_thin_pool_metadata(lv)) { - log_error("Can't use %s %s as external origin.", + lv_is_pool_data(lv) || + lv_is_pool_metadata(lv)) { + log_error("Can't use%s%s %s %s as external origin.", + lv_is_locked(lv) ? " locked" : "", + lv_is_visible(lv) ? "" : " hidden", lvseg_name(first_seg(lv)), display_lvname(lv)); return 0;
1
0
0
0
master - lvcreate: move tests that requires activation
by Zdenek Kabelac
24 Oct '14
24 Oct '14
Gitweb:
http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=8a2f553b7d5f516a…
Commit: 8a2f553b7d5f516ac750aadd4ca75cc4a20aef15 Parent: f7cfea251c07b3a63131320cf4751b91480b9be7 Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Tue Oct 21 12:12:45 2014 +0200 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Fri Oct 24 16:39:31 2014 +0200 lvcreate: move tests that requires activation Tests that needs active kernel driver put in single place. --- lib/metadata/lv_manip.c | 48 ++++++++++++++++++++++++---------------------- 1 files changed, 25 insertions(+), 23 deletions(-) diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c index 6caa284..61620e5 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c @@ -6590,6 +6590,31 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg, return NULL; } + if (!activation()) { + if (seg_is_cache(lp) || + seg_is_mirror(lp) || + seg_is_raid(lp) || + seg_is_thin(lp) || + lp->snapshot) { + /* + * FIXME: For thin pool add some code to allow delayed + * initialization of empty thin pool volume. + * i.e. using some LV flag, fake message,... + * and testing for metadata pool header signature? + */ + log_error("Can't create %s without using " + "device-mapper kernel driver.", + lp->segtype->name); + return NULL; + } + /* Does LV need to be zeroed? */ + if (lp->zero && !seg_is_thin(lp)) { + log_error("Can't wipe start of new LV without using " + "device-mapper kernel driver."); + return NULL; + } + } + if (lp->stripe_size > vg->extent_size) { if (segtype_is_raid(lp->segtype) && (vg->extent_size < STRIPE_SIZE_MIN)) { @@ -6629,13 +6654,6 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg, lp->extents = lp->extents - size_rest + lp->stripes; } - /* Does LV need to be zeroed? Thin handles this as a per-pool in-kernel setting. */ - if (lp->zero && !segtype_is_thin(lp->segtype) && !activation()) { - log_error("Can't wipe start of new LV without using " - "device-mapper kernel driver"); - return NULL; - } - status |= lp->permission | VISIBLE_LV; if (seg_is_cache(lp)) { @@ -6773,22 +6791,6 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg, return NULL; } - if (!activation() && - (seg_is_mirrored(lp) || - seg_is_raid(lp) || - seg_is_pool(lp))) { - /* - * FIXME: For thin pool add some code to allow delayed - * initialization of empty thin pool volume. - * i.e. using some LV flag, fake message,... - * and testing for metadata pool header signature? - */ - log_error("Can't create %s without using " - "device-mapper kernel driver.", - lp->segtype->name); - return NULL; - } - /* The snapshot segment gets created later */ if (lp->snapshot && !seg_is_thin(lp) && !(lp->segtype = get_segtype_from_string(cmd, "striped")))
1
0
0
0
master - lvcreate: better logging for temporary device
by Zdenek Kabelac
24 Oct '14
24 Oct '14
Gitweb:
http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f7cfea251c07b3a6…
Commit: f7cfea251c07b3a63131320cf4751b91480b9be7 Parent: 2c057f33f3581aa29f79bb0a62c7115da30f8672 Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Mon Oct 20 21:53:48 2014 +0200 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Fri Oct 24 16:39:31 2014 +0200 lvcreate: better logging for temporary device Hide creation of temporary LVs and print them only in verbose mode. e.g. hides confusing message about creation of _pmspare device during creation of pool. --- WHATS_NEW | 1 + lib/metadata/lv_manip.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index b197568..e2372e5 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.112 - ===================================== + Inform about temporarily created volumes only in verbose mode. Better support for --test mode with pool creation. Query lock holding LV when replacing and converting raid volumes. Add extra validate for locked lv within validate_lv_cache_create(). diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c index f60b964..6caa284 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c @@ -7217,7 +7217,10 @@ struct logical_volume *lv_create_single(struct volume_group *vg, return_NULL; out: - log_print_unless_silent("Logical volume \"%s\" created", lv->name); + if (lp->temporary) + log_verbose("Temporary logical volume \"%s\" created.", lv->name); + else + log_print_unless_silent("Logical volume \"%s\" created.", lv->name); return lv; }
1
0
0
0
master - segtypes: macro segtype_is_unknown
by Zdenek Kabelac
24 Oct '14
24 Oct '14
Gitweb:
http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=2c057f33f3581aa2…
Commit: 2c057f33f3581aa29f79bb0a62c7115da30f8672 Parent: 237c54802c88f0a7045d11642884c3d69e46180d Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Fri Oct 10 22:22:43 2014 +0200 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Fri Oct 24 16:39:31 2014 +0200 segtypes: macro segtype_is_unknown --- lib/metadata/segtype.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/lib/metadata/segtype.h b/lib/metadata/segtype.h index e0c46df..749b188 100644 --- a/lib/metadata/segtype.h +++ b/lib/metadata/segtype.h @@ -57,6 +57,7 @@ struct dev_manager; #define segtype_is_thin_pool(segtype) ((segtype)->flags & SEG_THIN_POOL ? 1 : 0) #define segtype_is_thin_volume(segtype) ((segtype)->flags & SEG_THIN_VOLUME ? 1 : 0) #define segtype_is_virtual(segtype) ((segtype)->flags & SEG_VIRTUAL ? 1 : 0) +#define segtype_is_unknown(segtype) ((segtype)->flags & SEG_UNKNOWN ? 1 : 0) #define seg_is_cache(seg) segtype_is_cache((seg)->segtype) #define seg_is_cache_pool(seg) segtype_is_cache_pool((seg)->segtype) @@ -73,10 +74,10 @@ struct dev_manager; #define seg_is_thin_pool(seg) segtype_is_thin_pool((seg)->segtype) #define seg_is_thin_volume(seg) segtype_is_thin_volume((seg)->segtype) #define seg_is_virtual(seg) segtype_is_virtual((seg)->segtype) +#define seg_unknown(seg) segtype_is_unknown((seg)->segtype) #define seg_can_split(seg) ((seg)->segtype->flags & SEG_CAN_SPLIT ? 1 : 0) #define seg_cannot_be_zeroed(seg) ((seg)->segtype->flags & SEG_CANNOT_BE_ZEROED ? 1 : 0) #define seg_monitored(seg) ((seg)->segtype->flags & SEG_MONITORED ? 1 : 0) -#define seg_unknown(seg) ((seg)->segtype->flags & SEG_UNKNOWN ? 1 : 0) struct segment_type { struct dm_list list; /* Internal */
1
0
0
0
master - tools: read yes_no_arg via int_value
by Zdenek Kabelac
24 Oct '14
24 Oct '14
Gitweb:
http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=237c54802c88f0a7…
Commit: 237c54802c88f0a7045d11642884c3d69e46180d Parent: 5bdf48b489660d1e99631fcb950c2094a9d158c2 Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Sat Oct 11 18:17:46 2014 +0200 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Fri Oct 24 16:39:31 2014 +0200 tools: read yes_no_arg via int_value yes_no_arg is already parsed so read parsed value as int. --- tools/lvchange.c | 10 ++++------ tools/lvconvert.c | 6 ++---- tools/lvcreate.c | 10 +++++----- tools/pvchange.c | 15 +++------------ tools/toollib.c | 11 ++++------- tools/vgchange.c | 4 ++-- 6 files changed, 20 insertions(+), 36 deletions(-) diff --git a/tools/lvchange.c b/tools/lvchange.c index 6cb6f15..6697905 100644 --- a/tools/lvchange.c +++ b/tools/lvchange.c @@ -461,12 +461,10 @@ static int lvchange_resync(struct cmd_context *cmd, struct logical_volume *lv) static int lvchange_alloc(struct cmd_context *cmd, struct logical_volume *lv) { - int want_contiguous = 0; - alloc_policy_t alloc; - - want_contiguous = strcmp(arg_str_value(cmd, contiguous_ARG, "n"), "n"); - alloc = want_contiguous ? ALLOC_CONTIGUOUS : ALLOC_INHERIT; - alloc = (alloc_policy_t) arg_uint_value(cmd, alloc_ARG, alloc); + int want_contiguous = arg_int_value(cmd, contiguous_ARG, 0); + alloc_policy_t alloc = (alloc_policy_t) + arg_uint_value(cmd, alloc_ARG, (want_contiguous) + ? ALLOC_CONTIGUOUS : ALLOC_INHERIT); if (alloc == lv->alloc) { log_error("Allocation policy of logical volume \"%s\" is " diff --git a/tools/lvconvert.c b/tools/lvconvert.c index fc28846..9155998 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -559,10 +559,8 @@ static int _read_params(struct lvconvert_params *lp, struct cmd_context *cmd, if (!(lp->segtype = get_segtype_from_string(cmd, "snapshot"))) return_0; - lp->zero = strcmp(arg_str_value(cmd, zero_ARG, - (lp->segtype->flags & - SEG_CANNOT_BE_ZEROED) ? - "n" : "y"), "n"); + lp->zero = (lp->segtype->flags & SEG_CANNOT_BE_ZEROED) + ? 0 : arg_int_value(cmd, zero_ARG, 1); } else if (arg_count(cmd, replace_ARG)) { /* RAID device replacement */ lp->replace_pv_count = arg_count(cmd, replace_ARG); diff --git a/tools/lvcreate.c b/tools/lvcreate.c index d849f93..5a91627 100644 --- a/tools/lvcreate.c +++ b/tools/lvcreate.c @@ -985,13 +985,13 @@ static int _lvcreate_params(struct lvcreate_params *lp, /* * Should we zero/wipe signatures on the lv. */ - lp->zero = (!(lp->segtype->flags & SEG_CANNOT_BE_ZEROED) && - (strcmp(arg_str_value(cmd, zero_ARG, "y"), "y") == 0)) ? 1 : 0; + lp->zero = (lp->segtype->flags & SEG_CANNOT_BE_ZEROED) + ? 0 : arg_int_value(cmd, zero_ARG, 1); if (arg_count(cmd, wipesignatures_ARG)) { /* If -W/--wipesignatures is given on command line directly, respect it. */ - lp->wipe_signatures =(!(lp->segtype->flags & SEG_CANNOT_BE_ZEROED) && - (strcmp(arg_str_value(cmd, wipesignatures_ARG, "y"), "y") == 0)) ? 1 : 0; + lp->wipe_signatures = (lp->segtype->flags & SEG_CANNOT_BE_ZEROED) + ? 0 : arg_int_value(cmd, wipesignatures_ARG, 1); } else { /* * If -W/--wipesignatures is not given on command line, @@ -1047,7 +1047,7 @@ static int _lvcreate_params(struct lvcreate_params *lp, /* * Allocation parameters */ - contiguous = strcmp(arg_str_value(cmd, contiguous_ARG, "n"), "n"); + contiguous = arg_int_value(cmd, contiguous_ARG, 0); lp->alloc = contiguous ? ALLOC_CONTIGUOUS : ALLOC_INHERIT; diff --git a/tools/pvchange.c b/tools/pvchange.c index c2adc34..76db917 100644 --- a/tools/pvchange.c +++ b/tools/pvchange.c @@ -22,18 +22,9 @@ static int _pvchange_single(struct cmd_context *cmd, struct volume_group *vg, const char *pv_name = pv_dev_name(pv); char uuid[64] __attribute__((aligned(8))); - int allocatable = 0; - int tagargs = 0; - int mda_ignore = 0; - - tagargs = arg_count(cmd, addtag_ARG) + arg_count(cmd, deltag_ARG); - - if (arg_count(cmd, allocatable_ARG)) - allocatable = !strcmp(arg_str_value(cmd, allocatable_ARG, "n"), - "y"); - if (arg_count(cmd, metadataignore_ARG)) - mda_ignore = !strcmp(arg_str_value(cmd, metadataignore_ARG, "n"), - "y"); + int allocatable = arg_int_value(cmd, allocatable_ARG, 0); + int mda_ignore = arg_int_value(cmd, metadataignore_ARG, 0); + int tagargs = arg_count(cmd, addtag_ARG) + arg_count(cmd, deltag_ARG); /* If in a VG, must change using volume group. */ if (!is_orphan(pv)) { diff --git a/tools/toollib.c b/tools/toollib.c index f81acca..a33e6c2 100644 --- a/tools/toollib.c +++ b/tools/toollib.c @@ -643,9 +643,7 @@ int vgcreate_params_set_from_args(struct cmd_context *cmd, arg_uint_value(cmd, physicalextentsize_ARG, vp_def->extent_size); if (arg_count(cmd, clustered_ARG)) - vp_new->clustered = - !strcmp(arg_str_value(cmd, clustered_ARG, - vp_def->clustered ? "y":"n"), "y"); + vp_new->clustered = arg_int_value(cmd, clustered_ARG, vp_def->clustered); else /* Default depends on current locking type */ vp_new->clustered = locking_is_clustered(); @@ -866,8 +864,7 @@ int pvcreate_params_validate(struct cmd_context *cmd, return 0; } - if (arg_count(cmd, zero_ARG)) - pp->zero = strcmp(arg_str_value(cmd, zero_ARG, "y"), "n"); + pp->zero = arg_int_value(cmd, zero_ARG, 1); if (arg_sign_value(cmd, dataalignment_ARG, SIGN_NONE) == SIGN_MINUS) { log_error("Physical volume data alignment may not be negative"); @@ -966,7 +963,7 @@ int get_pool_params(struct cmd_context *cmd, if (segtype_is_thin_pool(segtype) || segtype_is_thin(segtype)) { if (arg_count(cmd, zero_ARG)) { *passed_args |= PASS_ARG_ZERO; - *zero = strcmp(arg_str_value(cmd, zero_ARG, "y"), "n"); + *zero = arg_int_value(cmd, zero_ARG, 1); log_very_verbose("Setting pool zeroing: %u", *zero); } @@ -1188,7 +1185,7 @@ int get_and_validate_major_minor(const struct cmd_context *cmd, const struct format_type *fmt, int32_t *major, int32_t *minor) { - if (strcmp(arg_str_value(cmd, persistent_ARG, "n"), "y")) { + if (!arg_int_value(cmd, persistent_ARG, 0)) { if (arg_is_set(cmd, minor_ARG) || arg_is_set(cmd, major_ARG)) { log_error("--major and --minor incompatible with -Mn"); return 0; diff --git a/tools/vgchange.c b/tools/vgchange.c index 9a9fe48..af59f3a 100644 --- a/tools/vgchange.c +++ b/tools/vgchange.c @@ -278,7 +278,7 @@ static int _vgchange_alloc(struct cmd_context *cmd, struct volume_group *vg) static int _vgchange_resizeable(struct cmd_context *cmd, struct volume_group *vg) { - int resizeable = !strcmp(arg_str_value(cmd, resizeable_ARG, "n"), "y"); + int resizeable = arg_int_value(cmd, resizeable_ARG, 0); if (resizeable && vg_is_resizeable(vg)) { log_error("Volume group \"%s\" is already resizeable", @@ -303,7 +303,7 @@ static int _vgchange_resizeable(struct cmd_context *cmd, static int _vgchange_clustered(struct cmd_context *cmd, struct volume_group *vg) { - int clustered = !strcmp(arg_str_value(cmd, clustered_ARG, "n"), "y"); + int clustered = arg_int_value(cmd, clustered_ARG, 0); if (clustered && (vg_is_clustered(vg))) { log_error("Volume group \"%s\" is already clustered",
1
0
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
17
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Results per page:
10
25
50
100
200