All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Brown <davidb@davidb.org>
To: Marc MERLIN <marc@merlins.org>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: btrfs send/receive still gets out of sync in 3.14.0
Date: Tue, 22 Apr 2014 09:07:09 -0700	[thread overview]
Message-ID: <20140422160709.GA18265@davidb.org> (raw)
In-Reply-To: <20140322210455.GL28005@merlins.org>

On Sat, Mar 22, 2014 at 02:04:56PM -0700, Marc MERLIN wrote:
>After deleting a huge directory tree in my /home subvolume, syncing
>snapshots now fails with:
>
>ERROR: rmdir o1952777-157-0 failed. No such file or directory
>Error line 156 with status 1
>
> DIE: Code dump:
>   153	if [[ -n "$init" ]]; then
>   154	    btrfs send "$src_newsnap" | $ssh btrfs receive "$dest_pool/"
>   155	else
>   156	    btrfs send -p "$src_snap" "$src_newsnap" | $ssh btrfs receive "$dest_pool/"
>   157	fi
>   158	
>   159	# We make a read-write snapshot in case you want to use it for a chroot
>
>
>Is there anything useful I can provide before killing my snapshot and doing
>a full sync again?

I have been able to work around this by hacking up btrfs receive to
ignore the rmdir.  As far as I can tell (tree comparison) the
resulting tree is correct.

David

diff --git a/cmds-receive.c b/cmds-receive.c
index d6cd3da..5bd4161 100644
--- a/cmds-receive.c
+++ b/cmds-receive.c
@@ -492,6 +492,9 @@ static int process_rmdir(const char *path, void *user)
  		fprintf(stderr, "ERROR: rmdir %s failed. %s\n", path,
  				strerror(-ret));
  	}
+	// Ugly hack to work around kernel problem of sending
+	// redundant rmdirs.
+	ret = 0;
  
  	free(full_path);
  	return ret;

      parent reply	other threads:[~2014-04-22 16:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-22 21:04 btrfs send/receive still gets out of sync in 3.14.0 Marc MERLIN
2014-03-30  3:22 ` Marc MERLIN
2014-03-30 12:42   ` Hugo Mills
2014-03-30 13:13     ` Filipe David Manana
2014-03-30 14:27       ` Marc MERLIN
2014-03-30 15:14         ` Filipe David Manana
2014-03-30 23:01           ` Marc MERLIN
2014-04-22 16:07 ` David Brown [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=20140422160709.GA18265@davidb.org \
    --to=davidb@davidb.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=marc@merlins.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.