]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_ceph: drop support for pre-hammer libcephfs versions
authorDavid Disseldorp <ddiss@samba.org>
Thu, 9 Jan 2020 15:01:22 +0000 (16:01 +0100)
committerDavid Disseldorp <ddiss@samba.org>
Sat, 11 Jan 2020 14:59:36 +0000 (14:59 +0000)
The last Ceph Hammer release (0.94.10) came in Feb 2017, as is no longer
supported upstream. Drop support for building Samba vfs_ceph against
version prior to 0.94.0.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Samuel Cabrero <scabrero@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Sat Jan 11 14:59:36 UTC 2020 on sn-devel-184

source3/modules/vfs_ceph.c

index 49e812516e3c4c6645f52277b3c136e717aa1a36..e73e3ab4f2ed945b17a4046388e0266e261634c5 100644 (file)
@@ -1167,11 +1167,7 @@ static ssize_t cephwrap_fgetxattr(struct vfs_handle_struct *handle, struct files
 {
        int ret;
        DBG_DEBUG("[CEPH] fgetxattr(%p, %p, %s, %p, %llu)\n", handle, fsp, name, value, llu(size));
-#if LIBCEPHFS_VERSION_CODE >= LIBCEPHFS_VERSION(0, 94, 0)
        ret = ceph_fgetxattr(handle->data, fsp->fh->fd, name, value, size);
-#else
-       ret = ceph_getxattr(handle->data, fsp->fsp_name->base_name, name, value, size);
-#endif
        DBG_DEBUG("[CEPH] fgetxattr(...) = %d\n", ret);
        if (ret < 0) {
                WRAP_RETURN(ret);
@@ -1200,11 +1196,7 @@ static ssize_t cephwrap_flistxattr(struct vfs_handle_struct *handle, struct file
        int ret;
        DBG_DEBUG("[CEPH] flistxattr(%p, %p, %p, %llu)\n",
                  handle, fsp, list, llu(size));
-#if LIBCEPHFS_VERSION_CODE >= LIBCEPHFS_VERSION(0, 94, 0)
        ret = ceph_flistxattr(handle->data, fsp->fh->fd, list, size);
-#else
-       ret = ceph_listxattr(handle->data, fsp->fsp_name->base_name, list, size);
-#endif
        DBG_DEBUG("[CEPH] flistxattr(...) = %d\n", ret);
        if (ret < 0) {
                WRAP_RETURN(ret);
@@ -1228,11 +1220,7 @@ static int cephwrap_fremovexattr(struct vfs_handle_struct *handle, struct files_
 {
        int ret;
        DBG_DEBUG("[CEPH] fremovexattr(%p, %p, %s)\n", handle, fsp, name);
-#if LIBCEPHFS_VERSION_CODE >= LIBCEPHFS_VERSION(0, 94, 0)
        ret = ceph_fremovexattr(handle->data, fsp->fh->fd, name);
-#else
-       ret = ceph_removexattr(handle->data, fsp->fsp_name->base_name, name);
-#endif
        DBG_DEBUG("[CEPH] fremovexattr(...) = %d\n", ret);
        WRAP_RETURN(ret);
 }
@@ -1257,12 +1245,8 @@ static int cephwrap_fsetxattr(struct vfs_handle_struct *handle, struct files_str
 {
        int ret;
        DBG_DEBUG("[CEPH] fsetxattr(%p, %p, %s, %p, %llu, %d)\n", handle, fsp, name, value, llu(size), flags);
-#if LIBCEPHFS_VERSION_CODE >= LIBCEPHFS_VERSION(0, 94, 0)
        ret = ceph_fsetxattr(handle->data, fsp->fh->fd,
                             name, value, size, flags);
-#else
-       ret = ceph_setxattr(handle->data, fsp->fsp_name->base_name, name, value, size, flags);
-#endif
        DBG_DEBUG("[CEPH] fsetxattr(...) = %d\n", ret);
        WRAP_RETURN(ret);
 }