From owner-cvs-all@FreeBSD.ORG Thu Jul 31 09:50:53 2008 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 134FE106566B for ; Thu, 31 Jul 2008 09:50:53 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.153]) by mx1.freebsd.org (Postfix) with ESMTP id 980238FC23 for ; Thu, 31 Jul 2008 09:50:52 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so527262fgb.35 for ; Thu, 31 Jul 2008 02:50:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=P5MAFIcqBABBaAIVVZLqLPWZ+qrATBMT3LoFLYajmN8=; b=i2yqF/hT9l9tmvbgy/KGV1fRliLi4PdehthfBTs1Y+m7wVJHtBeML2CDLN53dRV4lr 9l9F2oQw5D4CcHZomHyI2s/FvLhihhUhvQD5DPV4wh0eGs6BWSsyzXCMPhm7uCec6tsF gPo4F2xHdqGCQjcjGx+MIsqbF7OHu/FZc0wcc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=xC8rSoeaVnvI8p9WXpnE0Y50DlEtf6kgvheMv0dsyJ+0O1dJbl+vfnX9m9uLEwDTe4 47kksU2tqYA1Ht1Xc8+Gb16r0ScusubIMgAa2PTGjvjxrKI+TgPhQvohG4kXqrMN1Zl/ ++xqDHFUcO/2gj6RWjYJIWyP9tR2ddhJmplms= Received: by 10.86.59.2 with SMTP id h2mr5915328fga.40.1217497851297; Thu, 31 Jul 2008 02:50:51 -0700 (PDT) Received: by 10.86.78.14 with HTTP; Thu, 31 Jul 2008 02:50:51 -0700 (PDT) Message-ID: <3bbf2fe10807310250v22258277g9a66e59c35778b64@mail.gmail.com> Date: Thu, 31 Jul 2008 11:50:51 +0200 From: "Attilio Rao" Sender: asmrookie@gmail.com To: "Konstantin Belousov" In-Reply-To: <200807301819.m6UIJmY4004034@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200807301819.m6UIJmY4004034@repoman.freebsd.org> X-Google-Sender-Auth: 88d0b55245422f58 Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/vm vnode_pager.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Jul 2008 09:50:53 -0000 2008/7/30 Konstantin Belousov : > kib 2008-07-30 18:16:06 UTC > > FreeBSD src repository > > Modified files: > sys/vm vnode_pager.c > Log: > SVN rev 181004 on 2008-07-30 18:16:06Z by kib > > The behaviour of the lockmgr going back at least to the 4.4BSD-Lite2 was > to downgrade the exclusive lock to shared one when exclusive lock owner > requested shared lock. New lockmgr panics instead. > > The vnode_pager_lock function requests shared lock on the vnode backing > the OBJT_VNODE, and can be called when the current thread already holds > an exlcusive lock on the vnode. For instance, it happens when handling > page fault from the VOP_WRITE() uiomove that writes to the file, with > the faulted in page fetched from the vm object backed by the same file. > We then get the situation described above. > > Verify whether the vnode is already exclusively locked by the curthread > and request recursed exclusive vnode lock instead of shared, if true. Many thanks. Attilio -- Peace can only be achieved by understanding - A. Einstein