Fix current block usage limit in RPC client
This commit is contained in:
parent
56368a413c
commit
84b2b0185d
35
quota-4.04-rpc-Fix-wrong-limit-for-space-usage.patch
Normal file
35
quota-4.04-rpc-Fix-wrong-limit-for-space-usage.patch
Normal file
@ -0,0 +1,35 @@
|
||||
From d7694c952073bf2ebb852014d9f979b5e3e7c018 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Kara <jack@suse.cz>
|
||||
Date: Mon, 28 May 2018 18:08:24 +0200
|
||||
Subject: [PATCH] rpc: Fix wrong limit for space usage
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Limit of maximum allowable space usage for RPC transfer was wrongly set
|
||||
to ~4GB instead of ~4TB due to overflow in constant initialization. Fix
|
||||
it.
|
||||
|
||||
Signed-off-by: Jan Kara <jack@suse.cz>
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
quotaio_rpc.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/quotaio_rpc.c b/quotaio_rpc.c
|
||||
index 6f25144..edc1e9f 100644
|
||||
--- a/quotaio_rpc.c
|
||||
+++ b/quotaio_rpc.c
|
||||
@@ -33,7 +33,8 @@ static int rpc_init_io(struct quota_handle *h)
|
||||
#ifdef RPC
|
||||
h->qh_info.dqi_max_b_limit = ~(uint32_t)0;
|
||||
h->qh_info.dqi_max_i_limit = ~(uint32_t)0;
|
||||
- h->qh_info.dqi_max_b_usage = (~(uint32_t)0) << QUOTABLOCK_BITS;
|
||||
+ h->qh_info.dqi_max_b_usage = ((uint64_t)(~(uint32_t)0))
|
||||
+ << QUOTABLOCK_BITS;
|
||||
h->qh_info.dqi_max_i_usage = ~(uint32_t)0;
|
||||
return 0;
|
||||
#else
|
||||
--
|
||||
2.14.3
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
Name: quota
|
||||
Epoch: 1
|
||||
Version: 4.04
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
Summary: System administration tools for monitoring users' disk usage
|
||||
# quota_nld.c, quotaio_xfs.h: GPLv2
|
||||
# bylabel.c copied from util-linux: GPLv2+
|
||||
@ -76,6 +76,9 @@ Patch9: quota-4.04-quotacheck-Fail-check-if-quota-file-magic-is-invalid.patch
|
||||
# Fix busy loop in rpc.rquotad, bug #1575956, in upstream after 4.04,
|
||||
# <https://sourceforge.net/p/linuxquota/feature-requests/16/>
|
||||
Patch10: quota-4.04-Listen-on-a-TCP-socket.patch
|
||||
# Fix current block usage limit in RPC client, in upstream after 4.04,
|
||||
# <https://sourceforge.net/p/linuxquota/bugs/127/>
|
||||
Patch11: quota-4.04-rpc-Fix-wrong-limit-for-space-usage.patch
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: bash
|
||||
@ -200,6 +203,7 @@ Linux/UNIX environment.
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
# Regenerate build scripts
|
||||
autoreconf -f -i
|
||||
|
||||
@ -344,6 +348,9 @@ make check
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed May 30 2018 Petr Pisar <ppisar@redhat.com> - 1:4.04-7
|
||||
- Fix current block usage limit in RPC client
|
||||
|
||||
* Tue May 22 2018 Petr Pisar <ppisar@redhat.com> - 1:4.04-6
|
||||
- Fix busy loop in rpc.rquotad (bug #1575956)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user