From owner-freebsd-fs@FreeBSD.ORG Tue Feb 10 16:52:10 2009 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B675106566C for ; Tue, 10 Feb 2009 16:52:10 +0000 (UTC) (envelope-from jh@saunalahti.fi) Received: from gw01.mail.saunalahti.fi (gw01.mail.saunalahti.fi [195.197.172.115]) by mx1.freebsd.org (Postfix) with ESMTP id CB9A58FC08 for ; Tue, 10 Feb 2009 16:52:09 +0000 (UTC) (envelope-from jh@saunalahti.fi) Received: from a91-153-125-115.elisa-laajakaista.fi (a91-153-125-115.elisa-laajakaista.fi [91.153.125.115]) by gw01.mail.saunalahti.fi (Postfix) with SMTP id 486D61519C6; Tue, 10 Feb 2009 18:52:05 +0200 (EET) Date: Tue, 10 Feb 2009 18:52:05 +0200 From: Jaakko Heinonen To: Robert Watson Message-ID: <20090210165204.GA4300@a91-153-125-115.elisa-laajakaista.fi> References: <20090207200918.GA58657@test71.vk2pj.dyndns.org> <20090209155521.GA3418@a91-153-125-115.elisa-laajakaista.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-fs@freebsd.org, Peter Jeremy Subject: Re: Unable to pwd in ZFS snapshot 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: Tue, 10 Feb 2009 16:52:10 -0000 Hi, On 2009-02-09, Robert Watson wrote: > Now that we have a new VOP to assist in reverse-name resolution, it could be > that ZFS could provide the back-end lookup to address this issue without > forcing the use of the namecache for things we don't want to cache. I think that a bigger problem is how __getcwd() works. If single path component lookup fails from cache or with VOP_VPTOCNP __getwcd() will abort. So even if ZFS supported VOP_VPTOCNP perfectly some path components may be on a file system which doesn't and the hidden ".zfs" prevents userspace traversal from succeeding. Actually ZFS caches the hidden ".zfs" directory (but nothing below it). Thus if __getcwd() reverted to readdir scan only for those components which really require it getcwd(3) should work right now (as long as ".zfs" is in cache). Looks like someone has tried to do this already: http://lists.freebsd.org/pipermail/freebsd-current/2004-May/027020.html The patch doesn't apply against head anymore. -- Jaakko