gluster-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gluster-devel] [PATCH 3/3 v3] vfs_glusterfs: Samba VFS module for g


From: Anand Avati
Subject: Re: [Gluster-devel] [PATCH 3/3 v3] vfs_glusterfs: Samba VFS module for glusterfs
Date: Mon, 20 May 2013 16:10:32 -0700
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130509 Thunderbird/17.0.6

On 5/20/13 3:38 PM, Andrew Bartlett wrote:
On Mon, 2013-05-20 at 03:11 -0400, Anand Avati wrote:
Implement a Samba VFS plugin for glusterfs based on gluster's gfapi.
This is a "bottom" vfs plugin (not something to be stacked on top of
another module), and translates (most) calls into closest actions
on gfapi.

Thanks for getting back to us.

The comment I have is however still around the realloc stuff.  Is
talloc_realloc() so slow that there is such value in having the code
realloc 1024 or 16 more entries than are required?

It would seem clearer if we just allocated exactly the array size
needed.   That would also allow bounds checkers like valgrind to
correctly know the 'real' allocated size.

It just smells to me like premature optimisation, and means you have to
do the partial array memset() which always makes me nervous.

That said, this isn't an objection, just an observation.


It wasn't really about talloc_XXX() being slow. It is just a standard technique generally used in many places. I can change the code to increase allocation count by one if anybody else too shares your opinion.

Avati




reply via email to

[Prev in Thread] Current Thread [Next in Thread]