From owner-cvs-src@FreeBSD.ORG Wed Mar 8 20:33:59 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7036C16A420; Wed, 8 Mar 2006 20:33:59 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id C058743D46; Wed, 8 Mar 2006 20:33:56 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [10.10.3.185] ([69.15.205.254]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id k28KXrJB021520; Wed, 8 Mar 2006 13:33:54 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <440F3FAA.5090804@samsco.org> Date: Wed, 08 Mar 2006 13:33:46 -0700 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060206 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Eric Anderson References: <200603080214.k282EdBH054091@repoman.freebsd.org> <20060308070632.GA52377@ip.net.ua> <20060308081625.GA55281@xor.obsecurity.org> <20060308104000.GC52377@ip.net.ua> <440ED585.4090706@centtech.com> In-Reply-To: <440ED585.4090706@centtech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=3.8 tests=none autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on pooker.samsco.org 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: Wed, 08 Mar 2006 20:33:59 -0000 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. > > > Eric > > > > The only way to effectively avoid the problem would be to teach UFS to completely ignore the '.snap' directory entry when doing a readdir and lookup. That is not the same as what is being discussed with having a special hiiden hint flag. Scott