Skip to contentSkip to conversation

ghobjects: assert in FileStore::lfn_open

DISCUSSION Loic Dachary 2 participants 2 messages Sep 27, 2013 – Oct 7, 2013

lore
Share & tools
lore
#0 lore raw

Hi David,

In

int FileStore::lfn_open(coll_t cid,
const ghobject_t& oid,
bool create,
FDRef *outfd,
IndexedPath *path,
Index *index)
{
assert(get_allow_sharded_objects() || oid.shard_id == ghobject_t::NO_SHARD); assert(outfd);

would it make sense to

assert(get_allow_sharded_objects() || ( oid.shard_id == ghobject_t::NO_SHARD) && oid.generation == ghobject_t::NO_GEN) )

instead ?

Cheers

Signature · 2 lines
Loïc Dachary, Artisan Logiciel Libre
All that is necessary for the triumph of evil is that good people do nothing.
#1 lore raw

That sounds better to me, since the generation stuff triggers the same format switch.
-Sam

Quoted 18 lines · Loic Dachary

Hi David,

In

int FileStore::lfn_open(coll_t cid,
const ghobject_t& oid,
bool create,
FDRef *outfd,
IndexedPath *path,
Index *index)
{
assert(get_allow_sharded_objects() || oid.shard_id == ghobject_t::NO_SHARD); assert(outfd);

would it make sense to

assert(get_allow_sharded_objects() || ( oid.shard_id == ghobject_t::NO_SHARD) && oid.generation == ghobject_t::NO_GEN) )

Quoted 8 lines

instead ?

Cheers

--
Loïc Dachary, Artisan Logiciel Libre
All that is necessary for the triumph of evil is that good people do nothing.

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html