]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os: stronger assert on FileStore::lfn_open 699/head
authorLoic Dachary <loic@dachary.org>
Mon, 7 Oct 2013 23:15:41 +0000 (01:15 +0200)
committerLoic Dachary <loic@dachary.org>
Mon, 7 Oct 2013 23:15:41 +0000 (01:15 +0200)
Signed-off-by: Loic Dachary <loic@dachary.org>
src/os/FileStore.cc

index 3506c4a4ccd47e0d407a99bcb2cc496e8bc6ee05..20afde9a0dcec85ec058cc401a860bf6359b10bc 100644 (file)
@@ -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)