]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
fs_types: file_layout_t: convert pool -1 (undefined) to 0 in legacy encoding
authorSage Weil <sage@redhat.com>
Tue, 12 Jan 2016 14:57:06 +0000 (09:57 -0500)
committerSage Weil <sage@redhat.com>
Tue, 1 Mar 2016 16:18:17 +0000 (11:18 -0500)
commitefb4a83f77ea2e10e2938db4ca19d8fa5e0e92a3
tree02f942249ffc53a489f8556b6ac11bda2accb412
parentc31e94d3b5ee76de3a1f30ef8559d0f74fb8542b
fs_types: file_layout_t: convert pool -1 (undefined) to 0 in legacy encoding

Old code assumes that fl_pg_pool == 0 means the pool is not defined, while
file_layout_t uses -1.  Translate between the two.

Note that this means a valid file_layout_t with pool_id == 0 cannot be
accurately translated to a legacy file_layout_t.  That is somewhat
unavoidable, and should not be a problem since real clusters create 'rbd'
as pool 0 and it does not use any file layouts.

Signed-off-by: Sage Weil <sage@redhat.com>
src/common/fs_types.cc