Filesystem idea

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
Post Reply
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Filesystem idea

Post by JamesM »

I was digging around in the text file graveyard that is my home directory and found this - I thought I'd post it here to get people's thoughts. I particularly like the first idea - I think the second idea could be of merit too though.

---------------------------------------------

Idea for filesystem design.

POSIX-style, but add a '?' operator to files and directories, as a
'union' operator.

Union Directories
=================

'?' applied to directories (without anything as a suffix) would list
all directories that make up this one (union directories, as in
plan9):

$ ls -l /usr/include/?
lrw-r--r-- 1 -> /usr/include/
lrw-r--r-- 2 -> /usr/local/include/

So that directory actually consists of it's contents *plus* the
contents from /usr/local/include.

/usr/local/include/ can also be accessed by:

$ cd /usr/include/?2

Files and metadata
==================

'?' applied to files would retrieve files works in a similar way. On
most files ls /file? will return nothing (empty set). One can,
however, define regions within a file that appear as nested files. For
example, the html file:

<html>
<head>
<title>This is a title</title>
</head>
</html>

Could have a region 'title' which consists of 'This is a title'
(offset of 20, length of 15).

Likewise:

$ ls file.html?
title body head

So a process could obtain just the 'body' content by opening:
fopen("file.html?body", "r");

Obviously these regions have to be read-only, but this makes adding
meta-data much much easier.
DeletedAccount
Member
Member
Posts: 566
Joined: Tue Jun 20, 2006 9:17 am

Filesystem ..

Post by DeletedAccount »

Man this seems to be very unconventional ... May becoz of my dos roots ... Also it seems to be very difficult to implement ???

Also the directory entires contain more information than necessary :?:

I think the union operator is better implemented as a seperate program rather than implementing it in the file system ..
Post Reply