aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2013-03-13 21:50:00 -0400
committerSage Weil <sage@inktank.com>2013-05-02 00:17:42 -0400
commitadfe695a25e92e3a4597807fbc7f9a8105218776 (patch)
tree8356e0eafe1bd0e5817bca6e56f80e80c62b9482
parent0baa1bd9b6da7161dc1773b1dfce3adfd37d675f (diff)
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: Alex Elder <elder@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
-rw-r--r--drivers/block/rbd.c7
-rw-r--r--include/linux/ceph/decode.h7
2 files changed, 7 insertions, 7 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index dea4401c4f77..6ed508bd363a 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -52,13 +52,6 @@
52#define SECTOR_SHIFT 9 52#define SECTOR_SHIFT 9
53#define SECTOR_SIZE (1ULL << SECTOR_SHIFT) 53#define SECTOR_SIZE (1ULL << SECTOR_SHIFT)
54 54
55/* It might be useful to have these defined elsewhere */
56
57#define U8_MAX ((u8) (~0U))
58#define U16_MAX ((u16) (~0U))
59#define U32_MAX ((u32) (~0U))
60#define U64_MAX ((u64) (~0ULL))
61
62#define RBD_DRV_NAME "rbd" 55#define RBD_DRV_NAME "rbd"
63#define RBD_DRV_NAME_LONG "rbd (rados block device)" 56#define RBD_DRV_NAME_LONG "rbd (rados block device)"
64 57
diff --git a/include/linux/ceph/decode.h b/include/linux/ceph/decode.h
index 360d9d08ca9e..689f1df37bff 100644
--- a/include/linux/ceph/decode.h
+++ b/include/linux/ceph/decode.h
@@ -8,6 +8,13 @@
8 8
9#include <linux/ceph/types.h> 9#include <linux/ceph/types.h>
10 10
11/* This seemed to be the easiest place to define these */
12
13#define U8_MAX ((u8) (~0U))
14#define U16_MAX ((u16) (~0U))
15#define U32_MAX ((u32) (~0U))
16#define U64_MAX ((u64) (~0ULL))
17
11/* 18/*
12 * in all cases, 19 * in all cases,
13 * void **p pointer to position pointer 20 * void **p pointer to position pointer