linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* btrfs receive incremental stream on another uuid
@ 2018-09-18 17:56 Gervais, Francois
  2018-09-18 18:10 ` Andrei Borzenkov
  0 siblings, 1 reply; 5+ messages in thread
From: Gervais, Francois @ 2018-09-18 17:56 UTC (permalink / raw)
  To: linux-btrfs


Hi,

I'm trying to apply a btrfs send diff (done through -p) to another subvolume with the same content as the proper parent but with a different uuid.

I looked through btrfs receive and I get the feeling that this is not possible right now.

I'm thinking of adding a -p option to btrfs receive which could override the parent information from the stream.

Would that make sense?

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

* Re: btrfs receive incremental stream on another uuid
  2018-09-18 17:56 btrfs receive incremental stream on another uuid Gervais, Francois
@ 2018-09-18 18:10 ` Andrei Borzenkov
  2018-09-18 18:28   ` Gervais, Francois
  0 siblings, 1 reply; 5+ messages in thread
From: Andrei Borzenkov @ 2018-09-18 18:10 UTC (permalink / raw)
  To: Gervais, Francois, linux-btrfs

18.09.2018 20:56, Gervais, Francois пишет:
> 
> Hi,
> 
> I'm trying to apply a btrfs send diff (done through -p) to another subvolume with the same content as the proper parent but with a different uuid.
> 
> I looked through btrfs receive and I get the feeling that this is not possible right now.
> 
> I'm thinking of adding a -p option to btrfs receive which could override the parent information from the stream.
> 
> Would that make sense?
> 
No. It is already possible (by setting received UUID); it should not be
made too open to easy abuse.

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

* Re: btrfs receive incremental stream on another uuid
  2018-09-18 18:10 ` Andrei Borzenkov
@ 2018-09-18 18:28   ` Gervais, Francois
  2018-09-18 18:40     ` Andrei Borzenkov
  2018-09-18 18:42     ` Hugo Mills
  0 siblings, 2 replies; 5+ messages in thread
From: Gervais, Francois @ 2018-09-18 18:28 UTC (permalink / raw)
  To: Andrei Borzenkov, linux-btrfs

> No. It is already possible (by setting received UUID); it should not be
made too open to easy abuse.


Do you mean edit the UUID in the byte stream before btrfs receive?

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

* Re: btrfs receive incremental stream on another uuid
  2018-09-18 18:28   ` Gervais, Francois
@ 2018-09-18 18:40     ` Andrei Borzenkov
  2018-09-18 18:42     ` Hugo Mills
  1 sibling, 0 replies; 5+ messages in thread
From: Andrei Borzenkov @ 2018-09-18 18:40 UTC (permalink / raw)
  To: Gervais, Francois, linux-btrfs

18.09.2018 21:28, Gervais, Francois пишет:
>> No. It is already possible (by setting received UUID); it should not be
> made too open to easy abuse.
> 
> 
> Do you mean edit the UUID in the byte stream before btrfs receive?
> 
No, I mean setting received UUID on subvolume. Unfortunately, it is
possible. Fortunately, it is not trivially done.

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

* Re: btrfs receive incremental stream on another uuid
  2018-09-18 18:28   ` Gervais, Francois
  2018-09-18 18:40     ` Andrei Borzenkov
@ 2018-09-18 18:42     ` Hugo Mills
  1 sibling, 0 replies; 5+ messages in thread
From: Hugo Mills @ 2018-09-18 18:42 UTC (permalink / raw)
  To: Gervais, Francois; +Cc: Andrei Borzenkov, linux-btrfs

[-- Attachment #1: Type: text/plain, Size: 1351 bytes --]

On Tue, Sep 18, 2018 at 06:28:37PM +0000, Gervais, Francois wrote:
> > No. It is already possible (by setting received UUID); it should not be
> made too open to easy abuse.
> 
> 
> Do you mean edit the UUID in the byte stream before btrfs receive?

   No, there's an ioctl to change the received UUID of a
subvolume. It's used by receive, at the very end of the receive
operation.

   Messing around in this area is basically a recipe for ending up
with a half-completed send/receive full of broken data because the
receiving subvolume isn't quite as identical as you thought. It
enforces the rules for a reason.

   Now, it's possible to modify the send stream and the logic around
it a bit to support a number of additional modes of operation
(bidirectional send, for example), but that's queued up waiting for
(a) a definitive list of send stream format changes, and (b) David's
bandwidth to put them together in one patch set.

   If you want to see more on the underlying UUID model, and how it
could be (ab)used and modified, there's a write-up here, in a thread
on pretty much exactly the same proposal that you've just made:

https://www.spinics.net/lists/linux-btrfs/msg44089.html

   Hugo.

-- 
Hugo Mills             | Great films about cricket: Monster's No-Ball
hugo@... carfax.org.uk |
http://carfax.org.uk/  |
PGP: E2AB1DE4          |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2018-09-19  0:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-18 17:56 btrfs receive incremental stream on another uuid Gervais, Francois
2018-09-18 18:10 ` Andrei Borzenkov
2018-09-18 18:28   ` Gervais, Francois
2018-09-18 18:40     ` Andrei Borzenkov
2018-09-18 18:42     ` Hugo Mills

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).