History log of /fuchsia/zircon/system/host/fvm/container/fvm.cpp
Revision Date Author Comments
# cb60be34 21-Sep-2018 Christopher R. Johnson <crjohns@google.com>

[host] Remove calls to fbl::AutoCall

fbl::AutoCall is deprecated in host/userspace in favor of fit::defer.

Calls to fbl::AutoCall could not be removed from kernel or system code
since they may not have the C++ standard library included.

TEST=runtests
CP-146: #progress

Change-Id: Ief2f908430c17851f9f40e4bbabbe122005033d6


# f854faff 24-Jun-2018 Joshua Seaton <joshuaseaton@google.com>

[fvm][host] Fix bugs in fvm host test.

Running with ASan caught 2 bugs:
-using delete to deallocate SparseReader::buffer::data, which was
allocated with new[]
-writing to FvmContainer::metadata_ after it was deallocated.

Tested: fvm host test now passes when built with ASan.

Change-Id: I7e66663369f8e417a807fca19ab0a793045a12e6


# 4b759878 08-Jun-2018 Sean Klein <smklein@google.com>

[fvm] Avoid using bitfield in on-disk structures.

Additionally, add documentation, and distinguish
between PSLICE_UNALLOCATED and FVM_SLICE_ENTRY_FREE
more clearly.

Change-Id: If36baf7383f10712d4ca47107392e5a18f82d9b9


# 8831d90c 21-Mar-2018 Aaron Green <aarongreen@google.com>

[fvm-host] Convert compress enum to flags

This CL replaces the compress_type_t to a uint32_t flags field.
This allows other values to be plumbed through, like one for
fvm::kSparseFlagZxcrypt.

Change-Id: I030a749947f5a02402ddf2b9fbe528ee98900911


# d5e585c5 30-Apr-2018 Sean Klein <smklein@google.com>

[host][fvm] Force FvmContainer to zero-fill extents

The value "zero_fill" was being used uninitialized in "vslice_info",
since the call to "GetVsliceRange" did not set it.

zero-fill the remainder of the extent, and zero-initializing
"vslice_info" to (at bare minimum) produce consistent results for unset
fields.

ZX-2073 #done

Change-Id: I3d7ae218ac491cc2c328b67381fa4367b9dceaee


# 7a760fab 30-Apr-2018 Sean Klein <smklein@google.com>

[host][fvm] Only re-use an existing FVM image with a valid header

The following commands create a valid Fuchsia image:

$ truncate -s 4294967296 blk.bin
$ fx make-fuchsia-vol -blob blobfs.img blk.bin

But these do not:

$ tr '\0' '\xFF' < /dev/zero | dd iflag=fullblock bs=64K count=64K of=blk.bin
$ fx make-fuchsia-vol -blob blobfs.img blk.bin

Because the fvm/container host-side tools made the assumption
that "if a target disk/file already exists, it is a valid FVM image".

This assumption is not always valid; insert metadata-validation
code before re-using the existing FVM.

ZX-2073 #comment In Progress

Change-Id: I95c734119b26d8ea7a13d9e41c0c7085c174c727


# 32f41406 30-Mar-2018 Tricia Landers <planders@google.com>

[fvm] Read slice size from existing container

ZX-1915 #done

Change-Id: I3b2f50ae51426859ceaba8c81661e055a13505f4


# 2f82cc18 20-Mar-2018 Tricia Landers <planders@google.com>

[fvm] Add extend command for FVM container

Change-Id: I4d3d0cefa949a519a0979fe141feb3d2d7265d39


# 1b31c350 30-Jan-2018 Tricia Landers <planders@google.com>

[sparse] Add blobstore/minfs to sparse file with generic type

Additionally update the fvm-host tests to test this type

Change-Id: I33fab26f7ced5035fe714db6be66161411e4e7ae


# b6a0033f 05-Jan-2018 Sean Klein <smklein@google.com>

[minfs][blobstore][fvm] Relocate host-side tools to /host

Change-Id: I21e3f17a7dd926dc5038af85edc0e2e016d220bd