chiark / gitweb /
spawn: downgrade loopback detach errors to debug
authorLennart Poettering <lennart@poettering.net>
Wed, 14 Jan 2015 23:51:54 +0000 (00:51 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 14 Jan 2015 23:51:56 +0000 (00:51 +0100)
Sometimes udev or some other background daemon might keep the loopback
devices busy while we already want to detach them. Downgrade the warning
about it.

Given that we use autodetach downgrading these messages should be with
little risk.

src/nspawn/nspawn.c

index 9fe040c81b6342005e89d72ef98eabdf0edc8c8c..2783c97f2065d46a163629ca68c8cf3aa3baac3a 100644 (file)
@@ -2963,7 +2963,7 @@ static void loop_remove(int nr, int *image_fd) {
         if (image_fd && *image_fd >= 0) {
                 r = ioctl(*image_fd, LOOP_CLR_FD);
                 if (r < 0)
-                        log_warning_errno(errno, "Failed to close loop image: %m");
+                        log_debug_errno(errno, "Failed to close loop image: %m");
                 *image_fd = safe_close(*image_fd);
         }
 
@@ -2975,7 +2975,7 @@ static void loop_remove(int nr, int *image_fd) {
 
         r = ioctl(control, LOOP_CTL_REMOVE, nr);
         if (r < 0)
-                log_warning_errno(errno, "Failed to remove loop %d: %m", nr);
+                log_debug_errno(errno, "Failed to remove loop %d: %m", nr);
 }
 
 static int spawn_getent(const char *database, const char *key, pid_t *rpid) {