From owner-freebsd-current Wed Aug 26 23:58:54 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA21583 for freebsd-current-outgoing; Wed, 26 Aug 1998 23:58:54 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from word.smith.net.au (castles320.castles.com [208.214.167.20]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA21568 for ; Wed, 26 Aug 1998 23:58:50 -0700 (PDT) (envelope-from mike@word.smith.net.au) Received: from word.smith.net.au (localhost [127.0.0.1]) by word.smith.net.au (8.9.1/8.8.8) with ESMTP id XAA01816; Wed, 26 Aug 1998 23:56:18 GMT (envelope-from mike@word.smith.net.au) Message-Id: <199808262356.XAA01816@word.smith.net.au> X-Mailer: exmh version 2.0.2 2/24/98 To: Luoqi Chen cc: current@FreeBSD.ORG Subject: Re: possible race window for getblk? In-reply-to: Your message of "Wed, 26 Aug 1998 08:35:48 -0400." <199808261235.IAA04095@lor.watermarkgroup.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 26 Aug 1998 23:56:17 +0000 From: Mike Smith Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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