forked from pool/quota
- Update to 4.05 release jsc#SLE-5734:
* This release includes mostly various smaller cleanups and fixes in various areas. * Most visible changes are addition of f2fs and exfs among recognized filesystems. - Drop merged patch quota-4.04-Listen-on-a-TCP-socket.patch - Remove quot binary functionality could be achieved by using repquota instead OBS-URL: https://build.opensuse.org/package/show/Base:System/quota?expand=0&rev=59
This commit is contained in:
parent
26a21cac9e
commit
56e562b510
@ -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
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:735be1887e7f51f54165e778ae43fc859c04e44d88834ecb2f470e91d4ef8edf
|
||||
size 577303
|
3
quota-4.05.tar.gz
Normal file
3
quota-4.05.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ef3b5b5d1014ed1344b46c1826145e20cbef8db967b522403c9a060761cf7ab9
|
||||
size 577313
|
@ -1,3 +1,15 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 1 09:15:59 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Update to 4.05 release jsc#SLE-5734:
|
||||
* This release includes mostly various smaller cleanups and fixes
|
||||
in various areas.
|
||||
* Most visible changes are addition of f2fs and exfs among recognized
|
||||
filesystems.
|
||||
- Drop merged patch quota-4.04-Listen-on-a-TCP-socket.patch
|
||||
- Remove quot binary functionality could be achieved by using
|
||||
repquota instead
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 15 10:57:33 UTC 2018 - tchvatal@suse.com
|
||||
|
||||
|
@ -21,17 +21,16 @@
|
||||
%define _fillupdir %{_localstatedir}/adm/fillup-templates
|
||||
%endif
|
||||
Name: quota
|
||||
Version: 4.04
|
||||
Version: 4.05
|
||||
Release: 0
|
||||
Summary: Disk Quota System
|
||||
License: GPL-2.0-only AND BSD-3-Clause
|
||||
License: GPL-2.0-only
|
||||
Group: System/Filesystems
|
||||
Url: http://sourceforge.net/projects/linuxquota/
|
||||
Source0: http://downloads.sourceforge.net/project/linuxquota/quota-tools/%{version}/%{name}-%{version}.tar.gz
|
||||
Source1: sysconfig.nfs-quota
|
||||
Source2: quotad.service
|
||||
Source3: quotad_env.sh
|
||||
Patch1: quota-4.04-Listen-on-a-TCP-socket.patch
|
||||
Patch2: %{name}-4.01-warnquota.patch
|
||||
BuildRequires: e2fsprogs-devel
|
||||
BuildRequires: openldap2-devel
|
||||
@ -66,7 +65,6 @@ The quotad init script, which provides quota support on NFS mounts.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
%patch2
|
||||
|
||||
%build
|
||||
@ -123,7 +121,6 @@ cp %{SOURCE1} %{buildroot}%{_fillupdir}/sysconfig.nfs-quota
|
||||
%{_sbindir}/convertquota
|
||||
%{_sbindir}/edquota
|
||||
%{_sbindir}/edquota_editor
|
||||
%{_sbindir}/quot
|
||||
%{_sbindir}/quota_nld
|
||||
%{_sbindir}/quotacheck
|
||||
%{_sbindir}/quotaoff
|
||||
|
Loading…
Reference in New Issue
Block a user