Date: Wed, 26 Aug 1998 23:56:17 +0000 From: Mike Smith <mike@smith.net.au> To: Luoqi Chen <luoqi@watermarkgroup.com> Cc: current@FreeBSD.ORG Subject: Re: possible race window for getblk? Message-ID: <199808262356.XAA01816@word.smith.net.au> In-Reply-To: Your message of "Wed, 26 Aug 1998 08:35:48 -0400." <199808261235.IAA04095@lor.watermarkgroup.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> The problem with this check is, reads only hold shared lock on the vnode, > thus the vnode lock won't prevent two reads from successfully creating > two new buffers at the same block offset. This check should be extended > to shared lock: > if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE && gbincore(vp, blkno)) { > bp->b_flags |= B_INVAL; > brelse(bp); > goto loop; > } Makes sense. Does this apply to -stable as well? -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com 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?199808262356.XAA01816>