linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Snook <csnook@redhat.com>
To: Jack Stone <jack@hawkeye.stone.uk.eu.org>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	akpm@linux-foundation.org, viro@zeniv.linux.org.uk
Subject: Re: Versioning file system
Date: Fri, 15 Jun 2007 18:52:27 -0400	[thread overview]
Message-ID: <4673182B.4090800@redhat.com> (raw)
In-Reply-To: <46731169.2090002@hawkeye.stone.uk.eu.org>

Jack Stone wrote:
> I hope I got the CC list right. Apologies to anyone in didn't include
> and anyone I shouldn't have included.
> 
> The basic idea is to include an idea from VMS that seems to be quite
> useful: version numbers for files.
> 
> The idea is that whenever you modify a file the system saves it to na
> new copy leaving the old file intact. This could be a great advantage
> from many view points:
> 	1) it would be much easier to do package management as the old
> 		version would be automatically saved for a package
> 		management system to deal with.
> 
> 	2) backups would also be easier as all versions of a file
> 		are automatically saved so it could be potentially very
> 		useful for a company or the like.
> 
> There are probably many others but these were the two that I liked best.
> 
> Revision numbers could be specified as follows:
> 	/path/to/file:revision_number
> 
> 
> I think that this can be done without breaking userspace if the default
> was to open the highest revision file if no revision number is
> specified. The userspace tools would need to be updated to take full
> advantage of the new system but if the delimiter between the path and
> revision number were chosen sensibly then the changes to most of
> userspace would be minimal to non-existant.
> 
> Personally, I think that the bulk of the implementation could be in the
> core fs code and the modifications to individual filesystems would be
> minimal. The main implementation ideas I have (however, I am no kernel
> expert =) are adding an extra field to struct file and struct inode
> called int revision (as version is already taken) that would hold the
> number of the file revision being accessed.
> 
> Another problem could be the increased usage of disk space. However if
> only deltas from the first version were stored then this could cut down
> on space, or if this were too slow to open a file then the deltas could
> be off every tenth revision (ie 0,10,20,30... where 0,10,20... are full
> copies of the file).
> 
> There would need to be a tool of some describtion to remove old
> revisions but this should not be a major undertaking as it may be
> something as simple as a new system call. This would have to be careful
> to update any deltas that were affected by the removal of previous
> revisions but that could be taken care of in kernel space.
> 
> Thanks to anyone who stuck with me this far =). I don't know how widely
> useful this may be but that's the reason I posted before trying to code
> anything. I would very much value any contributions even a reasoned NAK
> as I'm still learning how kernel development works (and I would love any
> implementation directions)
> 
> Jack
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

The underlying internal implementation of something like this wouldn't be all 
that hard on many filesystems, but it's the interface that's the problem.  The 
':' character is a perfectly legal filename character, so doing it that way 
would break things.  I think NetApp more or less got the interface right by 
putting a .snapshot directory in each directory, with time-versioned 
subdirectories each containing snapshots of that directory's contents at those 
points in time.  It keeps the backups under the same hierarchy as the original 
files, to avoid permissions headaches, it's accessible over NFS without 
modifying the client at all, and it's hidden just enough to make it hard for 
users to do something stupid.

