This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Base <sys/quota.h> on Linux kernel headers [BZ #20525]


On Tue, Aug 30, 2016 at 04:05:19PM +0200, Florian Weimer wrote:
> Macros which are also defined in <linux/quota.h> are removed, and
> <linux/quota.h> is included instead.
> 
> This commit cleans up the definition of fs_to_dq_blocks and struct
> dqblock and struct dqinfo, too.
> 
> 2016-08-30  Florian Weimer  <fweimer@redhat.com>
> 
> 	[BZ #20525]
> 	* sysdeps/unix/sysv/linux/sys/quota.h: Update copyright.
> 	Include <linux/quota.h>.
> 	(fs_to_dq_blocks): Hard-code BLOCK_SIZE as 1024, to match dbtob
> 	and btodb.
> 	(_LINUX_QUOTA_VERSION, MAXQUOTAS, USRQUOTA, GRPQUOTA, INITQFNAMES)
> 	(SUBCMDMASK, SUBCMDSHIFT, QCMD, Q_QUOTAON, Q_QUOTAOFF, Q_GETQUOTA)
> 	(Q_SETQUOTA, Q_SETUSE, Q_SYNC, Q_SETQLIM, Q_GETSTATS, Q_RSQUASH)
> 	(Q_GETFMT, Q_GETINFO, Q_SETINFO, Q_GETNEXTQUOTA, QIF_BLIMITS)
> 	(QIF_SPACE, QIF_ILIMITS, QIF_INODES, QIF_BTIME, QIF_ITIME)
> 	(QIF_LIMITS, QIF_USAGE, QIF_TIMES, QIF_ALL, IIF_BGRACE)
> 	(IIF_IGRACE, IIF_FLAGS, IIF_ALL): Remove.
> 	(struct dqblock, struct dqinfo): Use __uint64_t and __uint32_t
> 	types.

Can we just typedef dqblock and dqinfo to struct if_dqblk and
struct if_dqinfo, respectively?

> 	* sysdeps/unix/sysv/linux/tst-quota.c: New test.

Could you add this new test to the patch, please?

[...]
> @@ -57,7 +67,7 @@
>   * Convert count of filesystem blocks to diskquota blocks, meant
>   * for filesystems where i_blksize != BLOCK_SIZE
>   */
> -#define fs_to_dq_blocks(num, blksize) (((num) * (blksize)) / BLOCK_SIZE)
> +#define fs_to_dq_blocks(num, blksize) (((num) * (blksize)) / 1024)

This change makes the cited comment somewhat out of context.


-- 
ldv

Attachment: pgpkDODZRxbZv.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]