History log of /fuchsia/zircon/system/ulib/memfs/memfs.cpp
Revision Date Author Comments
# c86c2d4d 27-Sep-2018 Yifei Teng <yifeit@google.com>

[memfs] Implement QueryFilesystem FIDL interface.

Allows querying disk pressure.

Test: Unit tested on QEMU.
Change-Id: I512f941b33e215544b84f2b039c30b6c78a4cbde


# 0fb49a38 25-Sep-2018 Yifei Teng <yifeit@google.com>

[memfs] Track and limit number of pages used in a memfs.

Creating/writing to files which exceeds the page limit
will fail with ZX_ERR_NO_SPACE.
After we switch from Ioctl to FIDL interface, memfs can
expose free/used space information.

ZX-2699 #done

Test: unit tests in QEMU.

Change-Id: If9f43aab3c5d6645e9405dade69df71698cfdf11


# e4b452a2 25-Sep-2018 Sean Klein <smklein@google.com>

[memfs] Deprecate the non-vmofile path to CreateFromVmo.

Deprecating this path ensures that VnodeFiles always create
their own VMOs, which simplifies their accounting.

Test: CQ

Change-Id: Ibcf7da9c0839e03e7dfa12ee066f226f3d9ea69a


# 11a637e8 12-Sep-2018 Sean Klein <smklein@google.com>

[fs][fidl] Replaced filesystem ioctls with FIDL.

This patch allows "ioctl" to be removed from the
C++ VFS Vnode interface.

IOCTL_VFS_MOUNT_FS -> Mount()
IOCTL_VFS_UNMOUNT_FS -> Unmount()
IOCTL_VFS_UNMOUNT_NODE -> UnmounteNode()
IOCTL_VFS_QUERY_FS -> QueryFilesystem()
IOCTL_VFS_MOUNT_MKDIR_FS -> MountAndCreate()
IOCTL_VFS_GET_DEVICE_PATH -> GetDevicePath()
IOCTL_VFS_WATCH_DIR -> WatchDir()

Test: fs-management / fs / blobfs / fvm tests, df manually

Change-Id: Iefe8ec251ca6b8f4e4578ceb61bae6dff7a59e3d


# babe1cf5 25-Jul-2018 Adam Barth <abarth@chromium.org>

[sync] Apply C API rubric to libsync

Test: No behavior change
Change-Id: I30a413f7fb5d3f4e741e5204532b82e73595c086


# 379f22fa 06-Jun-2018 Adam Barth <abarth@google.com>

[fdio] Move headers into lib/fdio/...

Change-Id: Ie8d74e716da913bf6e2672c4acf8cd67b4962b7f


# 2bc0d8c7 25-May-2018 Sean Klein <smklein@google.com>

[memfs] Split memfs into C / C++ libraries

For clients which utilize memfs to create
temporary filesystems, export a C ABI shared
library.

Internally, this C library uses a C++ library,
which is exported as source.

Change-Id: I73b95a2a2b8c4870d1b07f5f2f2525f4b0cd4e9f


# 88da61d6 19-Apr-2018 Sean Klein <smklein@google.com>

[memfs] Implement safe filesystem teardown for memfs

ZX-2032 #done
ZX-1576 #comment In Progress

Change-Id: Id5a30b635883c9322ad4838cafdcc770726c91eb


# 3b972eed 18-Apr-2018 Sean Klein <smklein@google.com>

[minfs][blobfs] Re-implement filesystem teardown

Rather than simply "sync + exit process", implement
a fully featured filesystem teardown procedure, capable
of:
- Tearing down all active connections.
- Syncing underlying media using a non-blocking dispatch loop.
- Use closures to signal both mounters and unmounters on
filesystem destruction.

As a consequence of the controlled filesystem teardown
procedure, make the "filesystem" objects in minfs and blobfs
no longer refcounted, to clarify that "Shutdown" is the
single point of destruction after mounting.

ZX-1577 #done
ZX-1923 #done
ZX-1959 #done
ZX-1576 #comment In Progress

Change-Id: I3f8d71af76e391c41c665434baf86a245a7cd223


# 8185e6e7 16-Apr-2018 Adam Barth <abarth@google.com>

[memfs] Add memfs_install_at

This function lets you install a fresh in-memory file system into the
local namespace of the current process at the given path.

Change-Id: Ic3862d7aba956c18ab5c78ab55119822db199a75


# 76df15cb 04-Apr-2018 Jeff Brown <jeffbrown@google.com>

[async] Move async-loop implementation to its own directory.

People keep getting confused by the relationship between async-loop
and the rest of the library. So let's fix it.

This change includes compatibility includes for loop.h to be removed
after upper layers are fixed to use the new paths.

Change-Id: I95c57be533fbd91468275bb2470890a4f10101eb


# fa67e541 08-Mar-2018 James Robinson <jamesr@google.com>

[async] Move async headers to match naming rules

The naming rules for C/C++ header files that are extensively used but
not part of the 'system headers' or 'global headers' as defined by
https://fuchsia.googlesource.com/docs/+/master/development/languages/c-cpp/naming.md#include-paths
states that the include lines for headers in the 'async' library should
be spelled like this:

<lib/async/dispatcher.h>

This moves the header files from system/ulib/async/include/async/dispatcher.h
to system/ulib/async/include/lib/async/dispatcher.h and updates
includes to match.

Change-Id: I85de9f17d67605d59df763be54715a1f2aa9ed77


# 296fb2ac 29-Jan-2018 Adam Barth <abarth@google.com>

[async] Separate fbl dependency from async_t

The C++ FIDL support library in Garnet wants to be able to use async_t
without linking against libfbl. Previously, the C declarations needed
create an async_wait_t were in the same header as code that depended on
fbl, which meant C++ clients of async_wait_t were forced to depend on
fbl.

After this change, the C++ wrappers for libasync interfaces are
separated from the core C declarations.

Change-Id: Ic172911a9dc775d5b5e540a33ce87d2dc218a3d9


# e054b6b4 16-Jan-2018 Sean Klein <smklein@google.com>

[fs] Convert Sync (flush) operation to be asynchronous

Since the "Sync" operation may block for disk to complete
a potentially expensive operation, it is ironically a perfect
candidate for becoming an asynchronous operation.

This patch updates the VFS interface for sync to use closures,
allowing filesystems to defer responding to the requesting
process.

ZX-1308 #done

Change-Id: Ibc00c4963be79ff80504a7dafcffce6d81ccc66f


# ec9928ea 22-Jan-2018 Adam Barth <abarth@google.com>

[syscalls] Rename zx_time_get to zx_clock_get

This change frees up the get() method in for a zx_time_t accessor in the
zx::time class.

Change-Id: Ia4cdc7e3e558df5ba0cfeedb27a442abf4d6f305


# 848f5b11 01-Dec-2017 Sean Klein <smklein@google.com>

[memfs] Add C API for creating /tmp filesystems

Change-Id: I6144c4fac5b6d9894299e90653642949e3747842


# 31b2702b 30-Nov-2017 Sean Klein <smklein@google.com>

[memfs][devmgr] Refactor MemFS into a library

Relocates the MemFS implementation from devmgr and splits it into
different files, depending on which Vnode type is being implemented.

Additionally, removes the unused "ioctl_vfs_mount_bootfs_vmo",
which tightly coupled the MemFS implementation with the devmgr.

Additional changes for ulib/memfs would be useful (splitting
the header, adding tests, adding documentation, etc), but
those changes are not included in this patch so the relocation
can remain simplified.

Change-Id: I66413215a4000565865c6394a09180922d82e16a