Date: Mon, 9 Feb 2009 17:55:21 +0200 From: Jaakko Heinonen <jh@saunalahti.fi> To: Peter Jeremy <peter@vk2pj.dyndns.org> Cc: freebsd-fs@freebsd.org Subject: Re: Unable to pwd in ZFS snapshot Message-ID: <20090209155521.GA3418@a91-153-125-115.elisa-laajakaista.fi> In-Reply-To: <20090207200918.GA58657@test71.vk2pj.dyndns.org> References: <20090207200918.GA58657@test71.vk2pj.dyndns.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, 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) > This breaks (eg) make. I got around it by cloning the snapshot but > this behaviour strikes me as counter-intuitive (and the error message > leaves something to be desired). You can also work it around by making the ".zfs" directory visible: zfs set snapdir=visible volume -- Jaakko
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090209155521.GA3418>