Date: Sun, 5 Jul 1998 13:30:04 -0700 (PDT) From: Julian Elischer <julian@whistle.com> To: Garrett Wollman <wollman@khavrinen.lcs.mit.edu> Cc: current@FreeBSD.ORG Subject: Re: small locking patch for discussion Message-ID: <Pine.BSF.3.95.980705132824.11284E-100000@current1.whistle.com> In-Reply-To: <199807051959.PAA20741@khavrinen.lcs.mit.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
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:
> <<On Sat, 4 Jul 1998 14:58:11 -0700 (PDT), Julian Elischer <julian@whistle.com> said:
>
> > --0-1966150496-899589491=:10069
> > Content-Type: TEXT/PLAIN; charset=US-ASCII; name=quotadiff
> > Content-Transfer-Encoding: BASE64
> > Content-ID: <Pine.BSF.3.95.980704145811.10069G@current1.whistle.com>
> > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.980705132824.11284E-100000>
