Date: Thu, 20 Feb 2003 19:26:11 -0800 From: David Schultz <dschultz@uclink.Berkeley.EDU> To: arch@FreeBSD.ORG Subject: UFS quota reference count overflow Message-ID: <20030221032611.GA54489@HAL9000.homeunix.com>
next in thread | raw e-mail | index | archive | help
It seems that with the advent of multi-terabyte drives, some people want to be able to set inode quotas above 65535. That is presently a problem, because when a given user manages to rack up more than 64K of active or cached vnodes, struct dquot's dq_cnt reference counter overflows and bad things happen. Are there any objections to applying the following patch to -CURRENT and (later) -STABLE? Am I correct to assume that there probably aren't any modules that would have ABI compatability issues? Index: sys/ufs/ufs/quota.h =================================================================== RCS file: /home/ncvs/src/sys/ufs/ufs/quota.h,v retrieving revision 1.15 diff -u -u -r1.15 quota.h --- sys/ufs/ufs/quota.h 1999/12/29 04:55:05 1.15 +++ sys/ufs/ufs/quota.h 2003/02/20 06:50:04 @@ -122,8 +122,7 @@ LIST_ENTRY(dquot) dq_hash; /* hash list */ TAILQ_ENTRY(dquot) dq_freelist; /* free list */ u_int16_t dq_flags; /* flags, see below */ - u_int16_t dq_cnt; /* count of active references */ - u_int16_t dq_spare; /* unused spare padding */ + u_int32_t dq_cnt; /* count of active references */ u_int16_t dq_type; /* quota type of this dquot */ u_int32_t dq_id; /* identifier this applies to */ struct ufsmount *dq_ump; /* filesystem that this is taken from */ While I'm at it, maybe I should group the two remaining 16-bit fields, in case gcc doesn't... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030221032611.GA54489>