summaryrefslogtreecommitdiffstats
path: root/xlators/storage/bdb/src/bdb.c
diff options
context:
space:
mode:
authorBasavanagowda Kanur <gowda@gluster.com>2009-04-23 04:05:00 +0530
committerAnand V. Avati <avati@amp.gluster.com>2009-04-23 10:43:27 +0530
commitb0acbf09c21ff898ad3315811974e49cc80e6f2b (patch)
treea21fd136b11506bc1b53da6b7a7d41264cc2867f /xlators/storage/bdb/src/bdb.c
parente5686c440f3c03fbb24759342e5badf102579634 (diff)
fix bdb_db_get() to return exactly read bytes and to copy the read data to given buffer only when needed.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'xlators/storage/bdb/src/bdb.c')
-rw-r--r--xlators/storage/bdb/src/bdb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/storage/bdb/src/bdb.c b/xlators/storage/bdb/src/bdb.c
index 81ced573e..086d7d9e7 100644
--- a/xlators/storage/bdb/src/bdb.c
+++ b/xlators/storage/bdb/src/bdb.c
@@ -519,7 +519,7 @@ bdb_readv (call_frame_t *frame,
vec.iov_len = read_size;
stbuf.st_ino = fd->inode->ino;
- stbuf.st_size = op_ret ;
+ stbuf.st_size = bdb_db_fread (bfd, NULL, 0, 0);
stbuf.st_blocks = BDB_COUNT_BLOCKS (stbuf.st_size, stbuf.st_blksize);
op_ret = size;
out: