]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/newstore: a few comments about wal
authorSage Weil <sage@redhat.com>
Mon, 20 Apr 2015 19:48:38 +0000 (12:48 -0700)
committerSage Weil <sage@redhat.com>
Tue, 1 Sep 2015 17:39:39 +0000 (13:39 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/newstore/NewStore.cc

index 6cbbef8cbdd6552afae0014c06efc1a61c55e8fe..8dd10d6c5a9a5a4cab4f20a5f944e0c9ee330235 100644 (file)
@@ -2420,13 +2420,19 @@ int NewStore::_do_wal_transaction(wal_transaction_t& wt)
               << cpp_strerror(r) << dendl;
          return r;
        }
-       //sync_fds.push_back(fd);  // do we care?
+       // note: we are not syncing this truncate.  instead, we are
+       // careful about only reading as much of the fragment as we
+       // know is valid, and truncating to expected size before
+       // extending the file.
       }
       break;
 
     case wal_op_t::OP_REMOVE:
       dout(20) << __func__ << " remove " << p->fid << dendl;
       _remove_fid(p->fid);
+      // note: we do not fsync the directory.  instead, we tolerate
+      // leaked fragments in a crash.  in practice, this will be
+      // exceedingly rare.
       break;
 
     default: