#include "virt.h"
#include "watchdog.h"
-#define NOTIFY_RCVBUF_SIZE (8*1024*1024)
-#define CGROUPS_AGENT_RCVBUF_SIZE (8*1024*1024)
+/* Make sure clients notifying us don't block */
+#define MANAGER_SOCKET_RCVBUF_SIZE (8*U64_MB)
/* Initial delay and the interval for printing status messages about running jobs */
#define JOBS_IN_PROGRESS_WAIT_USEC (2*USEC_PER_SEC)
if (fd < 0)
return log_error_errno(errno, "Failed to allocate notification socket: %m");
- (void) fd_increase_rxbuf(fd, NOTIFY_RCVBUF_SIZE);
+ (void) fd_increase_rxbuf(fd, MANAGER_SOCKET_RCVBUF_SIZE);
m->notify_socket = path_join(m->prefix[EXEC_DIRECTORY_RUNTIME], "systemd/notify");
if (!m->notify_socket)
if (fd < 0)
return log_error_errno(errno, "Failed to allocate cgroups agent socket: %m");
- fd_increase_rxbuf(fd, CGROUPS_AGENT_RCVBUF_SIZE);
+ (void) fd_increase_rxbuf(fd, MANAGER_SOCKET_RCVBUF_SIZE);
(void) sockaddr_un_unlink(&sa.un);
if (socketpair(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0, m->user_lookup_fds) < 0)
return log_error_errno(errno, "Failed to allocate user lookup socket: %m");
- (void) fd_increase_rxbuf(m->user_lookup_fds[0], NOTIFY_RCVBUF_SIZE);
+ (void) fd_increase_rxbuf(m->user_lookup_fds[0], MANAGER_SOCKET_RCVBUF_SIZE);
}
if (!m->user_lookup_event_source) {
return log_error_errno(errno, "Failed to allocate handoff timestamp socket: %m");
/* Make sure children never have to block */
- (void) fd_increase_rxbuf(m->handoff_timestamp_fds[0], NOTIFY_RCVBUF_SIZE);
+ (void) fd_increase_rxbuf(m->handoff_timestamp_fds[0], MANAGER_SOCKET_RCVBUF_SIZE);
r = setsockopt_int(m->handoff_timestamp_fds[0], SOL_SOCKET, SO_PASSCRED, true);
if (r < 0)