SFS: Difference between revisions

From OSDev Wiki
Jump to navigation Jump to search
(21 intermediate revisions by 14 users not shown)
Line 1: Line 1:
{{(削除) Stub (削除ここまで)}}
{{(追記) Filesystems (追記ここまで)}}
(削除) SFS is a filesystem by Brendan Trotter, designed to be very easy to implement. It has a minimal set of features. Officially it is still in its draft stage, but hasn't changed over past year. (削除ここまで)


(削除) == External Links == (削除ここまで)
(追記) There are several filesystems existing that are abbreviated '''SFS''', but the one discussed here is the '''Simple File System''' by Brendan Trotter, designed to be very easy to implement (追記ここまで). (追記) It has a minimal set of features (追記ここまで). (追記) Officially it is still in its draft stage, but hasn't changed for some time (追記ここまで).
(削除) * [http://bcos (削除ここまで).(削除) hopto (削除ここまで).(削除) org/sfs.html official specification] (削除ここまで)
(削除) * [http://dimensionalrift.homelinux (削除ここまで).(削除) net/combuster/vdisk/ A windows utility for SFS images] (削除ここまで)


== Threads ==
(追記) SFS is designed to be used as a simple filesystem for use on floppy disks and other removable media to transfer data between computers. (追記ここまで)
(追記) == Format Details == (追記ここまで)
(追記) === Layout === (追記ここまで)
(追記) There are five key areas in a SimpleFS partition: The Super-block, Reserved Area, Data Area, Free Area and Index Area. (追記ここまで)
(追記) === Super-block === (追記ここまで)
(追記) The Super-block is located in the first sector of a disk or partition. For floppy disks that means it is contained in the boot sector. The superblock contains structural information about the partition. The SFS data of the super-block is located at offset 0x0194 and is 58 bytes long, leaving space for boot code and a partition table. (追記ここまで)
(追記) {| class="wikitable" (追記ここまで)
(追記) |- (追記ここまで)
(追記) ! Offset (追記ここまで)
(追記) ! Size (追記ここまで)
(追記) ! Contents (追記ここまで)
(追記) |- (追記ここまで)
(追記) | 0x0194 (追記ここまで)
(追記) | 8 (追記ここまで)
(追記) | Last alteration time of super-block values (Data size or Index Size) (追記ここまで)
(追記) |- (追記ここまで)
(追記) | 0x019C (追記ここまで)
(追記) | 8 (追記ここまで)
(追記) | Size of Data Area in blocks (追記ここまで)
(追記) |- (追記ここまで)
(追記) | 0x01A4 (追記ここまで)
(追記) | 8 (追記ここまで)
(追記) | Size of Index Area in <u>bytes</u> (追記ここまで)
(追記) |- (追記ここまで)
(追記) | 0x01AC (追記ここまで)
(追記) | 3 (追記ここまで)
(追記) | Magic number (0x534653 'SFS') (追記ここまで)
(追記) |- (追記ここまで)
(追記) | 0x01AF (追記ここまで)
(追記) | 1 (追記ここまで)
(追記) | Version number in BCD (0x10 = 1.0) (追記ここまで)
(追記) |- (追記ここまで)
(追記) | 0x01B0 (追記ここまで)
(追記) | 8 (追記ここまで)
(追記) | Total number of blocks in volume (追記ここまで)
(追記) |- (追記ここまで)
(追記) | 0x01B8 (追記ここまで)
(追記) | 4 (追記ここまで)
(追記) | Size of Reserved Area and Super-block in blocks (追記ここまで)
(追記) |- (追記ここまで)
(追記) | 0x01BC (追記ここまで)
(追記) | 1 (追記ここまで)
(追記) | Block size given by ''BytesPerBlock = 2<sup>(BlockSize + 7)</sup>'' (追記ここまで)
(追記) |- (追記ここまで)
(追記) | 0x01BD (追記ここまで)
(追記) | 1 (追記ここまで)
(追記) | Checksum of bytes between 0x1AC and 0x1BC such that the lower 8 bits are zero (追記ここまで)
(追記) |} (追記ここまで)
(追記) === Reserved Area === (追記ここまで)
(追記) The reserved area is a segment of disk that is untouched by drivers conforming to the current specification. This allows ancillary information or data such as a kernel image or a small EXT2/FAT partition to be stored on the same volume. (追記ここまで)
(追記) === Data Area === (追記ここまで)
(追記) The Data Area contains file data and starts at the end of the Reserved Area. The files in the data area can only occupy sequential areas as there is no way of linking chains of blocks for a single file. (追記ここまで)
(追記) === Free Area === (追記ここまで)
(追記) The Free Area is the currently unused space in the volume that can be used by either the Data Area growing downwards or the Index Area growing upwards. (追記ここまで)
(追記) === Index Area === (追記ここまで)
(追記) ''Note: Because the Index Area is situated at the end of the disk the offsets are referred to in an opposite fashion to what is typical. So, the first entry is actually the closest to the end of the disk'' (追記ここまで)
(追記) The Index Area contains the tracking information for the Data Area and is made of a variable number of 64 byte entries extending from the end of the volume towards the beginning. (追記ここまで)
(追記) The entries in the Index Area follow a few simple rules. (追記ここまで)
(追記) The "first" (at the end of the disk) entry must be a Volume Identifier entry, this is used to detect if a disk has been swapped when auto-detection is unavailable. The "last" (closest to the start of the disk) must be a Starting Marker entry, this is used for file-system recovery if the super-block is damaged. (追記ここまで)
(追記) Continuation entries are used to allow longer file names than can be placed in a single directory or file entry and immediately precede their respective file/directory entry. (追記ここまで)
(追記) === Embedding === (追記ここまで)
(追記) The GUID currently in use for GPT partitions is 4ebf0e06-11bf-450c-1a06-534653534653 (追記ここまで)
(追記) == Information Formatting == (追記ここまで)
(追記) === Timestamps === (追記ここまで)
(追記) All SFS timestamps are 64-bit signed values that count the number of 1/65536<sup>ths</sup> of a second before or after the UNIX Epoch (1<sup>st</sup> of January 1970) and are in UTC. (追記ここまで)
(追記) === Names === (追記ここまで)
(追記) Name Strings in SFS are in UTF-8 and must be null terminated. Characters can include any character in the ranges 0x20-0x7E and 0xA1-0xFF excluding a double quote ("), asterisk (*), colon (:), less than or greater then sign (< or >), question mark (?) or backward slash (\). The forwards slash (/) is admissible only as a path separator. (追記ここまで)
(追記) Note that UTF-8 means that the characters above 0x80 take up multiple bytes rather than one, which could confuse ASCII based systems. (追記ここまで)
(追記) == See Also == (追記ここまで)
(追記) = (追記ここまで)== Threads (追記) = (追記ここまで)==
* [[Topic:11833|SFS Review thread]]
* [[Topic:11833|SFS Review thread]]
(追記) === External Links === (追記ここまで)
(追記) * [https://www.d-rift.nl/combuster/vdisk/sfs.html Official Specification] ([https://web.archive.org/web/20090923015653/http://dimensionalrift.homelinux.net/combuster/vdisk/sfs.html web.archive.org]) (追記ここまで)
(追記) * [https://www.d-rift.nl/combuster/vdisk/ A windows utility for SFS images] ([https://web.archive.org/web/20111111113756/http://dimensionalrift.homelinux.net/combuster/vdisk/ web.archive.org]) (追記ここまで)
(追記) * [https://www.fysnet.net/blog/files/sfs.pdf Ben Lunt's specification] (updated 13 Jan 2022) (not 100% compatible with the original, has more features) (version 1.10) (追記ここまで)


[[Category:Filesystems]]
[[Category:Filesystems]]
(追記) [[de:SFS]] (追記ここまで)

Latest revision as of 01:49, 24 January 2022

Filesystems
Virtual Filesystems

VFS

Disk Filesystems
CD/DVD Filesystems
Network Filesystems
Flash Filesystems

There are several filesystems existing that are abbreviated SFS, but the one discussed here is the Simple File System by Brendan Trotter, designed to be very easy to implement. It has a minimal set of features. Officially it is still in its draft stage, but hasn't changed for some time.

SFS is designed to be used as a simple filesystem for use on floppy disks and other removable media to transfer data between computers.

Format Details

Layout

There are five key areas in a SimpleFS partition: The Super-block, Reserved Area, Data Area, Free Area and Index Area.

Super-block

The Super-block is located in the first sector of a disk or partition. For floppy disks that means it is contained in the boot sector. The superblock contains structural information about the partition. The SFS data of the super-block is located at offset 0x0194 and is 58 bytes long, leaving space for boot code and a partition table.

Offset Size Contents
0x0194 8 Last alteration time of super-block values (Data size or Index Size)
0x019C 8 Size of Data Area in blocks
0x01A4 8 Size of Index Area in bytes
0x01AC 3 Magic number (0x534653 'SFS')
0x01AF 1 Version number in BCD (0x10 = 1.0)
0x01B0 8 Total number of blocks in volume
0x01B8 4 Size of Reserved Area and Super-block in blocks
0x01BC 1 Block size given by BytesPerBlock = 2(BlockSize + 7)
0x01BD 1 Checksum of bytes between 0x1AC and 0x1BC such that the lower 8 bits are zero

Reserved Area

The reserved area is a segment of disk that is untouched by drivers conforming to the current specification. This allows ancillary information or data such as a kernel image or a small EXT2/FAT partition to be stored on the same volume.

Data Area

The Data Area contains file data and starts at the end of the Reserved Area. The files in the data area can only occupy sequential areas as there is no way of linking chains of blocks for a single file.

Free Area

The Free Area is the currently unused space in the volume that can be used by either the Data Area growing downwards or the Index Area growing upwards.

Index Area

Note: Because the Index Area is situated at the end of the disk the offsets are referred to in an opposite fashion to what is typical. So, the first entry is actually the closest to the end of the disk

The Index Area contains the tracking information for the Data Area and is made of a variable number of 64 byte entries extending from the end of the volume towards the beginning. The entries in the Index Area follow a few simple rules. The "first" (at the end of the disk) entry must be a Volume Identifier entry, this is used to detect if a disk has been swapped when auto-detection is unavailable. The "last" (closest to the start of the disk) must be a Starting Marker entry, this is used for file-system recovery if the super-block is damaged. Continuation entries are used to allow longer file names than can be placed in a single directory or file entry and immediately precede their respective file/directory entry.

Embedding

The GUID currently in use for GPT partitions is 4ebf0e06-11bf-450c-1a06-534653534653

Information Formatting

Timestamps

All SFS timestamps are 64-bit signed values that count the number of 1/65536ths of a second before or after the UNIX Epoch (1st of January 1970) and are in UTC.

Names

Name Strings in SFS are in UTF-8 and must be null terminated. Characters can include any character in the ranges 0x20-0x7E and 0xA1-0xFF excluding a double quote ("), asterisk (*), colon (:), less than or greater then sign (< or >), question mark (?) or backward slash (\). The forwards slash (/) is admissible only as a path separator. Note that UTF-8 means that the characters above 0x80 take up multiple bytes rather than one, which could confuse ASCII based systems.

See Also

Threads

External Links

Retrieved from "https://wiki.osdev.org/index.php?title=SFS&oldid=26882"