From c9579c4501a5d316f71fc44fd46a53060a4eed0c Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Mon, 25 Nov 2013 03:08:19 -0800 Subject: iobufs: make iobref container size dynamic With gfapi we can receive read/write size beyond the natural limits of FUSE and NFS server. iobref was hardcoded to hold iobuf refs up to 16 in count, which imposes a natural limit of 2MB with 128KB page sizes of read-ahead and io-cache. Fix this by making iobref's iobuf ref container size dynamic. Change-Id: I93d88104d6c5e7af96cc9f1bfcc870d80fa81dad BUG: 1034398 Signed-off-by: Anand Avati Reviewed-on: http://review.gluster.org/6348 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi --- libglusterfs/src/iobuf.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libglusterfs/src/iobuf.h') diff --git a/libglusterfs/src/iobuf.h b/libglusterfs/src/iobuf.h index 5595309e1..4e07910d7 100644 --- a/libglusterfs/src/iobuf.h +++ b/libglusterfs/src/iobuf.h @@ -18,7 +18,6 @@ #include #define GF_VARIABLE_IOBUF_COUNT 32 -#define GF_IOBREF_IOBUF_COUNT 16 /* Lets try to define the new anonymous mapping * flag, in case the system is still using the @@ -142,7 +141,9 @@ void iobuf_to_iovec(struct iobuf *iob, struct iovec *iov); struct iobref { gf_lock_t lock; int ref; - struct iobuf *iobrefs[GF_IOBREF_IOBUF_COUNT]; + struct iobuf **iobrefs; + int alloced; + int used; }; struct iobref *iobref_new (); -- cgit