aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/decode.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ceph/decode.h')
-rw-r--r--fs/ceph/decode.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ceph/decode.h b/fs/ceph/decode.h
index a382aecc55bb..10de84896244 100644
--- a/fs/ceph/decode.h
+++ b/fs/ceph/decode.h
@@ -98,6 +98,7 @@ static inline void ceph_encode_addr(struct ceph_entity_addr *a)
98static inline void ceph_decode_addr(struct ceph_entity_addr *a) 98static inline void ceph_decode_addr(struct ceph_entity_addr *a)
99{ 99{
100 a->in_addr.ss_family = ntohs(a->in_addr.ss_family); 100 a->in_addr.ss_family = ntohs(a->in_addr.ss_family);
101 WARN_ON(a->in_addr.ss_family == 512);
101} 102}
102 103
103/* 104/*
@@ -123,6 +124,11 @@ static inline void ceph_encode_8(void **p, u8 v)
123 *(u8 *)*p = v; 124 *(u8 *)*p = v;
124 (*p)++; 125 (*p)++;
125} 126}
127static inline void ceph_encode_copy(void **p, const void *s, int len)
128{
129 memcpy(*p, s, len);
130 *p += len;
131}
126 132
127/* 133/*
128 * filepath, string encoders 134 * filepath, string encoders