]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: the length argument of aio_discard should be uint64_t
authorJosh Durgin <josh.durgin@dreamhost.com>
Fri, 27 Apr 2012 00:41:27 +0000 (17:41 -0700)
committerJosh Durgin <josh.durgin@dreamhost.com>
Fri, 27 Apr 2012 00:41:27 +0000 (17:41 -0700)
size_t was accidentally copy-pasted.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
src/include/rbd/librbd.h
src/include/rbd/librbd.hpp
src/librbd.cc

index 8dee8518b0e1cfd0fff4e4e7278da2eedeae5561..c2ed7bfb0b2d3260ea9a7e44b40f9d96bca45a9b 100644 (file)
@@ -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);
index a6866516cf9fb497152576bcb0b98a88cedf6ad5..915833a90883c00b35a01600bf13a1ee96ffd54d 100644 (file)
@@ -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();
 
index 8dd28b1e9791fb6b3f6a0208205d9dbc5eafe989..0a2264bda683eb1a1e0656ed7f2375d3c90048c4 100644 (file)
@@ -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;