diff options
author | Ayush Ranjan <ayushranjan@google.com> | 2019-07-23 15:50:35 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-07-23 15:51:50 -0700 |
commit | bd7708956f0c9e00e88eff9b35b22eea75e71f5f (patch) | |
tree | 08d110a027a067f202d672d524d09546c68dd6fc /pkg/sentry/fs/ext/disklayout/inode.go | |
parent | 04cbb13ce9b151cf906f42e3f18ce3a875f01f63 (diff) |
ext: Added extent tree building logic.
PiperOrigin-RevId: 259628657
Diffstat (limited to 'pkg/sentry/fs/ext/disklayout/inode.go')
-rw-r--r-- | pkg/sentry/fs/ext/disklayout/inode.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/pkg/sentry/fs/ext/disklayout/inode.go b/pkg/sentry/fs/ext/disklayout/inode.go index b48001910..9ab9a4988 100644 --- a/pkg/sentry/fs/ext/disklayout/inode.go +++ b/pkg/sentry/fs/ext/disklayout/inode.go @@ -107,16 +107,17 @@ type Inode interface { // Flags returns InodeFlags which represents the inode flags. Flags() InodeFlags - // Blocks returns the underlying inode.i_block array. This field is special - // and is used to store various kinds of things depending on the filesystem - // version and inode type. + // Data returns the underlying inode.i_block array as a slice so it's + // modifiable. This field is special and is used to store various kinds of + // things depending on the filesystem version and inode type. The underlying + // field name in Linux is a little misleading. // - In ext2/ext3, it contains the block map. - // - In ext4, it contains the extent tree. + // - In ext4, it contains the extent tree root node. // - For inline files, it contains the file contents. // - For symlinks, it contains the link path (if it fits here). // // See https://www.kernel.org/doc/html/latest/filesystems/ext4/dynamic.html#the-contents-of-inode-i-block. - Blocks() [60]byte + Data() []byte } // Inode flags. This is not comprehensive and flags which were not used in |