]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd/osd_types: pg_pool_t: add FLAG_{SELFMANAGED,POOL}_SNAPS flags
authorSage Weil <sage@redhat.com>
Fri, 13 Oct 2017 15:39:51 +0000 (10:39 -0500)
committerSage Weil <sage@redhat.com>
Sat, 2 Dec 2017 03:26:49 +0000 (21:26 -0600)
commit16c5bcc0218069edcd5e16b8d17912d47b8e70b3
treedbc0526f31309a4c3b7162067bd9d74c726d51ab
parent6e1b7c4c14be575a554ffe1d6e71c0d6189486af
osd/osd_types: pg_pool_t: add FLAG_{SELFMANAGED,POOL}_SNAPS flags

Explicitly track whether we are a pool snaps pool or a selfmanaged
snaps pool.  This was inferred from removed_snaps.empty() before, but
that was fragile and kludgey and removed_snaps is going away.

The upgrade/compat behavior is a bit tricky:

- on decode, we set the flags based on the legacy condition.  This lets us
use and rely on the flags in memory.
- on encode, we exclude the flags if decoding an older pg_pool_t

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/osd_types.cc
src/osd/osd_types.h