linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* btrfs receive leaves new subvolume modifiable during operation
@ 2017-01-31 23:32 Christian Lupien
  2017-02-01  5:09 ` Duncan
  0 siblings, 1 reply; 20+ messages in thread
From: Christian Lupien @ 2017-01-31 23:32 UTC (permalink / raw)
  To: linux-btrfs

I have been testing btrfs send/receive. I like it.

During those tests I discovered that it is possible to access and
modify (add files, delete files ...) of the new receive snapshot during
the transfer. After the transfer it becomes readonly but it could
already have been modified.

So you can end up with a source and a destination which are not the
same. Therefore during a subsequent incremental transfers I can get
receive to crash (trying to unlink a file that is not in the parent but
should).

Is this behavior by design or will it be prevented in the future?

I can of course just not modify the subvolume during receive but is
there a way to make sure no user/program modifies it?

I can also get in the same kind of trouble by modifying a parent (after
changing its property temporarily to ro=false). send/receive is
checking that the same parent uuid is available on both sides but not
that generation has not changed. Of course in this case it requires
direct user intervention. Never changing the ro property of subvolumes
would prevent the problem. 

Again is this by design?
Otherwise I would suggest finding a way to avoid those conditions
(using the generation maybe?). There could be an override option to
allow more flexibility if needed.

Thanks
Christian	

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

end of thread, other threads:[~2017-02-06 22:56 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-31 23:32 btrfs receive leaves new subvolume modifiable during operation Christian Lupien
2017-02-01  5:09 ` Duncan
2017-02-01 12:28   ` Austin S. Hemmelgarn
2017-02-01 17:43     ` Graham Cobb
2017-02-01 22:27       ` Duncan
2017-02-01 22:51         ` Graham Cobb
2017-02-02  0:02           ` Duncan
2017-02-02 10:52             ` Graham Cobb
2017-02-02 12:49               ` Austin S. Hemmelgarn
2017-02-03  9:14               ` Duncan
2017-02-03 12:44                 ` Austin S. Hemmelgarn
2017-02-03 15:44                   ` Graham Cobb
2017-02-03 16:01                     ` Austin S. Hemmelgarn
2017-02-03 19:17                       ` Graham Cobb
2017-02-03 19:37                         ` Austin S. Hemmelgarn
2017-02-05 12:08               ` Kai Krakow
2017-02-06 22:56                 ` Graham Cobb
2017-02-05 11:54       ` Kai Krakow
2017-02-06 12:30         ` Austin S. Hemmelgarn
2017-02-06 21:40           ` Kai Krakow

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