This currently enumerates all cache modes except none, and we don't
arrive in this function when caching is disabled. And creating a whiteout
is not cache_mode dependent. Simplify!
Signed-off-by: Sage Weil <sage@redhat.com>
}
bool whiteout = false;
- if (r == -ENOENT &&
- soid.snap == CEPH_NOSNAP &&
- (pool.info.cache_mode == pg_pool_t::CACHEMODE_WRITEBACK ||
- pool.info.cache_mode == pg_pool_t::CACHEMODE_READFORWARD ||
- pool.info.cache_mode == pg_pool_t::CACHEMODE_READONLY)) {
+ if (r == -ENOENT) {
+ assert(soid.snap == CEPH_NOSNAP); // snap case is above
dout(10) << __func__ << " whiteout " << soid << dendl;
whiteout = true;
}