From owner-freebsd-current Thu Sep 6 21:15:34 2001 Delivered-To: freebsd-current@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 821) id 5534E37B401; Thu, 6 Sep 2001 21:15:32 -0700 (PDT) Date: Thu, 6 Sep 2001 21:15:32 -0700 From: "John W. De Boskey" To: Current List Subject: __getcwd & errno 20 (Not a directory) vfs_cache.c Message-ID: <20010906211532.A52687@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, I'm in the middle of trying to debug a java problem and have found something I don't quite understand. Basically, __getcwd() is returning errno 20, Not a directory. man getcwd doesn't list ENOTDIR so I started looking in the sources and found kern/vfs_cache.c: if (vp->v_dd->v_id != vp->v_ddid) { numcwdfail1++; free(buf, M_TEMP); return (ENOTDIR); } Could someone who is more familiar with the vfs layers provide some pointers as to what is being done here? The code is instrumented, and sysctl has the following to say: % sysctl -a | grep cwd vfs.cache.numcwdcalls: 225014 vfs.cache.numcwdfail1: 845 1 -> ENOTDIR vfs.cache.numcwdfail2: 6775 2 -> ENOENT vfs.cache.numcwdfail3: 0 vfs.cache.numcwdfail4: 0 vfs.cache.numcwdfound: 217394 The really annoying aspect to this is that it doesn't happen everytime, and happens more often when in a nfs mounted directory vs. a local directory. Thanks! John To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message