From owner-cvs-src@FreeBSD.ORG Thu Mar 9 18:09:42 2006 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from green.homeunix.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id F13D416A420; Thu, 9 Mar 2006 18:09:41 +0000 (GMT) (envelope-from green@green.homeunix.org) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.13.4/8.13.1) with ESMTP id k29I9fNe065593; Thu, 9 Mar 2006 13:09:41 -0500 (EST) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.13.4/8.13.1/Submit) id k29I9eNR065592; Thu, 9 Mar 2006 13:09:40 -0500 (EST) (envelope-from green) Date: Thu, 9 Mar 2006 13:09:40 -0500 From: Brian Fundakowski Feldman To: Eric Anderson Message-ID: <20060309180940.GD7835@green.homeunix.org> References: <200603080214.k282EdBH054091@repoman.freebsd.org> <20060308070632.GA52377@ip.net.ua> <20060308081625.GA55281@xor.obsecurity.org> <20060308104000.GC52377@ip.net.ua> <440F1346.10109@centtech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <440F1346.10109@centtech.com> User-Agent: Mutt/1.5.11 Cc: src-committers@freebsd.org, cvs-src@freebsd.org, cvs-all@freebsd.org, Ruslan Ermilov , Kris Kennaway , Tor Egge Subject: Re: cvs commit: src/sys/ufs/ufs ufs_lookup.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Mar 2006 18:09:42 -0000 On Wed, Mar 08, 2006 at 11:24:22AM -0600, Eric Anderson wrote: > Ruslan Ermilov wrote: > >On Wed, Mar 08, 2006 at 03:16:25AM -0500, Kris Kennaway wrote: > > > >>On Wed, Mar 08, 2006 at 09:06:32AM +0200, Ruslan Ermilov wrote: > >> > >>>On Wed, Mar 08, 2006 at 02:14:39AM +0000, Tor Egge wrote: > >>> > >>>>tegge 2006-03-08 02:14:39 UTC > >>>> > >>>> FreeBSD src repository > >>>> > >>>> Modified files: > >>>> sys/ufs/ufs ufs_lookup.c > >>>> Log: > >>>> Don't set IN_CHANGE and IN_UPDATE on inodes for potentially suspended > >>>> file systems. This could cause deadlocks when creating snapshots. > >>>> > >>>> Reviewed by: jeff > >>>> > >>>> Revision Changes Path > >>>> 1.80 +0 -1 src/sys/ufs/ufs/ufs_lookup.c > >>>> > >>>> > >>>Like for example "ls -l /filesystem/.snap" when "fsck -B" is in place? > >>> > >>Is that a deadlock, or just the process being suspended until fsck > >>finishes? > >> > > I think the only options we have to fix this is to either make the .snap > directory 'hidden' (which is not a feature yet), or to possibly cache > the inode information on parent directories containing snapshots, so > when a fs is suspended or a snapshot is in progress, a stat of the > parent directory of the snapshots' doesn't block until the snapshot > finishes. > > There has been brief discussion on freebsd-fs@ about adding a 'hidden' > flag (usable with chflags) to files and directories, and tools like ls, > etc, that would normally stat each file/dir in a directory would ignore, > unless a special option was used. That would not stop other tools doing > stat calls from seeing it though, but I think most of the blocking > happens when a user does an ls -al in the directory. That's the same reason I don't mount random stuff onto the root directory. Everything that walks the filesystem can block way too easily (and inadvertently), and using /disk (or a convention like OS X's /Volumes) circumvents most of these problems. Having one per-mount is a little ugly, but /mnt/.metadata/snapshots isn't really THAT much worse. -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\