From owner-freebsd-current Sun Jul 5 13:40:22 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA00347 for freebsd-current-outgoing; Sun, 5 Jul 1998 13:40:22 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA00300 for ; Sun, 5 Jul 1998 13:40:10 -0700 (PDT) (envelope-from julian@whistle.com) Received: (from daemon@localhost) by alpo.whistle.com (8.8.5/8.8.5) id NAA22619; Sun, 5 Jul 1998 13:30:16 -0700 (PDT) Received: from current1.whistle.com(207.76.205.22) via SMTP by alpo.whistle.com, id smtpd022614; Sun Jul 5 20:30:08 1998 Date: Sun, 5 Jul 1998 13:30:04 -0700 (PDT) From: Julian Elischer To: Garrett Wollman cc: current@FreeBSD.ORG Subject: Re: small locking patch for discussion In-Reply-To: <199807051959.PAA20741@khavrinen.lcs.mit.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I was not aware that it did it that way.. I'm just using pine.. I though it had done it 'plain text' here's the patch Index: ufs/ufs/ufs_quota.c =================================================================== RCS file: /home/ncvs/src/sys/ufs/ufs/ufs_quota.c,v retrieving revision 1.23 diff -c -r1.23 ufs_quota.c *** ufs_quota.c 1998/06/21 14:53:40 1.23 --- ufs_quota.c 1998/07/04 20:39:16 *************** *** 465,478 **** /* * Search vnodes associated with this mount point, * deleting any references to quota file being closed. */ again: for (vp = mp->mnt_vnodelist.lh_first; vp != NULL; vp = nextvp) { nextvp = vp->v_mntvnodes.le_next; if (vp->v_type == VNON) continue; ! if (vget(vp, LK_EXCLUSIVE, p)) goto again; ip = VTOI(vp); dq = ip->i_dquot[type]; ip->i_dquot[type] = NODQUOT; --- 465,489 ---- /* * Search vnodes associated with this mount point, * deleting any references to quota file being closed. + * + * This is nearly identical to code in VFSOP_RELOAD, and + * *must* be maintained in parallel! */ again: + simple_lock(&mntvnode_slock); for (vp = mp->mnt_vnodelist.lh_first; vp != NULL; vp = nextvp) { + if (vp->v_mount != mp) { + simple_unlock(&mntvnode_slock); + goto again; + } nextvp = vp->v_mntvnodes.le_next; if (vp->v_type == VNON) continue; ! simple_lock(&vp->v_interlock); ! simple_unlock(&mntvnode_slock); ! if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, p)) { goto again; + } ip = VTOI(vp); dq = ip->i_dquot[type]; ip->i_dquot[type] = NODQUOT; *************** *** 480,485 **** --- 491,497 ---- vput(vp); if (vp->v_mntvnodes.le_next != nextvp || vp->v_mount != mp) goto again; + simple_lock(&mntvnode_slock); } dqflush(qvp); qvp->v_flag &= ~VSYSTEM; #########------- On Sun, 5 Jul 1998, Garrett Wollman wrote: > < said: > > > --0-1966150496-899589491=:10069 > > Content-Type: TEXT/PLAIN; charset=US-ASCII; name=quotadiff > > Content-Transfer-Encoding: BASE64 > > Content-ID: > > Content-Description: > > Please explain to the authors of your MUA that base64-encoded US-ASCII > is an unspeakable evil. I would probably have read this patch were it > actually readable. > > > SW5kZXg6IHVmcy91ZnMvdWZzX3F1b3RhLmMNCj09PT09PT09PT09PT09PT09 > > -GAWollman > > -- > Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same > wollman@lcs.mit.edu | O Siem / The fires of freedom > Opinions not those of| Dance in the burning flame > MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message