Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Simpler FileSystem Interface proposal

Name: Old !r4lisp/Hag 2012-06-19 11:34

POSIX-style filesystems suffer from backwards compatibility. The tree interface as well as symbolic links pose are solid performance challenges and pathnames can be very cumbersome to manipulate for no real benefits. Banks and files form the basis to SFSI as opposed to the directories, files and symbolic links from the traditional model. Our design goal is to simplify and flatten as much as possible the current interface.
A bank is defined to be an array of files. Bank and files have  attributes and permissions similar to those defined by POSIX. A bank can be located in a filesystem by number or by name. A file can be located in a bank by number or by name. Banks can't contain other banks and are intended to represent mountpoints or collections of related files.
We encourage system designers to standardise bank numbers for specific purposes as with the system directories of traditional filesystems. Systems should provide tools to create mountpoints and other kinds of virtual banks. We expect programs to use relative file numbers within a bank and users to use file and bank names.
POSIX-based archiver programs must deflate files in such a way that files in the same directory use contiguous numbers within a bank and have their numbers ordered depending on the Unicode code points which form their names, with lower code points corresponding to lower numbers and the first characters being assigned a higher weight. This behaviour allows bundles of files to keep relative references between themselves

C entry points:
int sfsiBindBank(unsigned int id, int flags);
Binds the bank with number id as current and returns 1 on success, 0 on error.

int sfsiBindBankByName(const char* id, int flags);
Binds the bank with name id as current and returns 1 on success, 0 on error.

int sfsiOpenFile(unsigned int id, int flags);
Opens the file with number id in the current bank and returns a POSIX file descriptor if successful or -1 otherwise.

int sfsiOpenFileByName(const char* id, int flags);
Opens the file with name id in the current bank and returns a POSIX file descriptor if successful or -1 otherwise.

int sfsiFileBank(int fd);
Returns the bank which contains the file described by the POSIX file descriptor fd.

int sfsiFileNumber(int fd);
Returns the number of the file described by the POSIX file descriptor fd within its bank.

[code]int sfsiProcessFileNumber(void);[code]
Returns the number of the file which contains the process image being run by the caller thread within its bank, or 0 if no process image corresponds to the caller thread.

[b]flags[/b] is one of [b]O_RDONLY[/b], [b]O_WRONLY[/b] or [b]O_RDWR[/b] which request opening the file or bank read-only, write-only or read/write, respectively, bitwise or'd with zero or more of the following POSIX flags: [b]O_CREAT[/b], [b]O_EXCL[/b], [b]O_TRUNC[/b], [b]O_APPEND[/b], [b]O_NONBLOCK[/b], [b]O_SYNC[/b], [b]O_DIRECT[/b], [b]O_ASYNC[/b].

Name: Anonymous 2012-06-19 11:37

Errata:
— In the first paragraph, remove the word “pose”.
— In the declarations for sfsiFileBank and sfsiFileNumber, replace the int return type with unsigned int.

Name: Anonymous 2012-06-19 11:37

data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAlgCWAAD//gBCRmlsZSBzb3VyY2U6IGh0dHA6Ly9jb21tb25zLndpa2ltZWRpYS5vcmcvd2lraS9GaWxlOkhpbW1sZXI3LmpwZ//bAEMABgQFBgUEBgYFBgcHBggKEAoKCQkKFA4PDBAXFBgYFxQWFhodJR8aGyMcFhYgLCAjJicpKikZHy0wLSgwJSgpKP/AAAsIAPAAqgEBEQD/xAAcAAABBQEBAQAAAAAAAAAAAAAEAgMFBgcBAAj/xAA/EAACAQMDAwIEAwYFAgUFAAABAgMABBEFEiEGMUETUQciYXEygZEUQlKhscEVIzPh8DTRCBZTYnIXJCWSov/aAAgBAQAAPwCuQhDne4C/YmnQY4ycKH+o7V1z8uGfOR2ApKyeqrRkjY3zA4oYoyF19MsVGRj296UjIHygIYr3/KvBiUA59+TQzajbQn/OdMgchTnFRr6zGflWNmAyT481ybX...zMqkZyacm6iu5o0E0u9FOdpA71DXU7Tyszc+3GBihpSMg+RwaGOCc8Z8UZpVqt3eQxMGZWcAgDxWjP1Bp2jWD29jYq0jg/Io4znH68VmtzcSSXErj5dzk42dsmi9OlFvf205B3JICCvGa+itKcvZIQwJYAd+TUhKhkiKqx29848122mOwJN/qBdp8HIpRlYuF2lSDjHsKc3sJRk7bdm2jmqv8AES2/bdAuEaMlgCEOM/1rOvg2jXPUi6YUJVn9WRs8bU5IP51svVdypnMKybZATjceD9Ppx5qtwmOQzGNvkXG/dnJJHYGpeyjX1SyW6BgMIAc5GOPtUB151jDoGjRCMD/FrhMxwEhgh/iY+QD296wd3mvLyS4u5GkllO93buxpUKkFMPgZxk807vIxtIIzx7UlS23axIwT2pC/i3ZxgcmkyAkkkDGfFDlTnt/OpLQUkN6giUlgRgr4+tXBNOjmUftJZJmkJXfwAc4OKBntNNWeRWeUsGIJC9zmv//Z

