]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: Explicitly initialize layout fields, and to the correct values.
authorGreg Farnum <gregory.farnum@dreamhost.com>
Tue, 28 Jun 2011 00:03:42 +0000 (17:03 -0700)
committerGreg Farnum <gregory.farnum@dreamhost.com>
Tue, 28 Jun 2011 15:19:57 +0000 (08:19 -0700)
commit6a7e635aaf118d013744f322645642afe5b33f24
treee8acdd93d670f06dd1776ef8638bba3002625ddc
parente27a89397919c8e24a8c9f9f02e56e875e2a877f
mds: Explicitly initialize layout fields, and to the correct values.

We were previously encoding an fl_pg_preferred of 0, which did
horrible things to the kernel client since 0 is a valid osd to ask for!
To make such things easier to track down in the future, explicitly
fill in defaults when memsetting the struct here.

(There remain other places that memset the struct to zero without
a lot of checks. But we definitely don't want to force them all
to fill in the individual fields, as that's fragile, and since they
don't seem to be breaking anything yet I'm inclined to leave them as
they are.)

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
src/cephfs.cc
src/mds/Server.cc