]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "ceph-fuse: Delete inode's bufferhead was in Tx state would lead a assert... 21976/head
authorYan, Zheng <zyan@redhat.com>
Mon, 14 May 2018 11:59:01 +0000 (19:59 +0800)
committerYan, Zheng <zyan@redhat.com>
Mon, 14 May 2018 11:59:01 +0000 (19:59 +0800)
This reverts commit ede7817a36e7b10f01f906000ce3ed621c0fc358.
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
src/client/Client.cc
src/osdc/ObjectCacher.cc

index 3c73a1dbe5c9ce58f92c3ac12b4f347426888efa..d87bd1e1bf10c7cf6b01057b2a6dcfbcb84791b0 100644 (file)
@@ -3739,7 +3739,7 @@ void Client::_invalidate_inode_cache(Inode *in, int64_t off, int64_t len)
   if (cct->_conf->client_oc) {
     vector<ObjectExtent> ls;
     Striper::file_to_extents(cct, in->ino, &in->layout, off, len, in->truncate_size, ls);
-    objectcacher->discard_writeback(&in->oset, ls, nullptr);
+    objectcacher->discard_set(&in->oset, ls);
   }
 
   _schedule_invalidate_callback(in, off, len);
index 711e71fc99a04b8940ff89d6d497de68d41c14c4..50f9a8d6a6c07de069bcb044606fc2eff1258c51 100644 (file)
@@ -609,8 +609,7 @@ void ObjectCacher::Object::discard(loff_t off, loff_t len,
       bh->bl.clear();
       bh->set_nocache(true);
       oc->mark_zero(bh);
-      // we should mark all Rx bh to zero
-      continue;
+      return;
     } else {
       assert(bh->waitfor_read.empty());
     }
@@ -2490,8 +2489,8 @@ void ObjectCacher::discard_writeback(ObjectSet *oset,
 
   if (gather.has_subs()) {
     gather.set_finisher(new FunctionContext(
-      [this, oset, on_finish](int) {
-        _discard_finish(oset, false, on_finish);
+      [this, oset, was_dirty, on_finish](int) {
+        _discard_finish(oset, was_dirty, on_finish);
       }));
     gather.activate();
     return;