]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: move the device bitshift handling macros to Client.h
authorJeff Layton <jlayton@redhat.com>
Mon, 29 Aug 2016 11:16:38 +0000 (07:16 -0400)
committerJeff Layton <jlayton@redhat.com>
Mon, 29 Aug 2016 11:16:38 +0000 (07:16 -0400)
We'll need them in Client.cc now in addition to FUSE specific code.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
src/client/Client.h
src/client/fuse_ll.cc

index 1a7cefd2257e531975dc55791eb54b18663224e9..5b0b7ee0a4c3a7cb9fbe805155b00d9c82dfcf82 100644 (file)
@@ -93,6 +93,14 @@ struct CommandOp
   std::string  *outs;
 };
 
+/* Device bit shift handling */
+#define MINORBITS      20
+#define MINORMASK      ((1U << MINORBITS) - 1)
+
+#define MAJOR(dev)     ((unsigned int) ((dev) >> MINORBITS))
+#define MINOR(dev)     ((unsigned int) ((dev) & MINORMASK))
+#define MKDEV(ma,mi)   (((ma) << MINORBITS) | (mi))
+
 /* error code for ceph_fuse */
 #define CEPH_FUSE_NO_MDS_UP    -(1<<2) /* no mds up deteced in ceph_fuse */
 
index de14029943d1be19ef636098396533e8d720dea9..b30e2e0ba44bfc204e06394e7fd404cffeca7908 100644 (file)
 #define FINO_STAG(x) ((x) >> 48)
 #define MAKE_FINO(i,s) ((i) | ((s) << 48))
 
-#define MINORBITS      20
-#define MINORMASK      ((1U << MINORBITS) - 1)
-
-#define MAJOR(dev)     ((unsigned int) ((dev) >> MINORBITS))
-#define MINOR(dev)     ((unsigned int) ((dev) & MINORMASK))
-#define MKDEV(ma,mi)   (((ma) << MINORBITS) | (mi))
-
 static uint32_t new_encode_dev(dev_t dev)
 {
        unsigned major = MAJOR(dev);