From 884a668a9c3e12e17d64ebd5ccd9fbf3d203fd1e Mon Sep 17 00:00:00 2001 From: Bharata B Rao Date: Fri, 15 Nov 2013 10:11:58 +0530 Subject: zerofill: Change the type of len argument of glfs_zerofill() to off_t glfs_zerofill() can be potentially called to zero-out entire file and hence allow for bigger value of length parameter. Change-Id: I75f1d11af298915049a3f3a7cb3890a2d72fca63 BUG: 1028673 Signed-off-by: Bharata B Rao Reviewed-on: http://review.gluster.org/6266 Tested-by: Gluster Build System Reviewed-by: M. Mohan Kumar Tested-by: M. Mohan Kumar Reviewed-by: Anand Avati --- xlators/storage/posix/src/posix.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'xlators/storage/posix/src/posix.c') diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index fb45c7a67..768ab4929 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -634,15 +634,15 @@ out: } static int32_t -_posix_do_zerofill(int fd, off_t offset, size_t len, int o_direct) +_posix_do_zerofill(int fd, off_t offset, off_t len, int o_direct) { - size_t num_vect = 0; - int32_t num_loop = 1; - int32_t idx = 0; + off_t num_vect = 0; + off_t num_loop = 1; + off_t idx = 0; int32_t op_ret = -1; int32_t vect_size = VECTOR_SIZE; - size_t remain = 0; - size_t extra = 0; + off_t remain = 0; + off_t extra = 0; struct iovec *vector = NULL; char *iov_base = NULL; char *alloc_buf = NULL; @@ -714,7 +714,7 @@ err: static int32_t posix_do_zerofill(call_frame_t *frame, xlator_t *this, fd_t *fd, - off_t offset, size_t len, struct iatt *statpre, + off_t offset, off_t len, struct iatt *statpre, struct iatt *statpost) { struct posix_fd *pfd = NULL; @@ -827,7 +827,7 @@ err: static int32_t posix_zerofill(call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset, - size_t len, dict_t *xdata) + off_t len, dict_t *xdata) { int32_t ret = 0; struct iatt statpre = {0,}; -- cgit