If you want to do something like this (and it's generally not a bad idea), make 
sure you do it in a way that's not going to change the behavior seen by existing 
applications, and that is accessible to unmodified remote clients.  Hidden 
.snapshot directories are one way, a parallel /backup filesystem could be 
another, whatever.  If you break existing apps, I won't touch it with a ten foot 
pole.

	-- Chris

  parent reply	other threads:[~2007-06-15 22:53 UTC|newest]

Thread overview: 106+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-15 22:23 Versioning file system Jack Stone
2007-06-15 22:38 ` H. Peter Anvin
2007-06-15 22:51   ` alan
2007-06-15 22:59     ` H. Peter Anvin
2007-06-15 23:06       ` alan
2007-06-16  8:11     ` Jack Stone
2007-06-16  9:46       ` Jeffrey V. Merkey
2007-06-16 10:12         ` Jeffrey V. Merkey
2007-06-16 13:15           ` Mark Williamson
2007-06-16 19:57             ` Jeffrey V. Merkey
2007-06-16 16:49           ` Jan Harkes
2007-06-16 20:03             ` Jeffrey V. Merkey
2007-06-16 19:38               ` Jack Stone
2007-06-16 20:08               ` Alan Cox
2007-06-16 21:25                 ` Jeffrey V. Merkey
2007-06-16 20:39               ` Jan Harkes
2007-06-16 20:43                 ` Jack Stone
2007-06-16 22:17                 ` Alan Cox
2007-06-17  2:18                   ` Jeffrey V. Merkey
2007-06-17  2:39                     ` Jeffrey V. Merkey
2007-06-17 22:11                   ` Dale Amon
2007-06-16 21:06               ` Dale Amon
2007-06-16 14:53     ` Jörn Engel
2007-06-18  9:45       ` Andreas Dilger
2007-06-18  9:54         ` Jack Stone
2007-06-18 10:13         ` Jörn Engel
2007-06-18 14:01         ` Theodore Tso
2007-06-18 16:16           ` alan
2007-06-18 17:29             ` Theodore Tso
2007-06-18 17:33               ` Jeremy Allison
2007-06-18 20:30                 ` Theodore Tso
2007-06-18 20:50                   ` J. Bruce Fields
2007-06-18 17:46               ` H. Peter Anvin
2007-07-04 17:32               ` Erik Mouw
2007-07-04 20:47                 ` Theodore Tso
2007-07-05 17:55                   ` Erik Mouw
2007-07-05 13:57                 ` John Stoffel
2007-07-05 14:23                   ` Chris Mason
2007-07-05 17:57                   ` Erik Mouw
2007-06-18 15:32         ` Chris Mason
2007-06-18 23:18           ` Bron Gondwana
2007-09-29 17:44         ` Sorin Faibish
2007-06-18 15:51     ` Bryan Henderson
2007-06-18 16:37       ` Jack Stone
2007-06-18 16:56         ` H. Peter Anvin
2007-06-18 17:56         ` Bryan Henderson
2007-06-19  3:10           ` Kyle Moffett
2007-06-19  7:49             ` Jack Stone
2007-06-19  7:58             ` Bron Gondwana
2007-06-20  2:43               ` Kyle Moffett
2007-06-19  9:09             ` Martin Langhoff
2007-06-19 16:52             ` Jakub Narebski
2007-06-15 22:52 ` Chris Snook [this message]
2007-06-16  8:25   ` Jack Stone
2007-06-19 18:03     ` Chris Snook
2007-06-19 19:06       ` Jack Stone
2007-06-19 20:03         ` Chris Snook
2007-06-19 20:08           ` Jack Stone
2007-06-19 20:15             ` Chris Snook
2007-06-19 20:27               ` Jack Stone
2007-06-19 20:34             ` John Stoffel
2007-06-19 20:38               ` Jack Stone
2007-06-19 20:38               ` Matthew Wilcox
2007-06-19 21:02                 ` John Stoffel
2007-06-19 19:08       ` H. Peter Anvin
2007-06-19 19:12         ` Jack Stone
2007-06-19 19:15           ` H. Peter Anvin
2007-06-19 19:22             ` Jack Stone
2007-06-19 20:10           ` Chris Snook
2007-06-19 20:14             ` Jack Stone
2007-06-19 20:31               ` Chris Snook
2007-06-20  8:34           ` Bernd Petrovitsch
2007-06-19 21:50         ` Alan Cox
2007-06-19 22:07           ` H. Peter Anvin
2007-06-20  8:05             ` Ph. Marek
2007-06-19 20:43       ` Lennart Sorensen
2007-06-19 22:07         ` david
2007-06-19 22:13           ` H. Peter Anvin
2007-06-19 23:07             ` Jan Harkes
2007-06-19 23:12               ` H. Peter Anvin
2007-06-19 22:21           ` Lennart Sorensen
2007-06-19 23:35         ` Bryan Henderson
2007-06-20  0:27           ` Trond Myklebust
2007-06-20  5:00             ` H. Peter Anvin
2007-06-20 17:04             ` Bryan Henderson
2007-06-20 17:10               ` H. Peter Anvin
2007-06-20 17:33               ` Chris Snook
2007-06-15 22:57 ` Kok, Auke
2007-06-15 23:01   ` alan
     [not found] <8wst3-3kh-31@gated-at.bofh.it>
     [not found] ` <8wsCC-3wf-21@gated-at.bofh.it>
     [not found]   ` <8wsW4-3UY-3@gated-at.bofh.it>
     [not found]     ` <8wJal-3KA-1@gated-at.bofh.it>
     [not found]       ` <8xm22-4Ql-1@gated-at.bofh.it>
     [not found]         ` <8xq5G-32l-7@gated-at.bofh.it>
     [not found]           ` <8xs7w-69W-21@gated-at.bofh.it>
2007-06-18 20:54             ` Bodo Eggert
2007-06-18 21:08               ` alan
2007-06-18 21:31                 ` H. Peter Anvin
2007-06-18 21:34                   ` Jeremy Allison
2007-06-18 22:10                   ` Theodore Tso
2007-06-18 22:26                     ` Jörn Engel
2007-06-18 21:24                       ` Brad Boyer
2007-06-19  3:15                         ` Kyle Moffett
2007-06-18 22:34                       ` Jeremy Allison
2007-06-18 22:56                       ` alan
2007-06-19  7:01                       ` Theodore Tso
2007-06-18 22:48                     ` Jeremy Allison
2007-06-18 23:00                       ` alan
2007-06-19  7:05                       ` Theodore Tso
2007-06-19 16:52                         ` Jeremy Allison
2007-06-19 16:56                           ` H. Peter Anvin
2007-06-18 22:47                   ` alan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4673182B.4090800@redhat.com \
    --to=csnook@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=jack@hawkeye.stone.uk.eu.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).