From owner-freebsd-fs@FreeBSD.ORG Mon Jan 22 16:22:23 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 71D7016A406 for ; Mon, 22 Jan 2007 16:22:23 +0000 (UTC) (envelope-from r.c.ladan@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.188]) by mx1.freebsd.org (Postfix) with ESMTP id 06A4F13C459 for ; Mon, 22 Jan 2007 16:22:22 +0000 (UTC) (envelope-from r.c.ladan@gmail.com) Received: by nf-out-0910.google.com with SMTP id m19so517492nfc for ; Mon, 22 Jan 2007 08:22:22 -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:cc:subject:references:in-reply-to:x-enigmail-version:content-type:content-transfer-encoding; b=A4oxXEQUB4TKrZQ2O+boFeEP2Fnsejfm5BTr4tWentXxJPj3nyxXqDjwEBvzMDNUdroBb3UnWit1kPsOzGzeFTI23KSW+6mjtW45a2usDFcYtH/u20V4yRYkRqsIg/rHkrzWkw95YnCmaJUUwc36GjlH/qQ31aALuuJ0TxaohK8= Received: by 10.48.14.4 with SMTP id 4mr6914876nfn.1169482940472; Mon, 22 Jan 2007 08:22:20 -0800 (PST) Received: from ?192.168.123.202? ( [195.241.221.201]) by mx.google.com with ESMTP id m15sm15681223nfc.2007.01.22.08.22.19; Mon, 22 Jan 2007 08:22:19 -0800 (PST) Message-ID: <45B4E4B3.9050206@gmail.com> Date: Mon, 22 Jan 2007 17:22:11 +0100 From: Rene Ladan User-Agent: Thunderbird 1.5.0.9 (X11/20070119) MIME-Version: 1.0 To: Kostik Belousov References: <45B4C71B.1030408@gmail.com> <20070122145718.GC71333@deviant.kiev.zoral.com.ua> In-Reply-To: <20070122145718.GC71333@deviant.kiev.zoral.com.ua> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: fs@freebsd.org Subject: Re: 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 16:22:23 -0000 Kostik Belousov schreef: > On Mon, Jan 22, 2007 at 03:15:55PM +0100, Rene Ladan wrote: >> 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), >> 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? > > See, for instance, kern/92785. Good reading, it teached me that that code is for the absolute root directory, not for the root directory of the msdos filesystem. That is one reason why it is never used, because (according to the pr) the vfs layer already handles this case. 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