portabled: apply pool limits to portable images

Apply SetPoolLimit to IMAGE_PORTABLE instead of IMAGE_MACHINE. The
manager property and the setter now refer to the same portable image
pool.

Reproducer:
  sudo portablectl set-limit 1G
  busctl get-property org.freedesktop.portable1 \
      /org/freedesktop/portable1 \
      org.freedesktop.portable1.Manager PoolLimit

Before:
  SetPoolLimit adjusted the machine image pool while portablectl
  reported the portable image pool. The command could succeed without
  changing the limit that portable users queried later.

Follow-up: 824fcb95c9
This commit is contained in:
dongshengyuan
2026-07-15 18:20:17 +08:00
parent f21e820631
commit ddf196a20b
+1 -1
View File
@@ -381,7 +381,7 @@ static int method_set_pool_limit(sd_bus_message *message, void *userdata, sd_bus
return 1; /* Will call us back */
}
r = image_set_pool_limit(m->runtime_scope, IMAGE_MACHINE, limit);
r = image_set_pool_limit(m->runtime_scope, IMAGE_PORTABLE, limit);
if (ERRNO_IS_NEG_NOT_SUPPORTED(r))
return sd_bus_error_set(error, SD_BUS_ERROR_NOT_SUPPORTED, "Quota is only supported on btrfs.");
if (r < 0)