Name: Anonymous 2012-06-19 11:45

I don't want to read that crap. Look at really good API and use it:
http://haiku-os.org/legacy-docs/bebook/TheStorageKit_Overview.html

Name: Old !r4lisp/Hag 2012-06-19 11:49

>>4
We think tree-based filesystems don't fit the problem of managing files in the 21th century. We are saddened by your ignoring of our suggestion.

Name: tdavis 2012-06-19 11:58

God says: BUMP

Name: FrozenVoid 2012-06-19 12:01

This looks very promising! I can't wait for an implementation and benchmarks!





orbis terrarum delenda est

Name: Anonymous 2012-06-19 12:05

banpu pantsu

Name: tdavis 2012-06-19 12:07

If you put your OS outthere, the Linux cultists will attack you ruthlessly unless it's unix.

Linux cultists are more ruthless then Microsoft -- huge hypocrits.

Are you going to trust reviews? people want Windows or Linux, a Windows wannabe.

LoseThos is a toy environment for programming, but it's a damn good toy.

Thanks for not stealing my ideas, I suppose. You're welcome to them, but nobody likes the dirty feeling of stealing -- what would be the fun.

Open your mind to new things--we've stagnated in the 1970s. Source code is till just ASCII!! If you don't write your own compiler your chances for anything original go way down. You will reinvent poorly.

Name: Anonymous 2012-06-19 12:12

Unspammed thread.

Name: Old !r4lisp/Hag 2012-06-19 12:13

Please check our proposal.

Name: Anonymous 2012-06-19 13:47

POSIX is gay. Win32 rules.

Name: Anonymous 2012-06-19 14:00

>>1
This looks cool, but it's not reenterant. Specifiy that sfsiBind* is reenterant by stating that it uses thread-local storage for holding the current bank context.

Also, unsigned int is only guaranteed to be 16-bit under the Standard C specifications, so you should use unsigned long.

Name: Anonymous 2012-06-19 14:27

Can the banks have names too or is it all numbers?

Name: Anonymous 2012-06-19 14:45

Need functions to be able to enumerate banks and files.

Name: Anonymous 2012-06-19 14:47

C++ is a good language. It is not a perfect language because it inherits from C. C is a flawed language where many things are left undefined. C is an ancient artifact that serves no purpose outside of the domain of kernel design. Because of the improvements made upon C to form C++, beginning programmers and veteran programmers alike may be led astray, thinking that modern C usage is a good idea. It is a mistake to believe the success of C++ justifies the continued use and popularity of C. Just because C++ is successful does not mean the language it has inherited from is of high quality.

Name: Anonymous 2012-06-19 19:32

it's still C, which is shit. C++ is shit too.

Name: Cudder !MhMRSATORI!FBeUS42x4uM+kgp 2012-06-20 5:15

This reminds me of pre-Multics mainframe OS filesystems, the CP/M one, and those on some embedded devices still in production today.

All of those have one thing in common: no need to manage hundreds of thousands of files.

Name: =*=F=R=O=Z=E=N==V=O=I=D=*= !frozEn/KIg 2012-06-20 6:52

>>7
Don't impersonate me again. EVER

Name: Anonymous 2012-06-20 7:39

impersonate my anus

Name: My anus 2012-06-20 8:14

Don't impersonate me again. EVER

Name: Anonymous 2012-06-20 8:15

impersonate my dubs

Name: Anonymous 2012-06-21 12:55

can you provide a better explanation? how are the sectors used, updated, metadata, the original post was pretty confusing.

Name: Anonymous 2012-06-21 13:18

Name: Anonymous 2012-06-22 1:06

>>24
'>no one accepted my friend requests
'>serves them right

Name: Anonymous 2012-06-22 12:43

>>25
back to /g/

>>1
Even though almost everyone seem to be finding it nice, I don't see a single advantage of this approach over tree-based structuring. Please explain it to me as if I was 12.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List