Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Feb 2009 17:56:03 +0000 (GMT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Jaakko Heinonen <jh@saunalahti.fi>
Cc:        freebsd-fs@freebsd.org, Peter Jeremy <peter@vk2pj.dyndns.org>
Subject:   Re: Unable to pwd in ZFS snapshot
Message-ID:  <alpine.BSF.2.00.0902091755210.7099@fledge.watson.org>
In-Reply-To: <20090209155521.GA3418@a91-153-125-115.elisa-laajakaista.fi>
References:  <20090207200918.GA58657@test71.vk2pj.dyndns.org> <20090209155521.GA3418@a91-153-125-115.elisa-laajakaista.fi>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 9 Feb 2009, Jaakko Heinonen wrote:

> On 2009-02-08, Peter Jeremy wrote:
>> I'm running -current from late last year (just after the ZFS v13 import) 
>> and have found that I can't determine the current working directory inside 
>> a snapshot:
>
> getcwd(3) first tries __getcwd() system call but it always fails because the 
> VFS name cache is not supported for .zfs control directories. Secondly 
> getcwd(3) tries to resolve working directory by traversing the directory 
> tree to root but this fails too because the .zfs directory is normally 
> hidden from the directory listing. (getcwd(3) uses readdir(3) to find 
> component names)

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.

Robert N M Watson
Computer Laboratory
University of Cambridge



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.0902091755210.7099>