summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/os/FileStore.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc
index 3506c4a4ccd..20afde9a0dc 100644
--- a/src/os/FileStore.cc
+++ b/src/os/FileStore.cc
@@ -201,7 +201,9 @@ int FileStore::lfn_open(coll_t cid,
IndexedPath *path,
Index *index)
{
- assert(get_allow_sharded_objects() || oid.shard_id == ghobject_t::NO_SHARD);
+ assert(get_allow_sharded_objects() ||
+ ( oid.shard_id == ghobject_t::NO_SHARD &&
+ oid.generation == ghobject_t::NO_GEN ));
assert(outfd);
int flags = O_RDWR;
if (create)