]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: mark scatterlock if we import dirty scatterlock dir data
authorSage Weil <sage@newdream.net>
Thu, 14 Aug 2008 18:17:25 +0000 (11:17 -0700)
committerSage Weil <sage@newdream.net>
Thu, 14 Aug 2008 18:17:50 +0000 (11:17 -0700)
src/TODO
src/mds/CDir.cc

index f213bc93cdf98ab3313cb60de3024afa4420f33b..c54ef45ab3f64226f679527d48effce45966e309 100644 (file)
--- a/src/TODO
+++ b/src/TODO
@@ -99,6 +99,8 @@ mon
 - osdmon needs to lower-bound old osdmap versions it keeps around?
 
 mds
+- whats with the 'clear if dirtyscattered' bit in decode_import_inode()?
+
 - proper handling of cache expire messages during rejoin phase?
   -> i think cache expires are fine; the rejoin_ack handler just has to behave if rejoining items go missing
 - try_remove_unlinked_dn thing
index 3fec129a1e14552f36419ca56eeb9dcf6a6685be..09ec69a4f8c4fcdd51a636f73eb7e1a675c316b3 100644 (file)
@@ -22,6 +22,7 @@
 #include "MDSMap.h"
 #include "MDS.h"
 #include "MDCache.h"
+#include "Locker.h"
 #include "MDLog.h"
 #include "LogSegment.h"
 
@@ -1618,6 +1619,13 @@ void CDir::decode_import(bufferlist::iterator& blp)
   if (!replica_map.empty()) get(PIN_REPLICATED);
 
   replica_nonce = 0;  // no longer defined
+
+  // did we import some dirty scatterlock data?
+  if (dirty_old_rstat.size() ||
+      !(fnode.rstat == fnode.accounted_rstat))
+    cache->mds->locker->mark_updated_scatterlock(&inode->nestlock);
+  if (!(fnode.fragstat == fnode.accounted_fragstat))
+    cache->mds->locker->mark_updated_scatterlock(&inode->dirlock);
 }