File systems with revision control

Programming, for all ages and all languages.
Post Reply
Antti
Member
Member
Posts: 923
Joined: Thu Jul 05, 2012 5:12 am
Location: Finland

File systems with revision control

Post by Antti »

If using traditional file systems and we write one new byte at the beginning of a file, it is likely that all the file content is shifted one byte forward. There is a huge overhead if the file is big because everything changes. If we stored only the change information, it would not be necessary to change the existing written data. It would be like a revision control system. I have not studied all file systems so I cannot say whether this is already implemented or not. Do you know a file system that does this?
User avatar
bluemoon
Member
Member
Posts: 1761
Joined: Wed Dec 01, 2010 3:41 am
Location: Hong Kong

Re: File systems with revision control

Post by bluemoon »

Antti
Member
Member
Posts: 923
Joined: Thu Jul 05, 2012 5:12 am
Location: Finland

Re: File systems with revision control

Post by Antti »

If looking at a file system like FAT, there could be a simple fix. Now the file content starts at the beginning of a cluster. What if there was an offset that says from where the actual file content starts. In the case of writing one new byte at the beginning, all existing data could be left as they are. Quite nice!
User avatar
bluemoon
Member
Member
Posts: 1761
Joined: Wed Dec 01, 2010 3:41 am
Location: Hong Kong

Re: File systems with revision control

Post by bluemoon »

In that one byte case, you optimized for the write operation, however every time you read that data back you wasted disk IO time for reading junk along with that one byte.

Normal OS assume write once, read many.
User avatar
bwat
Member
Member
Posts: 359
Joined: Fri Jul 03, 2009 6:21 am

Re: File systems with revision control

Post by bwat »

bluemoon wrote:Normal OS assume write once, read many.
Yep, the law of slow creation says that we humans read more than we write and computers are built in our image so to speak.

ClearCase is a version control system that works like a file system, well it looks like a normal file system as far as the user is concerned.

I suppose a versioning file system like VMS along with diff would work quite well.
Every universe of discourse has its logical structure --- S. K. Langer.
User avatar
Thomas
Member
Member
Posts: 281
Joined: Thu Jun 04, 2009 11:12 pm

Re: File systems with revision control

Post by Thomas »

Antti wrote:If using traditional file systems and we write one new byte at the beginning of a file, it is likely that all the file content is shifted one byte forward. There is a huge overhead if the file is big because everything changes. If we stored only the change information, it would not be necessary to change the existing written data. It would be like a revision control system. I have not studied all file systems so I cannot say whether this is already implemented or not. Do you know a file system that does this?
VMS implemented versioning decades ago , VMS FTW ! ( wikipedia link bluemoon post has all info ) . But OpenVMS creates a new file with a different version number , But it is one of the most fantastically designed Operating Systems in the planet , too bad it is getting phased out gradually .


--Thomas
Post Reply