diff options
author | Josh Durgin <josh.durgin@dreamhost.com> | 2012-04-26 17:41:27 -0700 |
---|---|---|
committer | Josh Durgin <josh.durgin@dreamhost.com> | 2012-04-26 17:41:27 -0700 |
commit | 8f4dba62f8c725a5b07ed98b735b47dc8b7d0026 (patch) | |
tree | 79f4a1a39f700a2d64381d051fe3f228bc00537c | |
parent | fe76c5ba7732808d3260f1926b9d6abfdbca83c9 (diff) | |
download | ceph-8f4dba62f8c725a5b07ed98b735b47dc8b7d0026.tar.gz |
librbd: the length argument of aio_discard should be uint64_t
size_t was accidentally copy-pasted.
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
-rw-r--r-- | src/include/rbd/librbd.h | 2 | ||||
-rw-r--r-- | src/include/rbd/librbd.hpp | 2 | ||||
-rw-r--r-- | src/librbd.cc | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/include/rbd/librbd.h b/src/include/rbd/librbd.h index 8dee8518b0e..c2ed7bfb0b2 100644 --- a/src/include/rbd/librbd.h +++ b/src/include/rbd/librbd.h @@ -102,7 +102,7 @@ ssize_t rbd_write(rbd_image_t image, uint64_t ofs, size_t len, const char *buf); int rbd_discard(rbd_image_t image, uint64_t ofs, uint64_t len); int rbd_aio_write(rbd_image_t image, uint64_t off, size_t len, const char *buf, rbd_completion_t c); int rbd_aio_read(rbd_image_t image, uint64_t off, size_t len, char *buf, rbd_completion_t c); -int rbd_aio_discard(rbd_image_t image, uint64_t off, size_t len, rbd_completion_t c); +int rbd_aio_discard(rbd_image_t image, uint64_t off, uint64_t len, rbd_completion_t c); int rbd_aio_create_completion(void *cb_arg, rbd_callback_t complete_cb, rbd_completion_t *c); int rbd_aio_wait_for_complete(rbd_completion_t c); ssize_t rbd_aio_get_return_value(rbd_completion_t c); diff --git a/src/include/rbd/librbd.hpp b/src/include/rbd/librbd.hpp index a6866516cf9..915833a9088 100644 --- a/src/include/rbd/librbd.hpp +++ b/src/include/rbd/librbd.hpp @@ -108,7 +108,7 @@ public: int aio_write(uint64_t off, size_t len, ceph::bufferlist& bl, RBD::AioCompletion *c); int aio_read(uint64_t off, size_t len, ceph::bufferlist& bl, RBD::AioCompletion *c); - int aio_discard(uint64_t off, size_t len, RBD::AioCompletion *c); + int aio_discard(uint64_t off, uint64_t len, RBD::AioCompletion *c); int flush(); diff --git a/src/librbd.cc b/src/librbd.cc index 8dd28b1e979..0a2264bda68 100644 --- a/src/librbd.cc +++ b/src/librbd.cc @@ -1884,7 +1884,7 @@ done: return r; } -int aio_discard(ImageCtx *ictx, uint64_t off, size_t len, AioCompletion *c) +int aio_discard(ImageCtx *ictx, uint64_t off, uint64_t len, AioCompletion *c) { CephContext *cct = ictx->cct; ldout(cct, 20) << "aio_discard " << ictx << " off = " << off << " len = " << len << dendl; @@ -2264,7 +2264,7 @@ int Image::aio_write(uint64_t off, size_t len, bufferlist& bl, RBD::AioCompletio return librbd::aio_write(ictx, off, len, bl.c_str(), (librbd::AioCompletion *)c->pc); } -int Image::aio_discard(uint64_t off, size_t len, RBD::AioCompletion *c) +int Image::aio_discard(uint64_t off, uint64_t len, RBD::AioCompletion *c) { ImageCtx *ictx = (ImageCtx *)ctx; return librbd::aio_discard(ictx, off, len, (librbd::AioCompletion *)c->pc); @@ -2535,7 +2535,7 @@ extern "C" int rbd_aio_write(rbd_image_t image, uint64_t off, size_t len, const return librbd::aio_write(ictx, off, len, buf, (librbd::AioCompletion *)comp->pc); } -extern "C" int rbd_aio_discard(rbd_image_t image, uint64_t off, size_t len, rbd_completion_t c) +extern "C" int rbd_aio_discard(rbd_image_t image, uint64_t off, uint64_t len, rbd_completion_t c) { librbd::ImageCtx *ictx = (librbd::ImageCtx *)image; librbd::RBD::AioCompletion *comp = (librbd::RBD::AioCompletion *)c; |