diff options
author | Ayush Ranjan <ayushranjan@google.com> | 2019-07-17 14:46:57 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-07-17 14:48:04 -0700 |
commit | 8e3e021aca89427381af75a47f19b1fe78bf132e (patch) | |
tree | 030a8863bf5dace84d5aac3ea8e5063645837893 /pkg/sentry/fs/ext/disklayout/superblock.go | |
parent | 609cd91e3fc3359af263b52f494116ddbc800f77 (diff) |
ext: Filesystem init implementation.
PiperOrigin-RevId: 258645957
Diffstat (limited to 'pkg/sentry/fs/ext/disklayout/superblock.go')
-rw-r--r-- | pkg/sentry/fs/ext/disklayout/superblock.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pkg/sentry/fs/ext/disklayout/superblock.go b/pkg/sentry/fs/ext/disklayout/superblock.go index e4b8f46fb..7a337a5e0 100644 --- a/pkg/sentry/fs/ext/disklayout/superblock.go +++ b/pkg/sentry/fs/ext/disklayout/superblock.go @@ -14,6 +14,11 @@ package disklayout +const ( + // SbOffset is the absolute offset at which the superblock is placed. + SbOffset = 1024 +) + // SuperBlock should be implemented by structs representing the ext superblock. // The superblock holds a lot of information about the enclosing filesystem. // This interface aims to provide access methods to important information held @@ -57,8 +62,6 @@ type SuperBlock interface { // // If the filesystem has 1kb data blocks then this should return 1. For all // other configurations, this typically returns 0. - // - // The first block group descriptor is in (FirstDataBlock() + 1)th block. FirstDataBlock() uint32 // BlockSize returns the size of one data block in this filesystem. @@ -128,7 +131,7 @@ type SuperBlock interface { } // SbRevision is the type for superblock revisions. -type SbRevision int +type SbRevision uint32 // Super block revisions. const ( |