提交 adfe695a 编写于 作者: A Alex Elder 提交者: Sage Weil

ceph: move max constant definitions

Move some definitions for max integer values out of the rbd code and
into the more central "decode.h" header file.  These really belong
in a Linux (or libc) header somewhere, but I haven't gotten around
to proposing that yet.

This is in preparation for moving some code out of rbd.c and into
the osd client.
Signed-off-by: NAlex Elder <elder@inktank.com>
Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
上级 0baa1bd9
...@@ -52,13 +52,6 @@ ...@@ -52,13 +52,6 @@
#define SECTOR_SHIFT 9 #define SECTOR_SHIFT 9
#define SECTOR_SIZE (1ULL << SECTOR_SHIFT) #define SECTOR_SIZE (1ULL << SECTOR_SHIFT)
/* It might be useful to have these defined elsewhere */
#define U8_MAX ((u8) (~0U))
#define U16_MAX ((u16) (~0U))
#define U32_MAX ((u32) (~0U))
#define U64_MAX ((u64) (~0ULL))
#define RBD_DRV_NAME "rbd" #define RBD_DRV_NAME "rbd"
#define RBD_DRV_NAME_LONG "rbd (rados block device)" #define RBD_DRV_NAME_LONG "rbd (rados block device)"
......
...@@ -8,6 +8,13 @@ ...@@ -8,6 +8,13 @@
#include <linux/ceph/types.h> #include <linux/ceph/types.h>
/* This seemed to be the easiest place to define these */
#define U8_MAX ((u8) (~0U))
#define U16_MAX ((u16) (~0U))
#define U32_MAX ((u32) (~0U))
#define U64_MAX ((u64) (~0ULL))
/* /*
* in all cases, * in all cases,
* void **p pointer to position pointer * void **p pointer to position pointer
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册