mirror of
https://github.com/ceph/ceph
synced 2025-04-01 23:02:17 +00:00
osd: fix is_pool_snaps_mode() for empty pools
The data pool in particular has seq 0 and (initially) no removed snaps. We must not return true for that case, or else the OSD will use an empty pool snap context and not the user/mds provided one. Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
parent
52f83d9e2d
commit
0023c8843b
@ -693,7 +693,7 @@ struct pg_pool_t {
|
||||
* we know which mode we're using based on whether removed_snaps is empty.
|
||||
*/
|
||||
bool is_pool_snaps_mode() const {
|
||||
return removed_snaps.empty();
|
||||
return removed_snaps.empty() && get_snap_seq() > 0;
|
||||
}
|
||||
|
||||
bool is_removed_snap(snapid_t s) const {
|
||||
|
Loading…
Reference in New Issue
Block a user