* [pve-devel] [PATCH container] fix #5666: fix quota regression due to device passthrough
@ 2024-08-27 11:46 Filip Schauer
2024-09-06 17:17 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Filip Schauer @ 2024-08-27 11:46 UTC (permalink / raw)
To: pve-devel
This commit fixes a regression introduced by
commit ce1976b85361 ("Add device passthrough")
Prior to the addition of device passthrough, the `lxc-pve-autodev-hook`
would invoke `PVE::LXC::Tools::for_current_devices` only once. If the
device list was empty, `exit 0` would be called and the
`lxc-pve-autodev-hook` would exit.
However, with the new device passthrough logic, when no devices were
passed through, the `exit` call would be encountered prematurely.
This would prevent the subsequent iteration over passthrough mounts from
occurring.
This commit resolves the issue by replacing the premature `exit` call
with a `return` statement, ensuring the `lxc-pve-autodev-hook` continues
executing and processes the passthrough mounts as expected.
Signed-off-by: Filip Schauer <f.schauer@proxmox.com>
---
src/PVE/LXC/Tools.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/LXC/Tools.pm b/src/PVE/LXC/Tools.pm
index 7e3e530..3380c62 100644
--- a/src/PVE/LXC/Tools.pm
+++ b/src/PVE/LXC/Tools.pm
@@ -89,7 +89,7 @@ sub for_devices {
my $fd;
if (! open $fd, '<', $devlist_file) {
- exit 0 if $!{ENOENT}; # If the list is empty the file might not exist.
+ return if $!{ENOENT}; # If the list is empty the file might not exist.
die "failed to open device list: $!\n";
}
--
2.39.2
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pve-devel] applied: [PATCH container] fix #5666: fix quota regression due to device passthrough
2024-08-27 11:46 [pve-devel] [PATCH container] fix #5666: fix quota regression due to device passthrough Filip Schauer
@ 2024-09-06 17:17 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2024-09-06 17:17 UTC (permalink / raw)
To: Proxmox VE development discussion, Filip Schauer
Am 27/08/2024 um 13:46 schrieb Filip Schauer:
> This commit fixes a regression introduced by
> commit ce1976b85361 ("Add device passthrough")
>
> Prior to the addition of device passthrough, the `lxc-pve-autodev-hook`
> would invoke `PVE::LXC::Tools::for_current_devices` only once. If the
> device list was empty, `exit 0` would be called and the
> `lxc-pve-autodev-hook` would exit.
>
> However, with the new device passthrough logic, when no devices were
> passed through, the `exit` call would be encountered prematurely.
> This would prevent the subsequent iteration over passthrough mounts from
> occurring.
>
> This commit resolves the issue by replacing the premature `exit` call
> with a `return` statement, ensuring the `lxc-pve-autodev-hook` continues
> executing and processes the passthrough mounts as expected.
>
> Signed-off-by: Filip Schauer <f.schauer@proxmox.com>
> ---
> src/PVE/LXC/Tools.pm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>
applied, thanks!
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-09-06 17:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-27 11:46 [pve-devel] [PATCH container] fix #5666: fix quota regression due to device passthrough Filip Schauer
2024-09-06 17:17 ` [pve-devel] applied: " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox