]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: rename ceph_statx.h to ceph_ll_client.h
authorJeff Layton <jlayton@redhat.com>
Thu, 16 Apr 2020 16:01:05 +0000 (12:01 -0400)
committerNathan Cutler <ncutler@suse.com>
Thu, 4 Jun 2020 13:02:46 +0000 (15:02 +0200)
...so we can use it to include other definitions and types that need to
be shared with in-tree code that doesn't want to include libcephfs.h.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit 4436f27a0476e96d10ed3367d738e1679d8b0a38)

Conflicts:
src/client/Client.h
- nautilus version does not have the line
      #include "include/common_fwd.h"
  which is not relevant to this backport

alpine/APKBUILD.in
ceph.spec.in
debian/libcephfs-dev.install
src/client/Client.cc
src/client/Client.h
src/client/SyntheticClient.cc
src/client/fuse_ll.cc
src/include/cephfs/ceph_ll_client.h [new file with mode: 0644]
src/include/cephfs/ceph_statx.h [deleted file]
src/include/cephfs/libcephfs.h
src/pybind/cephfs/cephfs.pyx

index 96037883f557d13319649a25d98989825643cad4..1fcd986c402b4b622b46206f1818b624f7c5e03d 100644 (file)
@@ -397,7 +397,7 @@ libcephfs_dev() {
        pkgdesc="Ceph distributed file system client library headers"
        depends="libcephfs librados-devel"
 
-       _pkg $_includedir/cephfs ceph_statx.h libcephfs.h
+       _pkg $_includedir/cephfs ceph_ll_client.h libcephfs.h
        _pkg $_libdir libcephfs.so
 }
 
index ce4572c0152f41c6bd2ed401e36e23b75e83bec2..c3904d9b9d3422f84c70f2f98d4e6c7ee42513b9 100644 (file)
@@ -2092,7 +2092,7 @@ fi
 %files -n libcephfs-devel
 %dir %{_includedir}/cephfs
 %{_includedir}/cephfs/libcephfs.h
-%{_includedir}/cephfs/ceph_statx.h
+%{_includedir}/cephfs/ceph_ll_client.h
 %{_libdir}/libcephfs.so
 
 %if 0%{with python2}
index e2cf6e9f375dfa92c8d8671f426276aebab0eb91..fbc1e4b95ffe6755087e89e4e9718619f676e6e9 100644 (file)
@@ -1,3 +1,3 @@
-usr/include/cephfs/ceph_statx.h
+usr/include/cephfs/ceph_ll_client.h
 usr/include/cephfs/libcephfs.h
 usr/lib/libcephfs.so
index eeb55a71ed4807ebc2d62e348073a35eacdee271..56f1f4966355530bc70d63f97e252a54ea65207b 100644 (file)
@@ -97,7 +97,7 @@
 #include "include/ceph_assert.h"
 #include "include/stat.h"
 
-#include "include/cephfs/ceph_statx.h"
+#include "include/cephfs/ceph_ll_client.h"
 
 #if HAVE_GETGROUPLIST
 #include <grp.h>
index aec66d31bb784c283873b9e6f7dd9cf4bbcddd06..a5d21132b73acf55f38770b8c39b012a18991ead 100644 (file)
@@ -22,7 +22,7 @@
 #include "common/Timer.h"
 #include "common/cmdparse.h"
 #include "common/compiler_extensions.h"
-#include "include/cephfs/ceph_statx.h"
+#include "include/cephfs/ceph_ll_client.h"
 #include "include/filepath.h"
 #include "include/interval_set.h"
 #include "include/lru.h"
index f511168386f749b764488baf755c9eee749f7863..3e8b740deb9be4937f8f4e9934b3c86dd21f7693 100644 (file)
@@ -36,7 +36,7 @@
 
 #include "common/errno.h"
 #include "include/ceph_assert.h"
-#include "include/cephfs/ceph_statx.h"
+#include "include/cephfs/ceph_ll_client.h"
 
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_client
index 04ea168ca20fb9671dfcdd5ba80ca3a4aa814349..20158e626680d26a99ac397712718bc006ebdc90 100644 (file)
@@ -33,7 +33,7 @@
 #include "ioctl.h"
 #include "common/config.h"
 #include "include/ceph_assert.h"
