summaryrefslogtreecommitdiffstats
path: root/xlators/nfs/server/src/nfs.h
diff options
context:
space:
mode:
authorJeff Darcy <jdarcy@redhat.com>2012-03-29 12:47:49 -0400
committerAnand Avati <avati@redhat.com>2012-06-01 12:15:07 -0700
commite8eb0a9cb6539a7607d4c134daf331400a93d136 (patch)
tree6642d790b6cb130aaa70b30359b361eaffc78cbc /xlators/nfs/server/src/nfs.h
parent27620d0f7d9b101cc47a13a23928f767248a8cff (diff)
Optimize for small dicts, and avoid an overrun.
As dicts get used more and more in the I/O path (especially for xattrs and the new xdata feature), removing some of their inherent inefficiency becomes more important. This patch addresses some of the issues around allocating data_pair_t structures separately. Along the way, I found that the way we're allocating the "members" hash table was subtly wrong, and could lead to a memory overrun. This is a latent bug because nobody uses dict_get_new_full that way, but I added an assert to guard against that possibility. One beneficial side effect is that we now save four pointers' worth of space per dict, offsetting the extra space used for the new members. Change-Id: Ie8c3e49f1e584daec4b0d2d8ce9dafbc76fb57b2 BUG: 827448 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.com/3040 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/nfs/server/src/nfs.h')
0 files changed, 0 insertions, 0 deletions