From owner-freebsd-fs@FreeBSD.ORG Fri Feb 20 05:41:02 2004 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 987E216A4CE; Fri, 20 Feb 2004 05:41:02 -0800 (PST) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 179AB43D2D; Fri, 20 Feb 2004 05:41:01 -0800 (PST) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.12.9p2/8.12.9) with ESMTP id i1KDeu0V094140; Fri, 20 Feb 2004 16:40:56 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.12.9p2/8.12.9/Submit) id i1KDetQ7094105; Fri, 20 Feb 2004 16:40:55 +0300 (MSK) (envelope-from yar) Date: Fri, 20 Feb 2004 16:40:54 +0300 From: Yar Tikhiy To: Norikatsu Shigemura Message-ID: <20040220134054.GD91603@comp.chem.msu.su> References: <200402201211.i1KCBbXh087403@sakura.ninth-nine.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200402201211.i1KCBbXh087403@sakura.ninth-nine.com> User-Agent: Mutt/1.5.3i cc: fs@FreeBSD.org Subject: Re: Cannot build hfs-freebsd-03p1 on 5-current X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Feb 2004 13:41:02 -0000 On Fri, Feb 20, 2004 at 09:11:37PM +0900, Norikatsu Shigemura wrote: > Hum.. I can't compile hfs-freebsd-03p1 on 5-current. > Anyone, do you know this fix? [...] > /tmp/hfs-freebsd-03p1/darwin/xnu/bsd/hfs/hfs_readwrite.c: In function `hfs_write': > /tmp/hfs-freebsd-03p1/darwin/xnu/bsd/hfs/hfs_readwrite.c:341: error: structure has no member named `p_rlimit' I believe that was due to a recent change in the per-process rlimit structure. Would you mind trying the patch attached below? -- Yar --- hfs_readwrite.c 7 Feb 2004 17:27:43 -0000 1.40.2.2 +++ hfs_readwrite.c 20 Feb 2004 13:07:14 -0000 @@ -337,12 +337,14 @@ hfs_write(ap) * file servers have no limits, I don't think it matters. */ p = uio->uio_td; - if (vp->v_type == VREG && p && - writelimit > p->td_proc->p_rlimit[RLIMIT_FSIZE].rlim_cur) { + if (vp->v_type == VREG && p != NULL) { PROC_LOCK(p->td_proc); - psignal(p->td_proc, SIGXFSZ); + if (writelimit > lim_cur(p->td_proc, RLIMIT_FSIZE)) { + psignal(p->td_proc, SIGXFSZ); + PROC_UNLOCK(p->td_proc); + return (EFBIG); + } PROC_UNLOCK(p->td_proc); - return (EFBIG); } p = current_proc();