aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ceph/libceph.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/ceph/libceph.h')
-rw-r--r--include/linux/ceph/libceph.h31
1 files changed, 6 insertions, 25 deletions
diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h
index 29818fc3fa49..2e3024881a5e 100644
--- a/include/linux/ceph/libceph.h
+++ b/include/linux/ceph/libceph.h
@@ -66,6 +66,7 @@ struct ceph_options {
66#define CEPH_OSD_IDLE_TTL_DEFAULT 60 66#define CEPH_OSD_IDLE_TTL_DEFAULT 60
67 67
68#define CEPH_MSG_MAX_FRONT_LEN (16*1024*1024) 68#define CEPH_MSG_MAX_FRONT_LEN (16*1024*1024)
69#define CEPH_MSG_MAX_MIDDLE_LEN (16*1024*1024)
69#define CEPH_MSG_MAX_DATA_LEN (16*1024*1024) 70#define CEPH_MSG_MAX_DATA_LEN (16*1024*1024)
70 71
71#define CEPH_AUTH_NAME_DEFAULT "guest" 72#define CEPH_AUTH_NAME_DEFAULT "guest"
@@ -156,31 +157,11 @@ struct ceph_snap_context {
156 u64 snaps[]; 157 u64 snaps[];
157}; 158};
158 159
159static inline struct ceph_snap_context * 160extern struct ceph_snap_context *ceph_create_snap_context(u32 snap_count,
160ceph_get_snap_context(struct ceph_snap_context *sc) 161 gfp_t gfp_flags);
161{ 162extern struct ceph_snap_context *ceph_get_snap_context(
162 /* 163 struct ceph_snap_context *sc);
163 printk("get_snap_context %p %d -> %d\n", sc, atomic_read(&sc->nref), 164extern void ceph_put_snap_context(struct ceph_snap_context *sc);
164 atomic_read(&sc->nref)+1);
165 */
166 if (sc)
167 atomic_inc(&sc->nref);
168 return sc;
169}
170
171static inline void ceph_put_snap_context(struct ceph_snap_context *sc)
172{
173 if (!sc)
174 return;
175 /*
176 printk("put_snap_context %p %d -> %d\n", sc, atomic_read(&sc->nref),
177 atomic_read(&sc->nref)-1);
178 */
179 if (atomic_dec_and_test(&sc->nref)) {
180 /*printk(" deleting snap_context %p\n", sc);*/
181 kfree(sc);
182 }
183}
184 165
185/* 166/*
186 * calculate the number of pages a given length and offset map onto, 167 * calculate the number of pages a given length and offset map onto,