/fuchsia/zircon/system/ulib/fvm/ |
H A D | fvm.cpp | 23 #include "fvm/fvm.h" 43 ZX_DEBUG_ASSERT(metadata_size >= sizeof(fvm::fvm_t)); 44 const fvm::fvm_t* header = static_cast<const fvm::fvm_t*>(metadata); 52 digest.Update(metadata, offsetof(fvm::fvm_t, hash)); 55 metadata_size - (offsetof(fvm::fvm_t, hash) + sizeof(header->hash))); 64 uint64_t fvm::slice_entry::Vpart() const { 70 void fvm::slice_entry::SetVpart(uint64_t vpart) { 75 uint64_t fvm [all...] |
H A D | rules.mk | 14 $(LOCAL_DIR)/fvm.cpp \ 15 $(LOCAL_DIR)/fvm-lz4.cpp \ 41 $(LOCAL_DIR)/fvm.cpp \ 42 $(LOCAL_DIR)/fvm-lz4.cpp \
|
H A D | fvm-lz4.cpp | 5 #include "fvm/fvm-lz4.h" 7 namespace fvm { namespace 28 fvm::sparse_image_t image; 29 if (read(fd_.get(), &image, sizeof(fvm::sparse_image_t)) != sizeof(fvm::sparse_image_t)) { 35 if (image.magic != fvm::kSparseFormatMagic) { 38 } else if (image.version != fvm::kSparseFormatVersion) { 63 if (image.flags & fvm::kSparseFlagLz4) { 142 fvm [all...] |
/fuchsia/zircon/system/dev/block/fvm/ |
H A D | fvm.c | 12 #include "fvm-private.h" 23 ZIRCON_DRIVER_BEGIN(fvm, fvm_driver_ops, "zircon", "0.1", 2) 26 ZIRCON_DRIVER_END(fvm)
|
H A D | rules.mk | 12 $(LOCAL_DIR)/fvm.c \ 13 $(LOCAL_DIR)/fvm.cpp \ 20 system/ulib/fvm \
|
/fuchsia/zircon/system/utest/fvm-host/ |
H A D | rules.mk | 13 system/host/fvm/container/container.cpp \ 14 system/host/fvm/container/fvm.cpp \ 15 system/host/fvm/container/sparse.cpp \ 16 system/host/fvm/format/format.cpp \ 17 system/host/fvm/format/minfs.cpp \ 18 system/host/fvm/format/blobfs.cpp \ 20 MODULE_NAME := fvm-test 27 -Isystem/host/fvm/include \ 30 -Isystem/ulib/fvm/includ [all...] |
H A D | main.cpp | 7 #include <fvm/container.h> 11 #include <fvm/fvm-lz4.h> 157 const char* path = ((flags & fvm::kSparseFlagLz4) != 0) ? sparse_lz4_path : sparse_path; 188 if ((flags & fvm::kSparseFlagLz4) != 0) { 190 if (fvm::decompress_sparse(sparse_lz4_path, sparse_path) != ZX_OK) { 199 unittest_printf("Creating fvm container: %s\n", fvm_path); 209 ZX_OK, "Failed to initialize fvm container"); 211 ASSERT_EQ(fvmContainer->Commit(), ZX_OK, "Failed to write to fvm file"); 222 ZX_OK, "Failed to initialize fvm containe [all...] |
/fuchsia/zircon/system/utest/zxcrypt/ |
H A D | zxcrypt.cpp | 14 #include <fvm/fvm.h> 31 bool TestBind(Volume::Version version, bool fvm) { argument 35 EXPECT_TRUE(device.Bind(version, fvm)); 44 bool TestDdkGetSize(Volume::Version version, bool fvm) { argument 48 ASSERT_TRUE(device.Bind(version, fvm)); 65 bool TestBlockGetInfo(Volume::Version version, bool fvm) { argument 69 ASSERT_TRUE(device.Bind(version, fvm)); 86 bool TestBlockFvmQuery(Volume::Version version, bool fvm) { argument 90 ASSERT_TRUE(device.Bind(version, fvm)); 139 TestBlockFvmVSliceQuery(Volume::Version version, bool fvm) argument 149 TestBlockFvmShrinkAndExtend(Volume::Version version, bool fvm) argument 178 TestFdZeroLength(Volume::Version version, bool fvm) argument 191 TestFdFirstBlock(Volume::Version version, bool fvm) argument 205 TestFdLastBlock(Volume::Version version, bool fvm) argument 220 TestFdAllBlocks(Volume::Version version, bool fvm) argument 234 TestFdUnaligned(Volume::Version version, bool fvm) argument 265 TestFdOutOfBounds(Volume::Version version, bool fvm) argument 311 TestFdOneToMany(Volume::Version version, bool fvm) argument 330 TestFdManyToOne(Volume::Version version, bool fvm) argument 350 TestVmoZeroLength(Volume::Version version, bool fvm) argument 364 TestVmoFirstBlock(Volume::Version version, bool fvm) argument 377 TestVmoLastBlock(Volume::Version version, bool fvm) argument 391 TestVmoAllBlocks(Volume::Version version, bool fvm) argument 405 TestVmoOutOfBounds(Volume::Version version, bool fvm) argument 430 TestVmoOneToMany(Volume::Version version, bool fvm) argument 447 TestVmoManyToOne(Volume::Version version, bool fvm) argument 465 TestVmoStall(Volume::Version version, bool fvm) argument [all...] |
H A D | volume.cpp | 26 bool VolumeCreate(const fbl::unique_fd& fd, const crypto::Secret& key, bool fvm, argument 33 if (fvm) { 50 bool TestCreate(Volume::Version version, bool fvm) { argument 54 ASSERT_TRUE(device.Create(kDeviceSize, kBlockSize, fvm)); 63 EXPECT_TRUE(VolumeCreate(device.parent(), short_key, fvm, ZX_ERR_INVALID_ARGS)); 66 EXPECT_TRUE(VolumeCreate(device.parent(), device.key(), fvm, ZX_OK)); 72 bool TestUnlock(Volume::Version version, bool fvm) { argument 76 ASSERT_TRUE(device.Create(kDeviceSize, kBlockSize, fvm)); 88 ASSERT_TRUE(VolumeCreate(device.parent(), device.key(), fvm, ZX_OK)); 115 bool TestEnroll(Volume::Version version, bool fvm) { argument 142 TestRevoke(Volume::Version version, bool fvm) argument 166 TestShred(Volume::Version version, bool fvm) argument [all...] |
H A D | test-device.cpp | 23 #include <fs-management/fvm.h> 26 #include <fvm/fvm.h> 45 const char* kFvmDriver = "/boot/driver/fvm.so"; 97 bool TestDevice::Create(size_t device_size, size_t block_size, bool fvm) { argument 101 if (fvm) { 134 bool TestDevice::Bind(Volume::Version version, bool fvm) { argument 136 ASSERT_TRUE(Create(kDeviceSize, kBlockSize, fvm)); 306 size_t old_meta = fvm::MetadataSize(device_size, FVM_BLOCK_SIZE); 307 size_t new_meta = fvm [all...] |
H A D | test-device.h | 17 #include <fvm/fvm.h> 122 // |block_size| bytes each. If |fvm| is true, it will be formatted as an FVM partition with the 125 bool Create(size_t device_size, size_t block_size, bool fvm); 127 // Test helper that generates a key and creates a device according to |version| and |fvm|. It 129 bool Bind(Volume::Version version, bool fvm);
|
/fuchsia/zircon/system/host/fvm/container/ |
H A D | container.cpp | 9 #include "fvm/container.h" 13 if ((flags & ~fvm::kSparseFlagAllValid) != 0) { 37 fvm::fvm_t* sb = reinterpret_cast<fvm::fvm_t*>(data); 39 // Found fvm container 49 fvm::sparse_image_t* image = reinterpret_cast<fvm::sparse_image_t*>(data); 50 if (image->magic == fvm::kSparseFormatMagic) {
|
H A D | sparse.cpp | 7 #include "fvm/container.h" 101 if (read(fd_.get(), &image_, sizeof(fvm::sparse_image_t)) != sizeof(fvm::sparse_image_t)) { 106 if (image_.flags & fvm::kSparseFlagLz4) { 115 if (read(fd_.get(), &partitions_[i].descriptor, sizeof(fvm::partition_descriptor_t)) != 116 sizeof(fvm::partition_descriptor_t)) { 122 fvm::extent_descriptor_t extent; 124 if (read(fd_.get(), &partitions_[i].extents[j], sizeof(fvm::extent_descriptor_t)) != 125 sizeof(fvm::extent_descriptor_t)) { 140 image_.magic = fvm [all...] |
H A D | fvm.cpp | 9 #include <fvm/fvm.h> 13 #include "fvm/container.h" 84 metadata_size_ = fvm::MetadataSize(disk_size_, slice_size_); 98 ssize_t rd = read(fd_.get(), metadata_.get(), sizeof(fvm::fvm_t)); 99 if (rd != static_cast<ssize_t>(sizeof(fvm::fvm_t))) { 101 sizeof(fvm::fvm_t), rd); 114 size_t old_metadata_size = fvm::MetadataSize(disk_size_, old_slice_size); 154 fvm::fvm_t* sb = SuperBlock(); 157 sb->pslice_count = fvm [all...] |
/fuchsia/zircon/system/utest/fvm/ |
H A D | rules.mk | 11 MODULE_NAME := fvm-test 14 $(LOCAL_DIR)/fvm.cpp \ 26 system/ulib/fvm \
|
/fuchsia/zircon/system/ulib/fs-management/ |
H A D | rules.mk | 13 $(LOCAL_DIR)/fvm.cpp \ 22 system/ulib/fvm \
|
H A D | fvm.cpp | 18 #include <fs-management/fvm.h> 19 #include <fvm/fvm.h> 86 size_t metadata_size = fvm::MetadataSize(disk_size, slice_size); 89 zx_status_t status = fzl::MappedVmo::Create(metadata_size * 2, "fvm-meta", &mvmo); 98 fvm::fvm_t* sb = static_cast<fvm::fvm_t*>(mvmo->GetData()); 104 sb->vpartition_table_size = fvm::kVPartTableLength; 105 sb->allocation_table_size = fvm::AllocTableLength(disk_size, slice_size); 155 size_t metadata_size = fvm [all...] |
/fuchsia/zircon/system/host/fvm/include/fvm/ |
H A D | container.h | 12 #include <fvm/fvm-sparse.h> 22 // valid Container type, or if flags is not zero or a valid combination of fvm::sparse_flags_t. 105 zx_status_t GetPartition(size_t index, fvm::vpart_entry_t** out) const; 106 zx_status_t GetSlice(size_t index, fvm::slice_entry_t** out) const; 115 fvm::fvm_t* SuperBlock() const; 157 fvm::partition_descriptor_t descriptor; 158 fbl::Vector<fvm::extent_descriptor_t> extents; 177 fvm::sparse_image_t image_;
|
/fuchsia/zircon/system/host/fvm/ |
H A D | rules.mk | 14 $(LOCAL_DIR)/container/fvm.cpp \ 24 -Isystem/uapp/fvm/include \ 33 -Isystem/ulib/fvm/include \ 42 system/ulib/fvm.hostlib \
|
H A D | main.cpp | 9 #include <fvm/fvm-lz4.h> 11 #include "fvm/container.h" 16 fprintf(stderr, "usage: fvm [ output_path ] [ command ] [ <flags>* ] [ <input_paths>* ]\n"); 17 fprintf(stderr, "fvm performs host-side FVM and sparse file creation\n"); 25 fprintf(stderr, " verify : Report basic information about sparse/fvm files and run fsck on" 31 fprintf(stderr, " --offset [bytes] - offset at which container begins (fvm only)\n"); 32 fprintf(stderr, " --length [bytes] - length of container within file (fvm only)\n"); 145 flags |= fvm::kSparseFlagLz4; 151 flags |= fvm [all...] |
/fuchsia/zircon/system/uapp/disk-pave/ |
H A D | pave-lib.cpp | 18 #include <fs-management/fvm.h> 21 #include <fvm/fvm-lz4.h> 22 #include <fvm/fvm-sparse.h> 35 #include "fvm/fvm-sparse.h" 36 #include "fvm/fvm.h" 61 *out = strstr(path, "fvm") ! [all...] |
/fuchsia/zircon/system/ulib/fvm/include/fvm/ |
H A D | fvm-lz4.h | 20 #include "fvm/fvm-sparse.h" 28 namespace fvm { namespace 35 fvm::sparse_image_t* Image(); 36 fvm::partition_descriptor_t* Partitions(); 124 } // namespace fvm
|
H A D | fvm-sparse.h | 9 #include "fvm.h" 11 namespace fvm { namespace 83 } // namespace fvm
|
/fuchsia/zircon/system/host/ |
H A D | rules.mk | 13 $(LOCAL_DIR)/fvm/rules.mk \
|
/fuchsia/zircon/system/ulib/fs-test-utils/include/fs-test-utils/ |
H A D | fixture.h | 15 #include <fvm/fvm.h> 78 // If true an fvm will be mounted on the device, and the filesystem will be 82 // Size of each slice of the created fvm. 89 // when a test requires a block_device(and fvm) for tests. 131 // Returns either the block_device path or partition_path if using fvm. 165 // Formats the block device with the required type, creates a fvm, and mounts 169 // Cleans up the block device by reformatting it, destroys the fvm and 190 // When using fvm, the FS will be mounted here.
|