]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
portabled: apply pool limits to portable images
authordongshengyuan <545258830@qq.com>
Wed, 15 Jul 2026 08:49:10 +0000 (16:49 +0800)
committerdongshengyuan <545258830@qq.com>
Wed, 15 Jul 2026 10:20:17 +0000 (18:20 +0800)
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: 824fcb95c9e66abe6b350ebab6e0593498ff7aa1

src/portable/portabled-bus.c

index aec0793fcdf93a2c7a8fe5b6f650757196f4a3fb..e940f73de5a9e6563c9abede8726e76a353ba286 100644 (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)