Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Jan 2007 17:22:11 +0100
From:      Rene Ladan <r.c.ladan@gmail.com>
To:        Kostik Belousov <kostikbel@gmail.com>
Cc:        fs@freebsd.org
Subject:   Re: unused code in msdosfs_lookup.c ?
Message-ID:  <45B4E4B3.9050206@gmail.com>
In-Reply-To: <20070122145718.GC71333@deviant.kiev.zoral.com.ua>
References:  <45B4C71B.1030408@gmail.com> <20070122145718.GC71333@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
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




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