[blobfs] Remove dependency from Buffer -> WritebackWork
WritebackWork inherits from WriteTxn.
Buffer depends on WriteTxn and WritebackWork.
However, buffer doesn't actually *need* to depend
on WritebackWork. This change makes the dependencies
of the Buffer class slightly smaller.
Change-Id: I34ef211d34f0586ed3f54b1a47d92eeff4237ba4
diff --git a/zircon/system/ulib/blobfs/buffer.cpp b/zircon/system/ulib/blobfs/buffer.cpp
index dcb4ec9..a14a990 100644
--- a/zircon/system/ulib/blobfs/buffer.cpp
+++ b/zircon/system/ulib/blobfs/buffer.cpp
@@ -3,7 +3,6 @@
// found in the LICENSE file.
#include <blobfs/buffer.h>
-#include <blobfs/writeback-work.h>
#include <utility>
@@ -133,7 +132,7 @@
txn->SetBuffer(vmoid_);
}
-void Buffer::AddTransaction(size_t start, size_t disk_start, size_t length, WritebackWork* work) {
+void Buffer::AddTransaction(size_t start, size_t disk_start, size_t length, WriteTxn* work) {
// Ensure the request fits within the buffer.
ZX_DEBUG_ASSERT(length > 0);
ZX_DEBUG_ASSERT(start + length <= capacity_);
diff --git a/zircon/system/ulib/blobfs/include/blobfs/buffer.h b/zircon/system/ulib/blobfs/include/blobfs/buffer.h
index 41818c5..8bfb59e 100644
--- a/zircon/system/ulib/blobfs/include/blobfs/buffer.h
+++ b/zircon/system/ulib/blobfs/include/blobfs/buffer.h
@@ -47,7 +47,7 @@
// Adds a transaction to |work| with buffer offset |start| and length |length|,
// starting at block |disk_start| on disk.
- void AddTransaction(size_t start, size_t disk_start, size_t length, WritebackWork* work);
+ void AddTransaction(size_t start, size_t disk_start, size_t length, WriteTxn* work);
// Returns true if |txn| belongs to this buffer, and if so verifies
// that it owns the next valid set of blocks within the buffer.