From: xie xingguo Date: Fri, 20 May 2016 01:56:57 +0000 (+0800) Subject: os/filestore: simplify temp object collection check a little X-Git-Tag: v11.0.0~409^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9389462d4eed634a429e459a90e9dcb155ae762c;p=ceph.git os/filestore: simplify temp object collection check a little Signed-off-by: xie xingguo --- diff --git a/src/os/filestore/FileStore.h b/src/os/filestore/FileStore.h index b143bdfd3a49..d56113e465b3 100644 --- a/src/os/filestore/FileStore.h +++ b/src/os/filestore/FileStore.h @@ -143,14 +143,12 @@ private: bool _need_temp_object_collection(const coll_t& cid, const ghobject_t& oid) { // - normal temp case: cid is pg, object is temp (pool < -1) // - hammer temp case: cid is pg (or already temp), object pool is -1 - return (cid.is_pg() && (oid.hobj.pool < -1 || - oid.hobj.pool == -1)); + return cid.is_pg() && oid.hobj.pool <= -1; } void _kludge_temp_object_collection(coll_t& cid, const ghobject_t& oid) { // - normal temp case: cid is pg, object is temp (pool < -1) // - hammer temp case: cid is pg (or already temp), object pool is -1 - if (cid.is_pg() && (oid.hobj.pool < -1 || - oid.hobj.pool == -1)) + if (cid.is_pg() && oid.hobj.pool <= -1) cid = cid.get_temp(); } void init_temp_collections();