From 30fd97485862b0a44cc601cde195a061639cf0c8 Mon Sep 17 00:00:00 2001 From: Petr Písař Date: Feb 09 2011 15:06:02 +0000 Subject: Initialize vfsold block and inode value boundries for new quota file Part of bug #668688. --- diff --git a/quota-4.00_pre1-Initialize-vfsold-block-and-inode-value-boundries-fo.patch b/quota-4.00_pre1-Initialize-vfsold-block-and-inode-value-boundries-fo.patch new file mode 100644 index 0000000..2fcd809 --- /dev/null +++ b/quota-4.00_pre1-Initialize-vfsold-block-and-inode-value-boundries-fo.patch @@ -0,0 +1,32 @@ +From 7313d70407961939fda2b46c7d3c00cc98fe412e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Wed, 9 Feb 2011 15:40:08 +0100 +Subject: [PATCH] Initialize vfsold block and inode value boundries for new quota file + +Otherwise `quotackech -c -F vfsold' fails with `Trying to set quota +usage out of range supported by quota format on...' because initial +boundry is zero. + +Fixes SF bug #3176326. +--- + quotaio_v1.c | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/quotaio_v1.c b/quotaio_v1.c +index 305bff2..61bd93e 100644 +--- a/quotaio_v1.c ++++ b/quotaio_v1.c +@@ -195,6 +195,10 @@ static int v1_new_io(struct quota_handle *h) + ddqblk.dqb_itime = MAX_IQ_TIME; + h->qh_info.dqi_bgrace = MAX_DQ_TIME; + h->qh_info.dqi_igrace = MAX_IQ_TIME; ++ 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 = ((uint64_t)(~(uint32_t)0)) << V1_DQBLK_SIZE_BITS; ++ h->qh_info.dqi_max_i_usage = ~(uint32_t)0; + lseek(h->qh_fd, 0, SEEK_SET); + if (write(h->qh_fd, &ddqblk, sizeof(ddqblk)) != sizeof(ddqblk)) + return -1; +-- +1.7.4 + diff --git a/quota.spec b/quota.spec index 177bd94..627d90b 100644 --- a/quota.spec +++ b/quota.spec @@ -5,7 +5,7 @@ Name: quota Summary: System administration tools for monitoring users' disk usage Epoch: 1 Version: 4.00 -Release: 0.7.pre1%{?dist} +Release: 0.8.pre1%{?dist} License: BSD and GPLv2+ URL: http://sourceforge.net/projects/linuxquota/ Group: System Environment/Base @@ -58,6 +58,8 @@ Patch19: quota-4.00_pre1-Store-PID-of-quota_nld.patch Patch20: quota-4.00_pre1-Add-quotasync-tool.patch # Bug #596794, in upstream 4.00_pre2 Patch21: quota-4.00_pre1-Implement-quotacheck-for-GFS2.patch +# Bug 668688, submitted to upstream +Patch22: quota-4.00_pre1-Initialize-vfsold-block-and-inode-value-boundries-fo.patch %description The quota package contains system administration tools for monitoring @@ -149,6 +151,7 @@ Linux/UNIX environment. %patch19 -p1 -b .store_pid %patch20 -p1 -b .add_quotasync %patch21 -p1 -b .gfs2_quotacheck +%patch22 -p1 -b .inizialize_vfsold_boundries # quotactl(2) moved into `man-pages' package (bug #640590) rm -f quotactl.2 # remove VCS files @@ -271,6 +274,10 @@ rm -rf %{buildroot} %changelog +* Wed Feb 09 2011 Petr Pisar - 1:4.00-0.8.pre1 +- Initialize vfsold block and inode value boundries for new quota file + (bug #668688) + * Tue Feb 08 2011 Fedora Release Engineering - 1:4.00-0.7.pre1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild