#
5159ad46 |
|
23-May-2018 |
Tricia Landers <planders@google.com> |
[minfs] Pre-reserve inodes/blocks to mitigate mid-op failures. The most common failure for a Minfs operation (in particular for writes) occurs when we attempt but are unable to allocate a new block or inode. To ensure that this kind of error cannot happen partway through an operation and leave the in-memory metadata in an inconsistent state, the maximum number of blocks required for an operation will be "reserved" prior to any state-changing calls. In many cases the reserved elements will be an over-estimated, in which case they will be unreserved at the end of the operation. Additionally, in cases where a directory entry must be appended in conjunction with other updates, ensure that the directory has space for the new entry before making any other changes. Test: TestFullOperations in utest/fs/test-minfs Change-Id: I16bad01344723dc6b1dddfd2a04c919846032597
|
#
a1ff7e9f |
|
01-Jun-2018 |
Sean Klein <smklein@google.com> |
[minfs] Refactor allocator, inode manager, and superblock The MinFS allocators should be opaque entities, only leaking details of on-disk format during initialization. This patch reduces the reliance on callbacks into the Minfs superclass, instead providing ownership of the fields which need to be updated to the underlying allocator. Test: /boot/test/fs/fs-test -f minfs Change-Id: I50090c17a2e2b7487aa072860af1286f3ab53e0b
|