From owner-freebsd-bugs Mon Mar 12 0:10: 6 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 5DA9C37B719 for ; Mon, 12 Mar 2001 00:10:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f2C8A1064013; Mon, 12 Mar 2001 00:10:01 -0800 (PST) (envelope-from gnats) Received: from shiva.tri.asanuma.co.jp (shiva.tri.asanuma.co.jp [210.160.188.2]) by hub.freebsd.org (Postfix) with ESMTP id 2DF1937B718 for ; Mon, 12 Mar 2001 00:00:39 -0800 (PST) (envelope-from mori@tri.asanuma.co.jp) Received: from yashoda.tri.asanuma.co.jp (yashoda.tri.asanuma.co.jp [172.16.57.11]) by shiva.tri.asanuma.co.jp (Postfix) with ESMTP id 2B7A5542B for ; Mon, 12 Mar 2001 17:00:37 +0900 (JST) Received: from localhost (kurishna.tri.asanuma.co.jp [2001:218:4dc:1:200:f8ff:fe02:ec60]) by yashoda.tri.asanuma.co.jp (8.11.0/8.11.0) with ESMTP id f2C80a302039; Mon, 12 Mar 2001 17:00:36 +0900 (JST) Message-Id: <20010312.170036.74756375.mori@tri.asanuma.co.jp> Date: Mon, 12 Mar 2001 17:00:36 +0900 (JST) From: MORI Kouji To: FreeBSD-gnats-submit@freebsd.org Subject: bin/25724: quota(1) outputs wrong limits about nfs quota Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 25724 >Category: bin >Synopsis: quota(1) outputs wrong limits about NFS quota >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Mar 12 00:10:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: Koji Mori >Release: FreeBSD 4.2-STABLE i386 >Organization: Techinical Reserach Institute, Asanuma Corp., Takatsuki, Japan >Environment: FreeBSD 4.2-stable (nfs client), NetBSD 1.5 (nfs server) >Description: quota(1) has int overflow problem in getnfsquota(). I set soft/hard limits to 5GB on remote system (NetBSD), and view quota on FreeBSD. I got follow output. Soft/hard limits is too small. Filesystem blocks quota limit grace files quota limit grace /.u0 1980574* 805696 805696 none 9983 0 0 I expected follow output. Filesystem blocks quota limit grace files quota limit grace /.u0 1980574 5000000 5000000 9983 0 0 >How-To-Repeat: Show big quota (ex. 5GB) on NFS mounted file system with quota. >Fix: This patch is for src/usr.bin/quota/quota.c rev.1.11.2.1. --- quota.c 2000/07/02 09:57:51 1.11.2.1 +++ quota.c 2001/03/12 02:59:15 @@ -641,13 +641,13 @@ case Q_OK: gettimeofday(&tv, NULL); /* blocks*/ - dqp->dqb_bhardlimit = + dqp->dqb_bhardlimit = (u_quad_t) gq_rslt.getquota_rslt_u.gqr_rquota.rq_bhardlimit * gq_rslt.getquota_rslt_u.gqr_rquota.rq_bsize / DEV_BSIZE; - dqp->dqb_bsoftlimit = + dqp->dqb_bsoftlimit = (u_quad_t) gq_rslt.getquota_rslt_u.gqr_rquota.rq_bsoftlimit * gq_rslt.getquota_rslt_u.gqr_rquota.rq_bsize / DEV_BSIZE; - dqp->dqb_curblocks = + dqp->dqb_curblocks = (u_quad_t) gq_rslt.getquota_rslt_u.gqr_rquota.rq_curblocks * gq_rslt.getquota_rslt_u.gqr_rquota.rq_bsize / DEV_BSIZE; /* inodes */ >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message