diff options
author | Anand Avati <avati@redhat.com> | 2013-11-25 03:08:19 -0800 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-11-26 10:31:17 -0800 |
commit | c9579c4501a5d316f71fc44fd46a53060a4eed0c (patch) | |
tree | 67e8be358ba357f9f2e3be1fd49cd3a5a3713ebd /libglusterfs/src/iobuf.h | |
parent | 9da4958b7853f36a137c80493bec932b79d85e84 (diff) |
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 <avati@redhat.com>
Reviewed-on: http://review.gluster.org/6348
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@gmail.com>
Diffstat (limited to 'libglusterfs/src/iobuf.h')
-rw-r--r-- | libglusterfs/src/iobuf.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libglusterfs/src/iobuf.h b/libglusterfs/src/iobuf.h index 5595309e1cd..4e07910d722 100644 --- a/libglusterfs/src/iobuf.h +++ b/libglusterfs/src/iobuf.h @@ -18,7 +18,6 @@ #include <sys/uio.h> #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 (); |