1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-10 05:18:17 +03:00

core/manager: rename NOTIFY_RCVBUF_SIZE to MANAGER_SOCKET_RCVBUF_SIZE

This is used for all our sockets, hence rename as so.
This commit is contained in:
Mike Yuan 2024-09-05 20:23:17 +02:00
parent ebf0e859da
commit e634df9f16
No known key found for this signature in database
GPG Key ID: 417471C0A40F58B3

View File

@ -101,8 +101,8 @@
#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)
@ -1081,7 +1081,7 @@ static int manager_setup_notify(Manager *m) {
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)
@ -1174,7 +1174,7 @@ static int manager_setup_cgroups_agent(Manager *m) {
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);
@ -1238,7 +1238,7 @@ static int manager_setup_user_lookup_fd(Manager *m) {
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) {
@ -1274,7 +1274,7 @@ static int manager_setup_handoff_timestamp_fd(Manager *m) {
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)