[pve-devel] [PATCH storage] btrfs: log executed command on failures

Maximiliano Sandoval m.sandoval at proxmox.com
Tue Jul 9 13:49:18 CEST 2024


Having the complete command printed out makes debuging easier.

Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
---
 src/PVE/Storage/BTRFSPlugin.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/Storage/BTRFSPlugin.pm b/src/PVE/Storage/BTRFSPlugin.pm
index 42815cb..c4b5bcd 100644
--- a/src/PVE/Storage/BTRFSPlugin.pm
+++ b/src/PVE/Storage/BTRFSPlugin.pm
@@ -226,7 +226,7 @@ sub btrfs_cmd {
     } else {
 	$func = sub { $msg .= "$_[0]\n" };
     }
-    run_command(['btrfs', '-q', @$cmd], errmsg => 'btrfs error', outfunc => $func);
+    run_command(['btrfs', '-q', @$cmd], errmsg => "command 'btrfs @$cmd' failed", outfunc => $func);
 
     return $msg;
 }
-- 
2.39.2





More information about the pve-devel mailing list