From owner-freebsd-fs@FreeBSD.ORG Mon Jan 22 14:43:22 2007 Return-Path: X-Original-To: fs@freebsd.org Delivered-To: freebsd-fs@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 66A9516A401 for ; Mon, 22 Jan 2007 14:43:22 +0000 (UTC) (envelope-from r.c.ladan@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.170]) by mx1.freebsd.org (Postfix) with ESMTP id 00C3913C442 for ; Mon, 22 Jan 2007 14:43:21 +0000 (UTC) (envelope-from r.c.ladan@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so993109uge for ; Mon, 22 Jan 2007 06:43:20 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:subject:x-enigmail-version:content-type:content-transfer-encoding; b=K6Z9u0+RnU7XG5PLG2y6PBXJwxWm0gvsKE7qqqftFHZ4DY0imdTMPQun4BlcQ/gdfbL2UyR/Jxac22yiFxGBbv7NuSoNuPZQ2ABtSxNwnxqjaB8aUVqcpkKkbr8EyYyvhgZ6FvRjAodvb0MT86OMVQH8M7cqIPBuImppVV3QNfA= Received: by 10.67.29.12 with SMTP id g12mr7693050ugj.1169475363679; Mon, 22 Jan 2007 06:16:03 -0800 (PST) Received: from ?192.168.123.202? ( [195.241.221.201]) by mx.google.com with ESMTP id e34sm6926576ugd.2007.01.22.06.16.02; Mon, 22 Jan 2007 06:16:03 -0800 (PST) Message-ID: <45B4C71B.1030408@gmail.com> Date: Mon, 22 Jan 2007 15:15:55 +0100 From: Rene Ladan User-Agent: Thunderbird 1.5.0.9 (X11/20070119) MIME-Version: 1.0 To: fs@freebsd.org X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: unused code in msdosfs_lookup.c ? 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: Mon, 22 Jan 2007 14:43:22 -0000 Hi, while working on the XTAF fs module (see the archives), I discovered that the code path in the lookup() routine which deals with cnp->cn_nameptr being "." or ".." is never used. To verify this, I added a printf() to the analogous code in sys/fs/msdosfs/msdosfs_lookup.c (lines 134-145, revision 1.47), but the following commands could not trigger the code: % ls . % ls .. % file . % file ../. % hd . % hd .. % cd .. % cd ../a/b % ls -laoT . % du /mountpoint This code fakes the "." and ".." entries in the root directory of msdos filesystems, which are otherwise absent. So it seems like that code was either never tested or something in the calling code changed (which would be cachedlookup() in VOP layer). Ideas? Regards, Rene -- GPG fingerprint = E738 5471 D185 7013 0EE0 4FC8 3C1D 6F83 12E1 84F6 (subkeys.pgp.net) "It won't fit on the line." -- me, 2001