[PATCH 28/39] mds: add dirty imported dirfrag to LogSegment

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

 



From: "Yan, Zheng" <zheng.z.yan@xxxxxxxxx>

Signed-off-by: Yan, Zheng <zheng.z.yan@xxxxxxxxx>
---
 src/mds/CDir.cc     | 7 +++++--
 src/mds/CDir.h      | 2 +-
 src/mds/Migrator.cc | 2 +-
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/mds/CDir.cc b/src/mds/CDir.cc
index af0ae9c..34bd8d3 100644
--- a/src/mds/CDir.cc
+++ b/src/mds/CDir.cc
@@ -2164,7 +2164,7 @@ void CDir::finish_export(utime_t now)
   dirty_old_rstat.clear();
 }
 
-void CDir::decode_import(bufferlist::iterator& blp, utime_t now)
+void CDir::decode_import(bufferlist::iterator& blp, utime_t now, LogSegment *ls)
 {
   ::decode(first, blp);
   ::decode(fnode, blp);
@@ -2177,7 +2177,10 @@ void CDir::decode_import(bufferlist::iterator& blp, utime_t now)
   ::decode(s, blp);
   state &= MASK_STATE_IMPORT_KEPT;
   state |= (s & MASK_STATE_EXPORTED);
-  if (is_dirty()) get(PIN_DIRTY);
+  if (is_dirty()) {
+    get(PIN_DIRTY);
+    _mark_dirty(ls);
+  }
 
   ::decode(dir_rep, blp);
 
diff --git a/src/mds/CDir.h b/src/mds/CDir.h
index f4a3a3d..7e1db73 100644
--- a/src/mds/CDir.h
+++ b/src/mds/CDir.h
@@ -550,7 +550,7 @@ public:
   void abort_export() { 
     put(PIN_TEMPEXPORTING);
   }
-  void decode_import(bufferlist::iterator& blp, utime_t now);
+  void decode_import(bufferlist::iterator& blp, utime_t now, LogSegment *ls);
 
 
   // -- auth pins --
diff --git a/src/mds/Migrator.cc b/src/mds/Migrator.cc
index 833df12..d626cb1 100644
--- a/src/mds/Migrator.cc
+++ b/src/mds/Migrator.cc
@@ -2397,7 +2397,7 @@ int Migrator::decode_import_dir(bufferlist::iterator& blp,
   dout(7) << "decode_import_dir " << *dir << dendl;
 
   // assimilate state
-  dir->decode_import(blp, now);
+  dir->decode_import(blp, now, ls);
 
   // mark  (may already be marked from get_or_open_dir() above)
   if (!dir->is_auth())
-- 
1.7.11.7

--
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