Re: btrfs send/receive still gets out of sync in 3.14.0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux