Skip to content

Commit

Permalink
Revert "client: move the device bitshift handling macros to Client.h"
Browse files Browse the repository at this point in the history
This reverts commit 2115de0.

This is unnecessary now that we're using dev_t's in ceph_statx.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
  • Loading branch information
jtlayton committed Sep 14, 2016
1 parent 65e277e commit 1715907
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/client/Client.h
Expand Up @@ -93,14 +93,6 @@ 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 */

Expand Down
7 changes: 7 additions & 0 deletions src/client/fuse_ll.cc
Expand Up @@ -41,6 +41,13 @@
#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);
Expand Down

0 comments on commit 1715907

Please sign in to comment.