[EMAIL PROTECTED] wrote:

>
> >On Sat, Jun 09, 2007 at 10:16:34PM +0200, [EMAIL PROTECTED] wrote:
> >> 
> >> >Oh, I see, this is bug 6479267: st_size (struct stat) is unreliable in
> >> >ZFS.  Any word on when the fix will be out?
> >> 
> >> It's a bug in scandir (obviously) and it is filed as such.
> >> 
> >> Does scandir fail on zfs because of this or does scandir needs to
> >> reallocate and does it use the size as first order estimate?
> >
> >The bug is actually wrong - scandir() does work.  It only uses the
> >st_size as an estimate of directory size, but then scales the array as
> >necessary.  Apart from an odd malloc(0) and the poor linear scaling
> >algorithm, the function work fine with ZFS.
>
> Ah, so it's not really a bug.  Is this common for all scandir()s?

The original BSD scandir() allocates st_size/24 and never realloc()s.

This is how it has been on SunOS-4.x and this is why it did fail with
e.g. a Novell Netware NFS server.

If there are still implementations around that have not been fixed, the problem
is still around.

Jörg

-- 
 EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin
       [EMAIL PROTECTED]                (uni)  
       [EMAIL PROTECTED]     (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to