Single instance of files

I know that nowadays we all got huge hard disk drives, but what about a “single instance filter”?

The idea came when I was explaining to my bosses about BFS (and was talking about storage in general) and they loved the idea of a database-like filesystem and all the possibilities.

Ok, ok, media files tend to be substancially different and big, so it wouldn’t be very handy (at least, not at a first sight), but for a huge ammount of small files, source-code editing and other uses (er… file servers) and so would be nice. Again: I know that Haiku isn’t meant to be a server OS neither a development box, but well… it’s a topic, so let’s discuss it :smiley:

As an option (selectable, maybe), would be interesting to have something similar to this? Not exactly a FS filter (add-on or simmilar), maybe a part of the BFS driver or even another idea.

I was thinking about the implementation… it might be something like this:

  1. Equal files. Just create anoter reference to it. Independent attributes and so. The main idea, nothing complicated;
  2. Slightly different files. Two option then: create a copy of the file or just a image with the differences or yet another crazy squeme that someone more clever than might think.

The problem is that this process introduces some wait while manipulating files and BFS is known to be fast and this gap could compromise system responsiveness to applications that need the hard disk contantly or other situations. Well, something to the programming team 8)

Maybe I’m thinking some insanities here but… what you say?


(wrong forum to post, I’m sorry… Second time in a row… I think it should be on the feature request/suggestion box - you could move it to there?)

Hmmmmm? I hope I misundertood what you are suggesting but, as I understand it, everytime we would save a file we would have to scan the entire disk looking for identical or similar files? What about when you are, say, downloading a big file from the internet and you have to way to know how the file is until you download it?

Anyway, your point #1 looks a lot like symlinks (or hard-links that are not currently implemented in BFS but they could be implemented in OpenBFS eventually).