All of lore.kernel.org
 help / color / mirror / Atom feed
From: Edward Shishkin <edward.shishkin@gmail.com>
To: "Dušan Čolić" <dusanc@gmail.com>
Cc: Ivan Shapovalov <intelfx100@gmail.com>,
	reiserfs-devel <reiserfs-devel@vger.kernel.org>
Subject: Re: [ANNOUNCE] Reiser4: Different Transaction Models
Date: Sat, 18 Oct 2014 22:35:58 +0200	[thread overview]
Message-ID: <5442CF2E.3090307@gmail.com> (raw)
In-Reply-To: <CADW=+3mbUUta_hFLecS+7qtoxobfGBVqnVoYESRqNee8Aacwnw@mail.gmail.com>

On 10/18/2014 08:53 PM, Dušan Čolić wrote:
>
> AFAIK other FSes using COW method of allocation don't just mark the 
> old blocks for discarding but offer a feature of snapshots, they keep 
> the old block that were changed after some snapshot point and they can 
> easily transfer through multiple snapshots.
> To implement snapshots in R4 would this have to be done or something more:
> 1. Change allocator logic to mark every changed block not dirty but 
> with last snapshot identifier. If there's no last snapshot mark it 
> dirty. If snapshot is deleted delete its blocks if there aren't any 
> younger snapshots referencing that data;
> 2. Make interface (sys?) to show and manipulate (create, make active, 
> delete, show status) snapshot points.
>


I've worked out this ~6 months ago..
 From my standpoint, the feature of snapshots includes the following 
notions:

1. Chronology is a set H of linearly ordered elements (called 
times-tamps) with
the following operations:
H.create timestamp() — create a new timestamp, add it to H and return it;
H.remove timestamp() — remove a specified timestamp from H;
H.list() — return a list of all timestamps of H.
and the following property: every new timestamp added by H.create 
timestamp() is the
largest element of H at the moment of addition.

2. A (simple) file system volume C is said to possess a feature of (local)
snapshots, iff C, in addition, possesses the following parameters and 
virtual methods:
C.init_snapshots() — create a timestamp in the local chronology to refer 
the initial
"version" of the volume. Return this timestamp;
C.create_snapshot() — create a shapshot of C, store it, and return a 
unique times-
tamp of the snapshot in the local chronology of C;
C.restore_snapshot() — deploy a specified snapshot of C;
C.delete_snapshot() — delete a specified snapshot of C.


> 3. Snapshot points could eventually have some treelike structure and 
> get pretty complex but there had to be made some way to calculate 
> space occupied by every snapshot.
>


First, we should decide what technique we'll choose for our snapshots.

Assume, that this is a fashionable technique of reference counters (like in
ZFS, etc). If so, than we'll need to use the write-anywhere transaction
model (txmod=wa), because overwrites (txmod=journal) will spoil our
snapshots.

Next, we'll need to adjust the technique if lazy reference counters 
(invented
by Ohad Rodeh) to the bottom-top process of the storage tree balancing.

With the upgraded algorithmic base I suggest to implement the read-only
snapshots of simple reiser4 volumes. Once it works, we can easily implement
writable and super-writable snapshots.

Read-only snapshots will require to maintain a list (array) of storage 
tree roots
(AKA chronology defined above). Also we'll need a new format of tree nodes
(node41), which includes the reference counter (8 bytes).

Basically, that's all..


> Is this all possible without disk format change?
>


You don't need to worry about this.
We have worked out the backward compatible development model for Reiser4.
(format 4.X.Y will be released).

Edward.
--
To unsubscribe from this list: send the line "unsubscribe reiserfs-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2014-10-18 20:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-11  1:00 [ANNOUNCE] Reiser4: Different Transaction Models Edward Shishkin
     [not found] ` <CADW=+3mbUUta_hFLecS+7qtoxobfGBVqnVoYESRqNee8Aacwnw@mail.gmail.com>
2014-10-18 20:35   ` Edward Shishkin [this message]

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=5442CF2E.3090307@gmail.com \
    --to=edward.shishkin@gmail.com \
    --cc=dusanc@gmail.com \
    --cc=intelfx100@gmail.com \
    --cc=reiserfs-devel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.