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 --- libglusterfs/src/call-stub.c | 2 +- libglusterfs/src/call-stub.h | 2 +- libglusterfs/src/defaults.c | 4 ++-- libglusterfs/src/defaults.h | 4 ++-- libglusterfs/src/syncop.c | 2 +- libglusterfs/src/syncop.h | 2 +- libglusterfs/src/xlator.h | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) (limited to 'libglusterfs') diff --git a/libglusterfs/src/call-stub.c b/libglusterfs/src/call-stub.c index ac79cf071..7e94ee3c0 100644 --- a/libglusterfs/src/call-stub.c +++ b/libglusterfs/src/call-stub.c @@ -2271,7 +2271,7 @@ out: call_stub_t * fop_zerofill_stub(call_frame_t *frame, fop_zerofill_t fn, fd_t *fd, - off_t offset, size_t len, dict_t *xdata) + off_t offset, off_t len, dict_t *xdata) { call_stub_t *stub = NULL; diff --git a/libglusterfs/src/call-stub.h b/libglusterfs/src/call-stub.h index 45bef8044..0f6c108ee 100644 --- a/libglusterfs/src/call-stub.h +++ b/libglusterfs/src/call-stub.h @@ -752,7 +752,7 @@ fop_zerofill_stub(call_frame_t *frame, fop_zerofill_t fn, fd_t *fd, off_t offset, - size_t len, dict_t *xdata); + off_t len, dict_t *xdata); call_stub_t * fop_zerofill_cbk_stub(call_frame_t *frame, diff --git a/libglusterfs/src/defaults.c b/libglusterfs/src/defaults.c index 2ebb25150..e6b1287f9 100644 --- a/libglusterfs/src/defaults.c +++ b/libglusterfs/src/defaults.c @@ -913,7 +913,7 @@ default_discard_resume(call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t default_zerofill_resume(call_frame_t *frame, xlator_t *this, fd_t *fd, - off_t offset, size_t len, dict_t *xdata) + off_t offset, off_t len, dict_t *xdata) { STACK_WIND(frame, default_zerofill_cbk, FIRST_CHILD(this), FIRST_CHILD(this)->fops->zerofill, fd, offset, len, @@ -1348,7 +1348,7 @@ default_discard(call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t default_zerofill(call_frame_t *frame, xlator_t *this, fd_t *fd, - off_t offset, size_t len, dict_t *xdata) + off_t offset, off_t len, dict_t *xdata) { STACK_WIND_TAIL(frame, FIRST_CHILD(this), FIRST_CHILD(this)->fops->zerofill, fd, offset, len, diff --git a/libglusterfs/src/defaults.h b/libglusterfs/src/defaults.h index 0747027bc..0fb5572ac 100644 --- a/libglusterfs/src/defaults.h +++ b/libglusterfs/src/defaults.h @@ -259,7 +259,7 @@ int32_t default_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); /* Resume */ @@ -488,7 +488,7 @@ int32_t default_zerofill_resume(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); /* _cbk */ diff --git a/libglusterfs/src/syncop.c b/libglusterfs/src/syncop.c index c1620bb70..25baa021a 100644 --- a/libglusterfs/src/syncop.c +++ b/libglusterfs/src/syncop.c @@ -2191,7 +2191,7 @@ syncop_zerofill_cbk (call_frame_t *frame, void *cookie, xlator_t *this, } int -syncop_zerofill(xlator_t *subvol, fd_t *fd, off_t offset, size_t len) +syncop_zerofill(xlator_t *subvol, fd_t *fd, off_t offset, off_t len) { struct syncargs args = {0, }; diff --git a/libglusterfs/src/syncop.h b/libglusterfs/src/syncop.h index f790981f0..18519ff47 100644 --- a/libglusterfs/src/syncop.h +++ b/libglusterfs/src/syncop.h @@ -403,7 +403,7 @@ int syncop_fallocate(xlator_t *subvol, fd_t *fd, int32_t keep_size, off_t offset size_t len); int syncop_discard(xlator_t *subvol, fd_t *fd, off_t offset, size_t len); -int syncop_zerofill(xlator_t *subvol, fd_t *fd, off_t offset, size_t len); +int syncop_zerofill(xlator_t *subvol, fd_t *fd, off_t offset, off_t len); int syncop_rename (xlator_t *subvol, loc_t *oldloc, loc_t *newloc); diff --git a/libglusterfs/src/xlator.h b/libglusterfs/src/xlator.h index b57e5873e..2f3bc9d6f 100644 --- a/libglusterfs/src/xlator.h +++ b/libglusterfs/src/xlator.h @@ -677,7 +677,7 @@ typedef int32_t (*fop_zerofill_t) (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset, - size_t len, + off_t len, dict_t *xdata); struct xlator_fops { -- cgit