-#include "include/cephfs/ceph_statx.h"
+#include "include/cephfs/ceph_ll_client.h"
 
 #include "fuse_ll.h"
 #include <fuse.h>
diff --git a/src/include/cephfs/ceph_ll_client.h b/src/include/cephfs/ceph_ll_client.h
new file mode 100644 (file)
index 0000000..f2645c0
--- /dev/null
@@ -0,0 +1,82 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+/*
+ * scalable distributed file system
+ *
+ * Copyright (C) Jeff Layton <jlayton@redhat.com>
+ *
+ * This is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software
+ * Foundation.  See file COPYING.
+ */
+
+#ifndef CEPH_CEPH_LL_CLIENT_H
+#define CEPH_CEPH_LL_CLIENT_H
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Heavily borrowed from David Howells' draft statx patchset.
+ *
+ * Since the xstat patches are still a work in progress, we borrow its data
+ * structures and #defines to implement ceph_getattrx. Once the xstat stuff
+ * has been merged we should drop this and switch over to using that instead.
+ */
+struct ceph_statx {
+       uint32_t        stx_mask;
+       uint32_t        stx_blksize;
+       uint32_t        stx_nlink;
+       uint32_t        stx_uid;
+       uint32_t        stx_gid;
+       uint16_t        stx_mode;
+       uint64_t        stx_ino;
+       uint64_t        stx_size;
+       uint64_t        stx_blocks;
+       dev_t           stx_dev;
+       dev_t           stx_rdev;
+       struct timespec stx_atime;
+       struct timespec stx_ctime;
+       struct timespec stx_mtime;
+       struct timespec stx_btime;
+       uint64_t        stx_version;
+};
+
+#define CEPH_STATX_MODE                0x00000001U     /* Want/got stx_mode */
+#define CEPH_STATX_NLINK       0x00000002U     /* Want/got stx_nlink */
+#define CEPH_STATX_UID         0x00000004U     /* Want/got stx_uid */
+#define CEPH_STATX_GID         0x00000008U     /* Want/got stx_gid */
+#define CEPH_STATX_RDEV                0x00000010U     /* Want/got stx_rdev */
+#define CEPH_STATX_ATIME       0x00000020U     /* Want/got stx_atime */
+#define CEPH_STATX_MTIME       0x00000040U     /* Want/got stx_mtime */
+#define CEPH_STATX_CTIME       0x00000080U     /* Want/got stx_ctime */
+#define CEPH_STATX_INO         0x00000100U     /* Want/got stx_ino */
+#define CEPH_STATX_SIZE                0x00000200U     /* Want/got stx_size */
+#define CEPH_STATX_BLOCKS      0x00000400U     /* Want/got stx_blocks */
+#define CEPH_STATX_BASIC_STATS 0x000007ffU     /* The stuff in the normal stat struct */
+#define CEPH_STATX_BTIME       0x00000800U     /* Want/got stx_btime */
+#define CEPH_STATX_VERSION     0x00001000U     /* Want/got stx_version */
+#define CEPH_STATX_ALL_STATS   0x00001fffU     /* All supported stats */
+
+/*
+ * Compatibility macros until these defines make their way into glibc
+ */
+#ifndef AT_NO_ATTR_SYNC
+#define AT_NO_ATTR_SYNC                0x4000 /* Don't sync attributes with the server */
+#endif
+
+/*
+ * The statx interfaces only allow these flags. In order to allow us to add
+ * others in the future, we disallow setting any that aren't recognized.
+ */
+#define CEPH_REQ_FLAG_MASK             (AT_SYMLINK_NOFOLLOW|AT_NO_ATTR_SYNC)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* CEPH_STATX_H */
+
diff --git a/src/include/cephfs/ceph_statx.h b/src/include/cephfs/ceph_statx.h
deleted file mode 100644 (file)
index f27fa29..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * scalable distributed file system
- *
- * Copyright (C) Jeff Layton <jlayton@redhat.com>
- *
- * Heavily borrowed from David Howells' draft statx patchset.
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#ifndef CEPH_CEPH_STATX_H
-#define CEPH_CEPH_STATX_H
-#include <stdint.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Since the xstat patches are still a work in progress, we borrow its data
- * structures and #defines to implement ceph_getattrx. Once the xstat stuff
- * has been merged we should drop this and switch over to using that instead.
- */
-struct ceph_statx {
-       uint32_t        stx_mask;
-       uint32_t        stx_blksize;
-       uint32_t        stx_nlink;
-       uint32_t        stx_uid;
-       uint32_t        stx_gid;
-       uint16_t        stx_mode;
-       uint64_t        stx_ino;
-       uint64_t        stx_size;
-       uint64_t        stx_blocks;
-       dev_t           stx_dev;
-       dev_t           stx_rdev;
-       struct timespec stx_atime;
-       struct timespec stx_ctime;
-       struct timespec stx_mtime;
-       struct timespec stx_btime;
-       uint64_t        stx_version;
-};
-
-#define CEPH_STATX_MODE                0x00000001U     /* Want/got stx_mode */
-#define CEPH_STATX_NLINK       0x00000002U     /* Want/got stx_nlink */
-#define CEPH_STATX_UID         0x00000004U     /* Want/got stx_uid */
-#define CEPH_STATX_GID         0x00000008U     /* Want/got stx_gid */
-#define CEPH_STATX_RDEV                0x00000010U     /* Want/got stx_rdev */
-#define CEPH_STATX_ATIME       0x00000020U     /* Want/got stx_atime */
-#define CEPH_STATX_MTIME       0x00000040U     /* Want/got stx_mtime */
-#define CEPH_STATX_CTIME       0x00000080U     /* Want/got stx_ctime */
-#define CEPH_STATX_INO         0x00000100U     /* Want/got stx_ino */
-#define CEPH_STATX_SIZE                0x00000200U     /* Want/got stx_size */
-#define CEPH_STATX_BLOCKS      0x00000400U     /* Want/got stx_blocks */
-#define CEPH_STATX_BASIC_STATS 0x000007ffU     /* The stuff in the normal stat struct */
-#define CEPH_STATX_BTIME       0x00000800U     /* Want/got stx_btime */
-#define CEPH_STATX_VERSION     0x00001000U     /* Want/got stx_version */
-#define CEPH_STATX_ALL_STATS   0x00001fffU     /* All supported stats */
-
-/*
- * Compatibility macros until these defines make their way into glibc
- */
-#ifndef AT_NO_ATTR_SYNC
-#define AT_NO_ATTR_SYNC                0x4000 /* Don't sync attributes with the server */
-#endif
-
-/*
- * The statx interfaces only allow these flags. In order to allow us to add
- * others in the future, we disallow setting any that aren't recognized.
- */
-#define CEPH_REQ_FLAG_MASK             (AT_SYMLINK_NOFOLLOW|AT_NO_ATTR_SYNC)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* CEPH_STATX_H */
-
index 974b59907319ad163fcc7a557d43ccdbf189a7b9..7ed86893f4daaa7cd3161f8631d0a2c62ef64cda 100755 (executable)
@@ -27,7 +27,7 @@
 #include <stdbool.h>
 #include <fcntl.h>
 
-#include "ceph_statx.h"
+#include "ceph_ll_client.h"
 
 #ifdef __cplusplus
 extern "C" {
index 7051e14e41903171f08c62fe6774aa5ddbde0ad9..b6dee25509161238b8a28a5c5bf2a5935abb2a6d 100644 (file)
@@ -106,7 +106,7 @@ cdef extern from "sys/time.h":
         long tv_sec
         long tv_usec
 
-cdef extern from "cephfs/ceph_statx.h":
+cdef extern from "cephfs/ceph_ll_client.h":
     cdef struct statx "ceph_statx":
         uint32_t    stx_mask
         uint32_t    stx_blksize