Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
361be860
Commit
361be860
authored
Jan 25, 2010
by
Sage Weil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ceph: precede encoded ceph_pg_pool struct with version
Signed-off-by:
Sage Weil
<
sage@newdream.net
>
parent
0d59ab81
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
fs/ceph/ceph_fs.h
fs/ceph/ceph_fs.h
+1
-1
fs/ceph/osdmap.c
fs/ceph/osdmap.c
+7
-1
No files found.
fs/ceph/ceph_fs.h
View file @
361be860
...
...
@@ -38,7 +38,7 @@
#define CEPH_OSD_PROTOCOL 8
/* cluster internal */
#define CEPH_MDS_PROTOCOL 9
/* cluster internal */
#define CEPH_MON_PROTOCOL 5
/* cluster internal */
#define CEPH_OSDC_PROTOCOL 2
2
/* server/client */
#define CEPH_OSDC_PROTOCOL 2
3
/* server/client */
#define CEPH_MDSC_PROTOCOL 32
/* server/client */
#define CEPH_MONC_PROTOCOL 15
/* server/client */
...
...
fs/ceph/osdmap.c
View file @
361be860
...
...
@@ -414,6 +414,7 @@ struct ceph_osdmap *osdmap_decode(void **p, void *end)
struct
ceph_osdmap
*
map
;
u16
version
;
u32
len
,
max
,
i
;
u8
ev
;
int
err
=
-
EINVAL
;
void
*
start
=
*
p
;
...
...
@@ -441,10 +442,11 @@ struct ceph_osdmap *osdmap_decode(void **p, void *end)
}
ceph_decode_32_safe
(
p
,
end
,
max
,
bad
);
while
(
max
--
)
{
ceph_decode_need
(
p
,
end
,
4
+
sizeof
(
map
->
pg_pool
->
v
),
bad
);
ceph_decode_need
(
p
,
end
,
4
+
1
+
sizeof
(
map
->
pg_pool
->
v
),
bad
);
i
=
ceph_decode_32
(
p
);
if
(
i
>=
map
->
num_pools
)
goto
bad
;
ev
=
ceph_decode_8
(
p
);
/* encoding version */
ceph_decode_copy
(
p
,
&
map
->
pg_pool
[
i
].
v
,
sizeof
(
map
->
pg_pool
->
v
));
calc_pg_masks
(
&
map
->
pg_pool
[
i
]);
...
...
@@ -603,6 +605,8 @@ struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end,
/* new_pool */
ceph_decode_32_safe
(
p
,
end
,
len
,
bad
);
while
(
len
--
)
{
__u8
ev
;
ceph_decode_32_safe
(
p
,
end
,
pool
,
bad
);
if
(
pool
>=
map
->
num_pools
)
{
void
*
pg_pool
=
kcalloc
(
pool
+
1
,
...
...
@@ -618,6 +622,8 @@ struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end,
map
->
pg_pool
=
pg_pool
;
map
->
num_pools
=
pool
+
1
;
}
ceph_decode_need
(
p
,
end
,
1
+
sizeof
(
map
->
pg_pool
->
v
),
bad
);
ev
=
ceph_decode_8
(
p
);
/* encoding version */
ceph_decode_copy
(
p
,
&
map
->
pg_pool
[
pool
].
v
,
sizeof
(
map
->
pg_pool
->
v
));
calc_pg_masks
(
&
map
->
pg_pool
[
pool
]);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment