Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Jul 2001 19:49:25 +0900
From:      Seigo Tanimura <tanimura@r.dl.itc.u-tokyo.ac.jp>
To:        bright@sneakerz.org
Cc:        tanimura@r.dl.itc.u-tokyo.ac.jp, jake@FreeBSD.org, jhb@FreeBSD.org, current@FreeBSD.org
Subject:   Re: Lock of struct filedesc, file, pgrp, session and sigio
Message-ID:  <200107131049.f6DAnPt95755@rina.r.dl.itc.u-tokyo.ac.jp>
In-Reply-To: In your message of "Fri, 13 Jul 2001 04:25:04 -0500" <20010713042504.O6664@sneakerz.org>
References:  <20010602125223.J31257@dragon.nuxi.com> <200106040748.f547mUD53783@rina.r.dl.itc.u-tokyo.ac.jp> <200106181004.f5IA4VD63112@rina.r.dl.itc.u-tokyo.ac.jp> <200107020812.f628CfK44241@rina.r.dl.itc.u-tokyo.ac.jp> <20010707164249.C88962@sneakerz.org> <20010709032044.B1894@sneakerz.org> <200107100845.f6A8jqt99404@rina.r.dl.itc.u-tokyo.ac.jp> <20010710035347.Q1894@sneakerz.org> <200107100903.f6A93et02367@rina.r.dl.itc.u-tokyo.ac.jp> <200107111137.f6BBbQt22812@rina.r.dl.itc.u-tokyo.ac.jp> <20010713042504.O6664@sneakerz.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 13 Jul 2001 04:25:04 -0500,
  Alfred Perlstein <bright@sneakerz.org> said:

Alfred> This is just about completely file locking related,
Alfred> however I do have a question about PGRP locking, in
Alfred> a certain part you may have to lock two pgrps, how do you
Alfred> deal with deadlock?

Lock the session to which the pgrps belong first, then lock the pgrps.

AFAIK, there are only two places to lock two pgrps, namely enterpgrp()
and fixjobc() with an argument 'entering' set to nonzero. In both
cases, either the pgrps belong to the same session or one of the pgrps
belongs to a brand-new session with no other pgrps.


Alfred> getvnode()
Alfred> should FHOLD returned fp.

Alfred> ibcs2_getdents(), ibcs2_statfs(), __acl_get_fd, __acl_set_fd,
Alfred> __acl_aclcheck_fd(), __acl_delete_fd()
Alfred>  depends on getvnode doing FHOLD, once done needs fdrop() added

Aaugh, I finished that work two hours ago :)


Alfred> getvnode()
Alfred> should actually be turned into "holdvnode" (implicit VREF) to do
Alfred> reference holding. (later)

Fine.


Alfred> Certain operations, such as:
Alfred>   kq = (struct kqueue *)fp->f_data;
Alfred> should not really require that the file be locked, it's implicitly frozen
Alfred> at creation time (i think)

Yes.

-- 
Seigo Tanimura <tanimura@r.dl.itc.u-tokyo.ac.jp> <tanimura@FreeBSD.org>

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?200107131049.f6DAnPt95755>