From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id F134E1FF0AA for ; Tue, 17 Nov 2026 21:40:35 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id BD894216ED; Tue, 17 Nov 2026 21:40:06 +0100 (CET) From: "Max R. Carrara" To: pve-devel@lists.proxmox.com Subject: [PATCH pve-storage v3 02/51] plugin, common: remove superfluous use of =pod command paragraph Date: Tue, 17 Nov 2026 21:38:34 +0100 Message-ID: <20261117203953.913035-3-m.carrara@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261117203953.913035-1-m.carrara@proxmox.com> References: <20261117203953.913035-1-m.carrara@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1794947997697 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.277 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: P5GPKI5W4C6KCKY4TX2EUQKCIGFF5BYF X-Message-ID-Hash: P5GPKI5W4C6KCKY4TX2EUQKCIGFF5BYF X-MailFrom: m.carrara@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Wolfgang Bumiller X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Because a POD block may be started using any POD command paragraph [1], using =pod here is not necessary. =head1 and =head3 (for example) already begin a POD block, so explicitly opening one with =pod is not needed. Therefore, remove these occurrences. This has the benefit of making the docstrings take up a little less space overall. [1]: https://perldoc.perl.org/perlpodspec#Pod-Commands Signed-off-by: Max R. Carrara --- src/PVE/Storage/Common.pm | 28 ---------------------------- src/PVE/Storage/Plugin.pm | 6 ------ 2 files changed, 34 deletions(-) diff --git a/src/PVE/Storage/Common.pm b/src/PVE/Storage/Common.pm index cc3fa45d..aa3b5531 100644 --- a/src/PVE/Storage/Common.pm +++ b/src/PVE/Storage/Common.pm @@ -10,12 +10,10 @@ use PVE::Tools qw(run_command); use constant { FALLOC_FL_KEEP_SIZE => 0x01, # see linux/falloc.h FALLOC_FL_PUNCH_HOLE => 0x02, # see linux/falloc.h }; -=pod - =head1 NAME PVE::Storage::Common - Shared functions and utilities for storage plugins and storage operations =head1 DESCRIPTION @@ -73,12 +71,10 @@ PVE::JSONSchema::register_standard_option( enum => ['raw', 'qcow2', 'vmdk'], description => "Format of the image.", }, ); -=pod - =head1 VOLUME TYPES A volume that belongs to a guest has one of the following types. They are also content types that a storage can be restricted to. @@ -111,32 +107,26 @@ my $GENERIC_VTYPE = { 'vm-vol' => 'images', 'vm-state' => 'images', 'ct-vol' => 'rootdir', }; -=pod - =head1 FUNCTIONS =cut -=pod - =head3 generic_vtype $generic = generic_vtype($vtype) Returns the generic type that includes the volume type C<$vtype>, or C if there is none. =cut sub generic_vtype : prototype($) ($vtype) { return $GENERIC_VTYPE->{$vtype}; } -=pod - =head3 is_guest_vtype $is_guest_vtype = is_guest_vtype($vtype) Returns whether volumes of type C<$vtype> belong to a guest. These are the volume types of VMs and @@ -147,12 +137,10 @@ an external plugin may report is not one of them, callers that support it check sub is_guest_vtype : prototype($) ($vtype) { return $vtype eq 'images' || defined($GENERIC_VTYPE->{$vtype}); } -=pod - =head3 vtype_matches $matches = vtype_matches($vtype, $expected) Returns whether a volume of type C<$vtype> can be used where one of type C<$expected> is required. @@ -167,12 +155,10 @@ sub vtype_matches : prototype($$) ($vtype, $expected) { return 1 if ($GENERIC_VTYPE->{$vtype} // '') eq $expected; return 1 if ($GENERIC_VTYPE->{$expected} // '') eq $vtype; return 0; } -=pod - =head3 content_allows $allowed = content_allows($content, $type) Returns whether the content types in the hash C<$content>, as found in a storage configuration, @@ -187,12 +173,10 @@ sub content_allows : prototype($$) ($content, $type) { return 1 if defined($generic) && $content->{$generic}; return 1 if grep { $GENERIC_VTYPE->{$_} eq $type && $content->{$_} } keys $GENERIC_VTYPE->%*; return 0; } -=pod - =head3 align_size_up $aligned_size = align_size_up($size, $granularity) Returns the next size bigger than or equal to C<$size> that is aligned with a @@ -209,12 +193,10 @@ sub align_size_up : prototype($$) { print "size $size is not aligned to granularity $granularity, rounding up to $aligned_size\n" if $aligned_size != $size; return $aligned_size; } -=pod - =head3 deallocate deallocate($file_handle, $offset, $length) Deallocates the range with C<$length> many bytes starting from offset C<$offset> @@ -254,12 +236,10 @@ my sub run_qemu_img_json { warn $err_output; } return $json; } -=pod - =head3 qemu_img_create qemu_img_create($fmt, $size, $path, $options) Create a new qemu image with a specific format C<$format> and size C<$size> KiB for a target @@ -280,12 +260,10 @@ sub qemu_img_create { push @$cmd, '-f', $fmt, '--', $path, "${size}K"; run_command($cmd, errmsg => "unable to create image"); } -=pod - =head3 qemu_img_create_qcow2_backed qemu_img_create_qcow2_backed($path, $backing_path, $backing_format, $options) Create a new qemu qcow2 image C<$path> using an existing backing image C<$backing_path> with @@ -313,12 +291,10 @@ sub qemu_img_create_qcow2_backed { push @$cmd, '--', $path; run_command($cmd, errmsg => "unable to create image"); } -=pod - =head3 qemu_img_info qemu_img_info($filename, $file_format, $timeout, $follow_backing_files) Returns a json with qemu image C<$filename> information with format <$file_format>. If @@ -336,12 +312,10 @@ sub qemu_img_info { push $cmd->@*, '--', $filename; return run_qemu_img_json($cmd, $timeout); } -=pod - =head3 qemu_img_measure qemu_img_measure($size, $fmt, $timeout, $options) Returns a json with the maximum size including all metadata overhead for an image with format @@ -362,12 +336,10 @@ sub qemu_img_measure { push $cmd->@*, '-o', join(',', @$options) if @$options > 0; } return run_qemu_img_json($cmd, $timeout); } -=pod - =head3 qemu_img_resize qemu_img_resize($path, $format, $size, $preallocation, $timeout) Resize a qemu image C<$path> with format C<$format> to a target size C<$size> in bytes. diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm index 1f1e1658..7eb8a244 100644 --- a/src/PVE/Storage/Plugin.pm +++ b/src/PVE/Storage/Plugin.pm @@ -2594,12 +2594,10 @@ sub rename_volume { || die "rename '$old_path' to '$new_path' failed - $!\n"; return "${storeid}:${base}${target_vmid}/${target_volname}"; } -=pod - =head3 rename_snapshot $plugin->rename_snapshot($scfg, $storeid, $volname, $source_snap, $target_snap) Rename a volume source snapshot C<$source_snap> to a target snapshot C<$target_snap>. @@ -2645,12 +2643,10 @@ my sub blockdev_options_nbd_unix { $blockdev->{export} = "$export" if defined($export); return $blockdev; } -=pod - =head3 qemu_blockdev_options $blockdev = $plugin->qemu_blockdev_options($scfg, $storeid, $volname, $machine_version, $options) @@ -2819,12 +2815,10 @@ sub new_backup_provider { my ($class, $scfg, $storeid, $log_function) = @_; die "implement me if enabling the feature 'backup-provider' in plugindata()->{features}\n"; } -=pod - =head3 volume_qemu_snapshot_method $method = $plugin->volume_qemu_snapshot_method($storeid, $scfg, $volname); Returns a string with the type of snapshot that qemu can do for a specific volume -- 2.47.3