diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-11-25 22:39:15 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-11-25 22:39:15 +0000 |
commit | d934827bf44b7cfcf6711964418148fa60877668 (patch) | |
tree | 0625f358789b5e015e49db139cc1dbc9be00428f /sys-fs/quota/files | |
parent | 2e34d110f164bf74d55fced27fe0000201b3eec5 (diff) |
gentoo resync : 25.11.2020
Diffstat (limited to 'sys-fs/quota/files')
-rw-r--r-- | sys-fs/quota/files/quota-4.04-Listen-on-a-TCP-socket.patch | 77 | ||||
-rw-r--r-- | sys-fs/quota/files/quota-4.04-glibc226.patch | 43 |
2 files changed, 0 insertions, 120 deletions
diff --git a/sys-fs/quota/files/quota-4.04-Listen-on-a-TCP-socket.patch b/sys-fs/quota/files/quota-4.04-Listen-on-a-TCP-socket.patch deleted file mode 100644 index cf1bd4aad32f..000000000000 --- a/sys-fs/quota/files/quota-4.04-Listen-on-a-TCP-socket.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 31ecd29b3b3f51145fd78f63087c10e9fcadf999 Mon Sep 17 00:00:00 2001 -From: Steve Dickson <steved@redhat.com> -Date: Tue, 22 May 2018 12:41:59 +0200 -Subject: [PATCH] Listen on a TCP socket -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -rpc.rquotad spins in libtirpc's rendezvous_request() on accepting TCP -connections because the polled TCP socket is not listening: - -poll([{fd=4, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}, {fd=5, - events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}, {fd=6, - events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}, {fd=7, - events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}], 4, -1) = 2 ([{fd=5, - revents=POLLHUP}, {fd=7, revents=POLLHUP}]) -accept(5, 0x7ffe61698700, [128]) = -1 EINVAL (Invalid argument) -accept(7, 0x7ffe61698700, [128]) = -1 EINVAL (Invalid argument) - -The polled descriptors are: - -rpc.rquot 21981 root 4u IPv4 80449159 0t0 UDP *:rquotad -rpc.rquot 21981 root 5u sock 0,9 0t0 80449162 protocol: TCP -rpc.rquot 21981 root 6u IPv6 80449165 0t0 UDP *:rquotad -rpc.rquot 21981 root 7u sock 0,9 0t0 80449168 protocol: TCPv6 - -That results into a high CPU usage just after staring rpc.rquotad -process. - -This patch adds a listen() call to svc_create_sock() -routine which is needed with libtirpc version of svc_tli_create() -as well as a needed IPv6 setsockopt(). - -Signed-off-by: Petr Písař <ppisar@redhat.com> ---- - svc_socket.c | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) - -diff --git a/svc_socket.c b/svc_socket.c -index 8a44604..d2e3abf 100644 ---- a/svc_socket.c -+++ b/svc_socket.c -@@ -118,6 +118,15 @@ static int svc_create_sock(struct addrinfo *ai) - return -1; - } - -+ if (ai->ai_family == AF_INET6) { -+ if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, -+ &optval, sizeof(optval)) < 0) { -+ errstr(_("Cannot set IPv6 socket options: %s\n"), strerror(errno)); -+ close(fd); -+ return -1; -+ } -+ } -+ - if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval)) < 0) { - errstr(_("Cannot set socket options: %s\n"), strerror(errno)); - close(fd); -@@ -129,6 +138,15 @@ static int svc_create_sock(struct addrinfo *ai) - close(fd); - return -1; - } -+ -+ if (ai->ai_protocol == IPPROTO_TCP) { -+ if (listen(fd, SOMAXCONN) < 0) { -+ errstr(_("Cannot listen to address: %s\n"), strerror(errno)); -+ close(fd); -+ return -1; -+ } -+ } -+ - return fd; - } - --- -2.14.3 - diff --git a/sys-fs/quota/files/quota-4.04-glibc226.patch b/sys-fs/quota/files/quota-4.04-glibc226.patch deleted file mode 100644 index 5f63cde7d426..000000000000 --- a/sys-fs/quota/files/quota-4.04-glibc226.patch +++ /dev/null @@ -1,43 +0,0 @@ -From bbb8819fc0f6ed379a05d635a61bcf9c8986079f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= <dilfridge@gentoo.org> -Date: Sat, 16 Sep 2017 13:09:43 +0200 -Subject: [PATCH] Add $(TIRPC_CFLAGS) globally to CFLAGS for RPC support, - needed for libc 2.26 - ---- - Makefile.am | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 8d80bee..278290a 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -51,6 +51,8 @@ EXTRA_DIST = \ - noinst_LIBRARIES = libquota.a - - if WITH_RPC -+CFLAGS += $(TIRPC_CFLAGS) -+ - rpcsvcdir = $(includedir)/rpcsvc - rpcsvc_DATA = \ - rquota.h \ -@@ -100,8 +102,6 @@ libquota_a_SOURCES = \ - mntopt.h \ - pot.c \ - pot.h --libquota_a_CFLAGS = \ -- $(TIRPC_CFLAGS) - libquota_a_LIBADD = \ - $(RPCLIBS) - -@@ -235,7 +235,6 @@ rpc_rquotad_SOURCES = \ - rquota_server.c \ - rquota_svc.c \ - svc_socket.c --rpc_rquotad_CFLAGS = $(TIRPC_CFLAGS) - rpc_rquotad_LDADD = \ - libquota.a \ - $(WRAP_LIBS) \ --- -2.14.1 - |