]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
client: wire up ceph_ll_fallocate
authorJeff Layton <jlayton@kernel.org>
Thu, 12 Jul 2018 16:02:14 +0000 (12:02 -0400)
committerJeff Layton <jlayton@kernel.org>
Thu, 12 Jul 2018 18:47:03 +0000 (14:47 -0400)
We have ceph_fallocate, but we need the analogous call for the lowlevel
interface as well. Add ceph_ll_fallocate.

Tracker: http://tracker.ceph.com/issues/24893
Signed-off-by: Jeff Layton <jlayton@kernel.org>
src/client/Client.cc
src/client/Client.h
src/include/cephfs/libcephfs.h
src/libcephfs.cc

index 1dc85f056d7a6600443b4ea62535784f0f647bd5..b330f096e7396a091dfcedb9a4bac625271bca60 100644 (file)
@@ -13169,7 +13169,7 @@ int Client::_fallocate(Fh *fh, int mode, int64_t offset, int64_t length)
 #endif
 
 
-int Client::ll_fallocate(Fh *fh, int mode, loff_t offset, loff_t length)
+int Client::ll_fallocate(Fh *fh, int mode, int64_t offset, int64_t length)
 {
   Mutex::Locker lock(client_lock);
   ldout(cct, 3) << __func__ << " " << fh << " " << fh->inode->ino << " " << dendl;
index c876f09b1315c597f974a51dfdcd26ac4d87ec03..24f2bcbb3afca76e240c5062739dfe11f66876e9 100644 (file)
@@ -1229,7 +1229,7 @@ public:
   int ll_flush(Fh *fh);
   int ll_fsync(Fh *fh, bool syncdataonly);
   int ll_sync_inode(Inode *in, bool syncdataonly);
-  int ll_fallocate(Fh *fh, int mode, loff_t offset, loff_t length);
+  int ll_fallocate(Fh *fh, int mode, int64_t offset, int64_t length);
   int ll_release(Fh *fh);
   int ll_getlk(Fh *fh, struct flock *fl, uint64_t owner);
   int ll_setlk(Fh *fh, struct flock *fl, uint64_t owner, int sleep);
index 8f524ec8f3121559b16bfcd9c121b09b4f859b2b..40eaff28367e034a473c6fb27888ce2e319036ed 100644 (file)
@@ -1508,6 +1508,8 @@ int ceph_ll_fsync(struct ceph_mount_info *cmount, struct Fh *fh,
                  int syncdataonly);
 int ceph_ll_sync_inode(struct ceph_mount_info *cmount, struct Inode *in,
                  int syncdataonly);
+int ceph_ll_fallocate(struct ceph_mount_info *cmount, struct Fh *fh,
+                     int mode, int64_t offset, int64_t length);
 int ceph_ll_write(struct ceph_mount_info *cmount, struct Fh* filehandle,
                  int64_t off, uint64_t len, const char *data);
 int64_t ceph_ll_readv(struct ceph_mount_info *cmount, struct Fh *fh,
index e456abd1ab20fa12dc3d0fecbee6079ba1a7d9e8..a5e3858bcd496f155e47cd8f5c1c7f72c8ce2d01 100644 (file)
@@ -1546,6 +1546,12 @@ extern "C" int ceph_ll_sync_inode(class ceph_mount_info *cmount,
   return (cmount->get_client()->ll_sync_inode(in, syncdataonly));
 }
 
+extern "C" int ceph_ll_fallocate(class ceph_mount_info *cmount, Fh *fh,
+                                int mode, int64_t offset, int64_t length)
+{
+  return cmount->get_client()->ll_fallocate(fh, mode, offset, length);
+}
+
 extern "C" off_t ceph_ll_lseek(class ceph_mount_info *cmount,
                                Fh *fh, off_t offset, int whence)
 {