ScoutFS Command examples

77 views
Skip to first unread message

chof...@ucar.edu

unread,
Oct 22, 2018, 5:22:26 PM10/22/18
to scoutfs developer email list
I've been able to get ScoutFS running, file system mounted and able to do some basic functionality such as stat, walk-inodes, print counters etc. I'm having a bit of difficulty with scoutfs stage|release. I was wondering if you could give any examples of how to use those commands?

To me those command appear to stage offsets of files to an archive file and then can release them upon request. Is there a recall feature?

Chris

Zach Brown

unread,
Oct 22, 2018, 7:13:04 PM10/22/18
to chof...@ucar.edu, scoutfs developer email list
On Mon, Oct 22, 2018 at 02:22:25PM -0700, chof...@ucar.edu wrote:
> I've been able to get ScoutFS running, file system mounted and able to do some
> basic functionality such as stat, walk-inodes, print counters etc.

Exciting!

> I'm having a
> bit of difficulty with scoutfs stage|release. I was wondering if you could give
> any examples of how to use those commands?

First: sorry these commands are rough. They're only really used by
automated testing. First class archiving agents use the ioctls
directly. (We should still clean up the commands and document them,
sure.)

The scoutfs command usage output gives a rough outline of how each
command is used:

release <path> <vers> <4K block offset> <block count>
mark file region offline and free extents

Releasing frees the mapped file data in the specified block region and
marks those extents offline.

stage <file> <vers> <offset> <count> <archive file>
write archive file contents to offline region

Staging takes the contents from the specified archive file at offset 0
and writes that into the byte region specified in the stage command
arguments. Even though it takes byte offsets they still need to be
block aligned or end up exactly on the non-block aligned final size of
the file.

The version in both command arguments need to match the data_version in
the scoutfs inode. This helps protect against getting data out of sync
between the archive file store and the live file system.

Theres lots of strange (interesting?) history that lead to the asymmetry
of release taking blocks and stage taking bytes. I imagine we'll bring
them back in sync before finalizing the interfaces but it hasn't been a
priority.

> To me those command appear to stage offsets of files to an archive file and
> then can release them upon request. Is there a recall feature?

Close, yeah, though we use the terms slightly differently.

The release ioctl frees the file contents and marks them offline after
the file contents have already been read and stored in the archive via
whatever means.

The stage ioctl writes file contents back into allocated extents and
marks them online again so they can be read from the file system.

The scoutfs commands that wrap the ioctls let us test just the ioctls
that would be part of a larger software stack -- the commands themselves
aren't intended to be part of a robust archiving software stack.

- z
Reply all
Reply to author
Forward
0 new messages