2#include "pedigree/kernel/machine/Disk.h"
3#include "pedigree/kernel/syscallError.h"
5#include "FatFilesystem.h"
10 if (!tryAcquireOperation(operation)) {
23 bool succeeded =
true;
29 for (
size_t i = 0; i < count; ++i) {
30 const uint64_t location = pages[i].key;
31 if (location >= state.size)
34 pedigree_std::min(
size_t(file.getBlockSize()),
size_t(state.size - location));
35 uint32_t cluster = fileClusterAt(&file, location /
m_BlockSize);
37 uintptr_t source = pages[i].location;
43 const size_t length = pedigree_std::min(
size_t(
m_BlockSize - offset), remaining);
44 requests[pending++] = {
46 reinterpret_cast<void*
>(source), length,
false};
47 if (pending == Disk::MaxWriteBuffers)
58 if (!succeeded || !durable) {
59 SYSCALL_ERROR(IoError);
virtual MUST_USE_RESULT bool writeFromBatch(WriteBuffer *buffers, size_t count)
virtual MUST_USE_RESULT bool syncData()
bool isEof(uint32_t cluster) const
uint32_t getClusterEntry(uint32_t cluster, bool bLock=true)
uint32_t getSectorNumber(uint32_t cluster) const