dynamic_fs.go: reflow text.
parent
6a1014cd27
commit
4fc546bdf9
|
@ -17,20 +17,23 @@ import (
|
||||||
"github.com/jacobsa/timeutil"
|
"github.com/jacobsa/timeutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Create a file system that contains 2 files (`age` and `weekday`) and no directories. Every time
|
// Create a file system that contains 2 files (`age` and `weekday`) and no
|
||||||
// the `age` file is opened, its contents are refreshed to show the number of seconds elapsed since
|
// directories. Every time the `age` file is opened, its contents are refreshed
|
||||||
// the file system was created (as opposed to mounted). Every time the `weekday` file is opened, its
|
// to show the number of seconds elapsed since the file system was created (as
|
||||||
// contents are refreshed to reflect the current weekday.
|
// opposed to mounted). Every time the `weekday` file is opened, its contents
|
||||||
|
// are refreshed to reflect the current weekday.
|
||||||
//
|
//
|
||||||
// The contents of both of these files is updated within the filesystem itself, i.e., these changes
|
// The contents of both of these files is updated within the filesystem itself,
|
||||||
// do not go through the kernel. Additionally, file access times are not updated and file size is
|
// i.e., these changes do not go through the kernel. Additionally, file access
|
||||||
// not known in advance and is set to 0. This simulates a filesystem that is backed by a dynamic
|
// times are not updated and file size is not known in advance and is set to 0.
|
||||||
// data source where file metadata is not necessarily known before the file is read. For example,
|
// This simulates a filesystem that is backed by a dynamic data source where
|
||||||
// a filesystem backed by an expensive RPC or by a stream that's generated on the fly might not
|
// file metadata is not necessarily known before the file is read. For example,
|
||||||
// know data size ahead of time.
|
// a filesystem backed by an expensive RPC or by a stream that's generated on
|
||||||
|
// the fly might not know data size ahead of time.
|
||||||
//
|
//
|
||||||
// This implementation depends on direct IO in fuse. Without it, all read operations are suppressed
|
// This implementation depends on direct IO in fuse. Without it, all read
|
||||||
// because the kernel detects that they read beyond the end of the files.
|
// operations are suppressed because the kernel detects that they read beyond
|
||||||
|
// the end of the files.
|
||||||
func NewDynamicFS(clock timeutil.Clock) (server fuse.Server, err error) {
|
func NewDynamicFS(clock timeutil.Clock) (server fuse.Server, err error) {
|
||||||
createTime := clock.Now()
|
createTime := clock.Now()
|
||||||
fs := &dynamicFS{
|
fs := &dynamicFS{
|
||||||
|
|
Loading…
Reference in New Issue