Subject: Re: DIRBLKSIZ
To: <>
From: David Laight <david@l8s.co.uk>
List: current-users
Date: 02/04/2002 19:01:39
Patrick Welche wrote:
>
> Just noticed while making makefs..
>
> $NetBSD: dirent.h,v 1.17 2000/04/16 14:43:56 mrg Exp $
> #define DIRBLKSIZ 1024
> ufs/ufs/
> $NetBSD: dir.h,v 1.11 2001/11/16 16:09:17 lukem Exp $
> #define DIRBLKSIZ DEV_BSIZE
>
> i386/
> $NetBSD: param.h,v 1.47 2001/08/03 01:03:10 groo Exp $
> #define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */
> #define DEV_BSIZE (1 << DEV_BSHIFT)
>
> == 512 ?
A guess! These are different constants that just happen to have the
same name!
The one in dirent.h is the size of buffer used (by the library) for its
sys_getdents() system call - and hence for the VOP_READDIR call.
The others are sizes used by filesystem code....
Does NetBSD manage to read directories from Windoze systems over NFS -
usng the MS supplied server (I've forgotten which Win-xxx it comes with,
probably 2k). Another system I've used died horribly with buffer
overrun errors reading large directories from an NT system.....
David