All of lore.kernel.org
 help / color / mirror / Atom feed
* hierarchical, tree-like structure of snapshots
@ 2020-12-30 16:56 john terragon
  2020-12-30 17:03 ` john terragon
  2020-12-30 17:24 ` sys
  0 siblings, 2 replies; 17+ messages in thread
From: john terragon @ 2020-12-30 16:56 UTC (permalink / raw)
  To: Btrfs BTRFS

Hi.
I would like to maintain a tree-like hierarchical structure of
snapshots. Let me try to explain what I mean by that.

Let's say I have a btrfs fs with just one subvolume X, and let's say
that a make a readonly snapshot Y of X. As far as I understand there
is a parent-child relation between Y (the parent) and X the child.

Now let's say that after some time and modifications of X I do another
snapshot Z of X. Now the "temporal" stucture would be Y-Z-X. So X is
now the "child" of Z and Z is now the "child" of Y. The structure is a
path which is a special case of a tree.

Now let's suppose that I want to start modify Y but I still want to be
able to have a parent of Z which I might use as a point of reference
for Z in a
send to somewhere. That is I want to be able to still do a send -p Y Z
to another btrfs filesystem where there is previously sent copy of Y
(which, remember, as of this point has been readonly and I'm just now
wanting to start to modify it).
The only thing I think I can do would be to make a readonly snapshot
Y1 of Y and make Y writeable (so that I can start modify it). At that
point the structure would be

Y1-Y
    \
      Z-X

(yes my ascii art is atrocious...) which is a "proper" tree where Y1
is the root with two children (Y and Z), Z has one child (X) and Y and
X are leaves.
Now, my question is, would Y1 still be usable in send -p Y1 Z, just
like Y was before becoming writeable and being modified? I would say
that Y1 would be just as good as the readonly original Y was as a
parent for Z in a send. But maybe there is some implementation detail
that escapes me and that prevents Y1 to be used as a perfect
replacement for the original Y.
I hope I was clear enough.
Thanks
John

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2021-01-02  9:26 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-30 16:56 hierarchical, tree-like structure of snapshots john terragon
2020-12-30 17:03 ` john terragon
2020-12-30 17:24 ` sys
2020-12-30 17:39   ` john terragon
2020-12-31  7:05     ` Andrei Borzenkov
2020-12-31 10:00       ` Forza
2020-12-31 16:08       ` john terragon
2020-12-31 17:28         ` Zygo Blaxell
2020-12-31 18:19           ` john terragon
2020-12-31 19:42             ` Andrei Borzenkov
2020-12-31 20:48               ` john terragon
2020-12-31 21:36                 ` Zygo Blaxell
2021-01-01  4:54                   ` john terragon
2021-01-01 11:42                   ` Andrei Borzenkov
2021-01-01 20:40                     ` Andrei Borzenkov
2021-01-01 23:11                       ` Zygo Blaxell
2021-01-02  9:25                         ` Andrei Borzenkov

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.