]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: PG::read_log: don't be clever with lost xattr
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Mon, 22 Nov 2010 23:55:42 +0000 (15:55 -0800)
committerSage Weil <sage@newdream.net>
Tue, 23 Nov 2010 21:52:21 +0000 (13:52 -0800)
Formerly, we had a special case in read_log for dealing with objects
whose objects were present on the disk, but not their attributes. This
conflicts with our plans to mark objects as lost by putting a bit in the
object attributes, since without those attributes, we'll never know if
the objects were formerly marked as lost.

This should almost never happen, and if it does, we just handle the
objects as missing in the normal way.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
src/osd/PG.cc

index 9cefc0f747f77ada9e84823e19261c2c7222eaea..c3ba4225ccd8a72946cbf3ff8e65b73999194cb9 100644 (file)
@@ -2341,26 +2341,6 @@ void PG::read_log(ObjectStore *store)
          dout(15) << "read_log  missing " << *i << " (have " << oi.version << ")" << dendl;
          missing.add(i->soid, i->version, oi.version);
        }
-      } else if (i->soid.snap == CEPH_NOSNAP &&
-                osd->store->stat(coll, i->soid, &st) == 0) {
-       dout(0) << "read_log  rebuilding missing xattr on " << *i << dendl;
-       object_locator_t oloc(info.pgid.pool(), info.pgid.preferred()); // we lose the key here!
-       object_info_t oi(i->soid, oloc);
-       oi.version = i->version;
-       oi.prior_version = i->prior_version;
-       oi.size = st.st_size;
-       oi.mtime = i->mtime;
-       oi.last_reqid = i->reqid;
-       bufferlist bl;
-       ::encode(oi, bl);
-       ObjectStore::Transaction *t = new ObjectStore::Transaction;
-       t->setattr(coll, i->soid, OI_ATTR, bl);
-       int tr = osd->store->queue_transaction(&osr, t);
-       assert(tr == 0);
-
-       stringstream ss;
-       ss << info.pgid << " rebuilt missing xattr on " << i->soid;
-       osd->get_logclient()->log(LOG_ERROR, ss);
       } else {
        dout(15) << "read_log  missing " << *i << dendl;
        missing.add(i->soid, i->version, eversion_t());