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

next in thread | previous in thread | raw e-mail | index | archive | help

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



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