diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-06-28 02:00:25 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-06-28 02:00:25 -0400 |
commit | 31881d74b6dd1a6c530cff61248def4f2da38bee (patch) | |
tree | be62420cf39192074e13b25553d172b9d5e58a33 /include/linux/ceph/libceph.h | |
parent | 8855f30cd2b68012571932c7b01290c20be4508c (diff) | |
parent | 257867dc8d893690c175c1f717f91c3b6d44a63d (diff) |
Merge branch 'for-next' of git://github.com/rydberg/linux into next
Pull in changes from Henrik: "a trivial MT documentation fix".
Diffstat (limited to 'include/linux/ceph/libceph.h')
-rw-r--r-- | include/linux/ceph/libceph.h | 31 |
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 | ||
159 | static inline struct ceph_snap_context * | 160 | extern struct ceph_snap_context *ceph_create_snap_context(u32 snap_count, |
160 | ceph_get_snap_context(struct ceph_snap_context *sc) | 161 | gfp_t gfp_flags); |
161 | { | 162 | extern 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), | 164 | extern 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 | |||
171 | static 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, |