*/
int ceph_lazyio(struct ceph_mount_info *cmount, int fd, int enable);
+
+/**
+ * Flushes the write buffer for the file thereby propogating the buffered write to the file.
+ *
+ * @param cmount the ceph mount handle to use for performing the fsync.
+ * @param fd the file descriptor of the file to sync.
+ * @param offset a boolean to enable lazyio or disable lazyio.
+ * @returns 0 on success or a negative error code on failure.
+ */
+int ceph_lazyio_propogate(struct ceph_mount_info *cmount, int fd, int64_t offset, size_t count);
+
+
+/**
+ * Flushes the write buffer for the file and invalidate the read cache. This allows a subsequent read operation to read and cache data directly from the file and hence everyone's propogated writes would be visible.
+ *
+ * @param cmount the ceph mount handle to use for performing the fsync.
+ * @param fd the file descriptor of the file to sync.
+ * @param offset a boolean to enable lazyio or disable lazyio.
+ * @returns 0 on success or a negative error code on failure.
+ */
+int ceph_lazyio_synchronize(struct ceph_mount_info *cmount, int fd, int64_t offset, size_t count);
+
/** @} file */
/**
return (cmount->get_client()->lazyio(fd, enable));
}
+extern "C" int ceph_lazyio_propogate(class ceph_mount_info *cmount,
+ int fd, int64_t offset, size_t count)
+{
+ if (!cmount->is_mounted())
+ return -ENOTCONN;
+ return (cmount->get_client()->lazyio_propogate(fd, offset, count));
+}
+
+extern "C" int ceph_lazyio_synchronize(class ceph_mount_info *cmount,
+ int fd, int64_t offset, size_t count)
+{
+ if (!cmount->is_mounted())
+ return -ENOTCONN;
+ return (cmount->get_client()->lazyio_synchronize(fd, offset, count));
+}
+
+
extern "C" int ceph_sync_fs(struct ceph_mount_info *cmount)
{
if (!cmount->is_mounted())