PG::Missing::rm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I have another question about the function PG::Missing::rm.
I wonder if it should be fixed as follows.

diff --git a/src/osd/PG.cc b/src/osd/PG.cc
index 4ce3336..29062c8 100644
--- a/src/osd/PG.cc
+++ b/src/osd/PG.cc
@@ -3600,7 +3600,7 @@ void PG::Missing::add(const sobject_t& oid,
eversion_t need, eversion_t have)

 void PG::Missing::rm(const sobject_t& oid, eversion_t when)
 {
-  if (missing.count(oid) && missing[oid].need < when) {
+  if (missing.count(oid) && missing[oid].need <= when) {
     rmissing.erase(missing[oid].need);
     missing.erase(oid);
   }

I am not quite sure what the argument "when" means. However, in
PG::merge_old_entry, it seems that the object will be removed from
filestore but left in the missing list due to the if condition in
missing.rm. As in the following code, although missing.rm is called,
but it does not "really" remove the obj from the missing list since
oe.version is equal to missing[oid].need.

    if (oe.is_delete()) {
      dout(20) << "merge_old_entry  had " << oe << " new dne : ok" <<
dendl;
    } else {
      dout(20) << "merge_old_entry  had " << oe << " new dne :
deleting" << dendl;
      t.remove(coll, oe.soid);
      missing.rm(oe.soid, oe.version);
    }

-- 
Henry Chang
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux