Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Apr 1997 17:48:12 -0700
From:      Don Lewis <Don.Lewis@tsc.tdk.com>
To:        dg@root.com, Don Lewis <Don.Lewis@tsc.tdk.com>
Cc:        fs@freebsd.org
Subject:   Re: the namei cache...
Message-ID:  <199704250048.RAA12907@salsa.gv.tsc.tdk.com>
In-Reply-To: David Greenman <dg@root.com> "Re: the namei cache..." (Apr 24,  5:44pm)

next in thread | previous in thread | raw e-mail | index | archive | help
On Apr 24,  5:44pm, David Greenman wrote:
} Subject: Re: the namei cache...
} >Also, the component name can be terminated with either a NUL or a /.
} 
}    Really? That's a surprise if true.

This is right from the source:

	cnp->cn_hash = 0;
	for (cp = cnp->cn_nameptr; *cp != 0 && *cp != '/'; cp++)
		cnp->cn_hash += (unsigned char)*cp;
	cnp->cn_namelen = cp - cnp->cn_nameptr;

It sure looks to me like it stops on '/' ;-)

Also, even if you totally ditch the hash, you still need the loop
to find the end of the component.

			---  Truck



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