From owner-freebsd-fs@FreeBSD.ORG Mon Aug 21 13:37:18 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A666916A4E2; Mon, 21 Aug 2006 13:37:18 +0000 (UTC) (envelope-from anderson@centtech.com) Received: from mh2.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 215A543D7B; Mon, 21 Aug 2006 13:37:14 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh2.centtech.com (8.13.1/8.13.1) with ESMTP id k7LDbAM8095409; Mon, 21 Aug 2006 08:37:11 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <44E9B722.2040407@centtech.com> Date: Mon, 21 Aug 2006 08:37:38 -0500 From: Eric Anderson User-Agent: Thunderbird 1.5.0.5 (X11/20060802) MIME-Version: 1.0 To: Tor Egge References: <20060817170314.GA17490@peter.osted.lan> <20060818164903.GF20768@deviant.kiev.zoral.com.ua> <20060818.202001.74745664.Tor.Egge@cvsup.no.freebsd.org> <20060821.132151.41668008.Tor.Egge@cvsup.no.freebsd.org> In-Reply-To: <20060821.132151.41668008.Tor.Egge@cvsup.no.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.87.1/1700/Mon Aug 21 07:08:16 2006 on mh2.centtech.com X-Virus-Status: Clean Cc: freebsd-fs@freebsd.org, tegge@freebsd.org Subject: Re: Deadlock between nfsd and snapshots. X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Aug 2006 13:37:18 -0000 On 08/21/06 08:21, Tor Egge wrote: > I wrote: > >> The deadlock indicates that one or more of IN_CHANGE, IN_MODIFIED or >> IN_UPDATE was set on the inode, indicating a write operation >> (e.g. VOP_WRITE(), VOP_RENAME(), VOP_CREATE(), VOP_REMOVE(), VOP_LINK(), >> VOP_SYMLINK(), VOP_SETATTR(), VOP_MKDIR(), VOP_RMDIR(), VOP_MKNOD()) that was >> not protected by vn_start_write() or vn_start_secondary_write(). > > The most common "write" operation was probably VOP_GETATTR(). > > ufs_itimes(), called from ufs_getattr(), might set the IN_MODIFIED inode flag > if IN_ACCESS is set on the inode even if neither IN_CHANGE nor IN_UPDATE is > set, transitioning the inode flags into a state where ufs_inactive() calls the > blocking variant of vn_start_secondary_write(). > > calling ufs_itimes() with only a shared vnode lock might cause unsafe accesses > to the inode flags. Setting of IN_ACCESS at the end of ffs_read() and > ffs_extread() might also be unsafe. If DIRECTIO is enabled then O_DIRECT reads > might not even attempt to set the IN_ACCESS flag. Does this mean that setting the noatime flag on mount would dodge this? Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------