src/storage/blobfs/test/unit/format_test.cc
// Calculates the smallest number of blobfs blocks to generate a valid blobfs format.
Calculates the smallest number of blobfs blocks to generate a valid blobfs format.
Calculates the smallest number of blobfs blocks to generate a valid blobfs format .
constexpr uint64_t MinimumFilesystemBlocks() {
  const uint64_t kSuperBlockBlocks = 1;
  const uint64_t kInodeBlocks = sizeof(Inode) * kBlobfsDefaultInodeCount / kBlobfsBlockSize;
  const uint64_t kJournalBlocks = kMinimumJournalBlocks;
  const uint64_t kDataBlocks = kMinimumDataBlocks;
  const uint64_t kBlockMapBlocks = fbl::round_up(kDataBlocks, kBlobfsBlockBits) / kBlobfsBlockBits;
  return kSuperBlockBlocks + kInodeBlocks + kJournalBlocks + kDataBlocks + kBlockMapBlocks;
}
constexpr uint64_t MinimumFilesystemBlocks ( ) { const uint64_t kSuperBlockBlocks = 1 ; const uint64_t kInodeBlocks = sizeof ( Inode ) * kBlobfsDefaultInodeCount / kBlobfsBlockSize ; const uint64_t kJournalBlocks = kMinimumJournalBlocks ; const uint64_t kDataBlocks = kMinimumDataBlocks ; const uint64_t kBlockMapBlocks = fbl :: round_up ( kDataBlocks , kBlobfsBlockBits ) / kBlobfsBlockBits ; return kSuperBlockBlocks + kInodeBlocks + kJournalBlocks + kDataBlocks + kBlockMapBlocks ; }
Calculates the smallest number of blobfs blocks to generate a valid blobfs format.
Calculates the smallest number of blobfs blocks to generate a valid blobfs format .