Subject: Re: CVS commit: src/sys/fs/efs
To: David Laight <david@l8s.co.uk>
From: Stephen M. Rumble <stephen.rumble@utoronto.ca>
List: source-changes
Date: 09/15/2007 18:32:42
Quoting David Laight <david@l8s.co.uk>:
> On Sat, Sep 08, 2007 at 06:18:00PM +0000, Stephen M. Rumble wrote:
>>
>> Module Name: src
>> Committed By: rumble
>> Date: Sat Sep 8 18:18:00 UTC 2007
>>
>> Modified Files:
>> src/sys/fs/efs: efs_vnops.c
>>
>> Log Message:
>> In efs_readdir don't foolishly allocate and free dirents for each entry
>> before copying them out, rather just use a single one. Further, follow
>> the example of tmpfs and others by simply allocating on the stack.
>
> How big is the 'dirent' structure ?
> Allocating a non-trivial structures on the kernel stack will lead to
> stack overflow problems.
Ca. 512 bytes. Antti and I discussed similar reservations, but since a
number of filesystems do the same thing (ext2fs and about half of
sys/fs), I decided to follow their example, whether it be good or not.
Fixing the behaviour of all other filesystems later, should it be
deemed a worthy pursuit, would be a straightforward exercise anyway.
Has anyone a strong opinion? I could drum up patches and I volunteer
pooka to proof them.
Steve