diff -pruN 0.19+20100601-3/debian/btrfs-tools.links 0.19+20100601-3ubuntu3/debian/btrfs-tools.links
--- 0.19+20100601-3/debian/btrfs-tools.links	1970-01-01 00:00:00.000000000 +0000
+++ 0.19+20100601-3ubuntu3/debian/btrfs-tools.links	2011-08-25 14:48:20.000000000 +0000
@@ -0,0 +1 @@
+sbin/btrfsck sbin/fsck.btrfs
diff -pruN 0.19+20100601-3/debian/btrfs-tools-udeb.install 0.19+20100601-3ubuntu3/debian/btrfs-tools-udeb.install
--- 0.19+20100601-3/debian/btrfs-tools-udeb.install	2011-08-25 14:48:20.000000000 +0000
+++ 0.19+20100601-3ubuntu3/debian/btrfs-tools-udeb.install	2011-08-25 14:48:20.000000000 +0000
@@ -1,2 +1,3 @@
 btrfsctl	/sbin
+btrfs           /sbin
 mkfs.btrfs	/sbin
diff -pruN 0.19+20100601-3/debian/changelog 0.19+20100601-3ubuntu3/debian/changelog
--- 0.19+20100601-3/debian/changelog	2011-08-25 14:48:20.000000000 +0000
+++ 0.19+20100601-3ubuntu3/debian/changelog	2011-08-25 14:48:20.000000000 +0000
@@ -1,3 +1,31 @@
+btrfs-tools (0.19+20100601-3ubuntu3) oneiric; urgency=low
+
+  * Fix -Wunused-but-set-variable warnings from GCC 4.6 (LP: #829428).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Thu, 25 Aug 2011 12:04:08 +0100
+
+btrfs-tools (0.19+20100601-3ubuntu2) natty; urgency=low
+
+  * New patch, ignore all arguments starting with "-" as to be compatible with
+    the way mountall and other programs call fsck.btrfs (for instance with
+    -a); this helps checking of btrfs filesystems by mountall on boot, but the
+    proper fix would be to implement support for these flags; patch by
+    Sten Heinze found in Debian #567681; LP: #460246.
+  * Re-add fsck.btrfs -> btrfsck symlink; LP: #660649.
+
+ -- Loïc Minier <loic.minier@linaro.org>  Wed, 30 Mar 2011 16:32:20 +0200
+
+btrfs-tools (0.19+20100601-3ubuntu1) natty; urgency=low
+
+  * btrfs-tools-udeb.install:
+    - ship /sbin/btrfs in the udeb
+  * debian/patches/04-werror.patch:  
+    - fix missing initialization (fixes FTBFS)
+  * debian/patches/05-fix-ld.patch: 
+    - add missing -lcom_err to fix FTBFS
+
+ -- Michael Vogt <michael.vogt@ubuntu.com>  Fri, 14 Jan 2011 18:42:40 +0100
+
 btrfs-tools (0.19+20100601-3) unstable; urgency=low
 
   * Updating year in copyright file.
diff -pruN 0.19+20100601-3/debian/control 0.19+20100601-3ubuntu3/debian/control
--- 0.19+20100601-3/debian/control	2011-08-25 14:48:20.000000000 +0000
+++ 0.19+20100601-3ubuntu3/debian/control	2011-08-25 14:48:20.000000000 +0000
@@ -1,7 +1,8 @@
 Source: btrfs-tools
 Section: admin
 Priority: optional
-Maintainer: Daniel Baumann <daniel@lists.debian-maintainers.org>
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSBC-Original-Maintainer: Daniel Baumann <daniel@lists.debian-maintainers.org>
 Uploaders: Daniel Baumann <daniel@debian.org>
 Build-Depends:
  debhelper (>= 7.0.50~), e2fslibs-dev, libacl1-dev, quilt (>= 0.46-7), uuid-dev,
diff -pruN 0.19+20100601-3/debian/patches/04-werror.patch 0.19+20100601-3ubuntu3/debian/patches/04-werror.patch
--- 0.19+20100601-3/debian/patches/04-werror.patch	1970-01-01 00:00:00.000000000 +0000
+++ 0.19+20100601-3ubuntu3/debian/patches/04-werror.patch	2011-08-25 14:48:20.000000000 +0000
@@ -0,0 +1,20 @@
+## Description: add some description
+## Origin/Author: add some origin or author
+## Bug: bug URL
+Index: btrfs-tools/btrfs-list.c
+===================================================================
+--- btrfs-tools.orig/btrfs-list.c	2011-01-14 18:35:18.559413002 +0100
++++ btrfs-tools/btrfs-list.c	2011-01-14 18:35:02.579413002 +0100
+@@ -663,9 +663,9 @@
+ 			    char **cache_dir_name, u64 *cache_ino,
+ 			    char **cache_full_name)
+ {
+-	u64 len;
+-	u64 disk_start;
+-	u64 disk_offset;
++	u64 len = 0;
++	u64 disk_start = 0;
++	u64 disk_offset = 0;
+ 	u8 type;
+ 	int compressed = 0;
+ 	int flags = 0;
diff -pruN 0.19+20100601-3/debian/patches/05-fix-ld.patch 0.19+20100601-3ubuntu3/debian/patches/05-fix-ld.patch
--- 0.19+20100601-3/debian/patches/05-fix-ld.patch	1970-01-01 00:00:00.000000000 +0000
+++ 0.19+20100601-3ubuntu3/debian/patches/05-fix-ld.patch	2011-08-25 14:48:20.000000000 +0000
@@ -0,0 +1,16 @@
+## Description: add some description
+## Origin/Author: add some origin or author
+## Bug: bug URL
+Index: btrfs-tools/Makefile
+===================================================================
+--- btrfs-tools.orig/Makefile	2011-01-14 18:39:28.889413002 +0100
++++ btrfs-tools/Makefile	2011-01-14 18:39:27.729413002 +0100
+@@ -14,7 +14,7 @@
+ INSTALL= install
+ prefix ?= /usr/local
+ bindir = $(prefix)/bin
+-LIBS=-luuid
++LIBS=-luuid -lcom_err
+ 
+ progs = btrfsctl mkfs.btrfs btrfs-debug-tree btrfs-show btrfs-vol btrfsck \
+ 	btrfs \
diff -pruN 0.19+20100601-3/debian/patches/08-allow-fsck-options.patch 0.19+20100601-3ubuntu3/debian/patches/08-allow-fsck-options.patch
--- 0.19+20100601-3/debian/patches/08-allow-fsck-options.patch	1970-01-01 00:00:00.000000000 +0000
+++ 0.19+20100601-3ubuntu3/debian/patches/08-allow-fsck-options.patch	2011-08-25 14:48:20.000000000 +0000
@@ -0,0 +1,27 @@
+Index: btrfs-tools/btrfsck.c
+===================================================================
+--- btrfs-tools.orig/btrfsck.c	2010-02-08 05:37:15.097132451 +0100
++++ btrfs-tools/btrfsck.c	2010-02-08 05:38:11.585242066 +0100
+@@ -2821,9 +2821,21 @@
+ 	if (ac < 2)
+ 		print_usage();
+ 
++	char *file = av[ac - 1];
++	int pos;
++	for( pos = 1; pos < ac; ++pos)
++	{
++		/* ignore all options for now, stop at first device found */
++		if (av[pos][0] != '-')
++		{
++			file = av[pos];
++			break;
++		}
++	}
++
+ 	radix_tree_init();
+ 	cache_tree_init(&root_cache);
+-	root = open_ctree(av[1], 0, 0);
++	root = open_ctree(file, 0, 0);
+ 
+ 	if (root == NULL)
+ 		return 1;
diff -pruN 0.19+20100601-3/debian/patches/09-unused-warnings.patch 0.19+20100601-3ubuntu3/debian/patches/09-unused-warnings.patch
--- 0.19+20100601-3/debian/patches/09-unused-warnings.patch	1970-01-01 00:00:00.000000000 +0000
+++ 0.19+20100601-3ubuntu3/debian/patches/09-unused-warnings.patch	2011-08-25 14:48:20.000000000 +0000
@@ -0,0 +1,481 @@
+Description: Fix -Wunused-but-set-variable warnings from GCC 4.6
+ GCC 4.6 has a new -Wunused-but-set-variable warning category, enabled by
+ default by -Wall (http://gcc.gnu.org/gcc-4.6/changes.html), and since
+ btrfs-tools uses -Werror by default, this causes the build to fail.  The
+ following patch fixes that.  I believe all the code I removed is provably a
+ no-op.
+Author: Colin Watson <cjwatson@ubuntu.com>
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/829428
+Forwarded: http://thread.gmane.org/gmane.comp.file-systems.btrfs/12718
+Last-Update: 2011-08-25
+
+Index: b/btrfs-map-logical.c
+===================================================================
+--- a/btrfs-map-logical.c
++++ b/btrfs-map-logical.c
+@@ -41,7 +41,6 @@
+ 				     u32 blocksize, int copy)
+ {
+ 	int ret;
+-	int dev_nr;
+ 	struct extent_buffer *eb;
+ 	u64 length;
+ 	struct btrfs_multi_bio *multi = NULL;
+@@ -53,7 +52,6 @@
+ 	if (!eb)
+ 		return NULL;
+ 
+-	dev_nr = 0;
+ 	length = blocksize;
+ 	while (1) {
+ 		ret = btrfs_map_block(&root->fs_info->mapping_tree, READ,
+Index: b/btrfsck.c
+===================================================================
+--- a/btrfsck.c
++++ b/btrfsck.c
+@@ -990,7 +990,6 @@
+ 	struct btrfs_key key;
+ 	u32 nritems;
+ 	int i;
+-	int ret;
+ 	struct cache_tree *inode_cache;
+ 	struct shared_node *active_node;
+ 
+@@ -1016,17 +1015,17 @@
+ 		switch (key.type) {
+ 		case BTRFS_DIR_ITEM_KEY:
+ 		case BTRFS_DIR_INDEX_KEY:
+-			ret = process_dir_item(eb, i, &key, active_node);
++			process_dir_item(eb, i, &key, active_node);
+ 			break;
+ 		case BTRFS_INODE_REF_KEY:
+-			ret = process_inode_ref(eb, i, &key, active_node);
++			process_inode_ref(eb, i, &key, active_node);
+ 			break;
+ 		case BTRFS_INODE_ITEM_KEY:
+-			ret = process_inode_item(eb, i, &key, active_node);
++			process_inode_item(eb, i, &key, active_node);
+ 			break;
+ 		case BTRFS_EXTENT_DATA_KEY:
+-			ret = process_file_extent(root, eb, i, &key,
+-						  active_node);
++			process_file_extent(root, eb, i, &key,
++					    active_node);
+ 			break;
+ 		default:
+ 			break;
+@@ -1912,7 +1911,6 @@
+ 	struct btrfs_root *ref_root;
+ 	struct btrfs_key key;
+ 	struct btrfs_path path;
+-	int ret;
+ 	int level;
+ 	int found = 0;
+ 
+@@ -1945,7 +1943,7 @@
+ 	
+ 	btrfs_init_path(&path);
+ 	path.lowest_level = level + 1;
+-	ret = btrfs_search_slot(NULL, ref_root, &key, &path, 0, 0);
++	btrfs_search_slot(NULL, ref_root, &key, &path, 0, 0);
+ 
+ 	if (buf->start == btrfs_node_blockptr(path.nodes[level + 1],
+ 					      path.slots[level + 1]))
+@@ -2534,10 +2532,10 @@
+ 				continue;
+ 			}
+ 			if (key.type == BTRFS_BLOCK_GROUP_ITEM_KEY) {
++#if 0
+ 				struct btrfs_block_group_item *bi;
+ 				bi = btrfs_item_ptr(buf, i,
+ 					    struct btrfs_block_group_item);
+-#if 0
+ 				fprintf(stderr,"block group %Lu %Lu used %Lu ",
+ 					btrfs_disk_key_objectid(disk_key),
+ 					btrfs_disk_key_offset(disk_key),
+Index: b/ctree.c
+===================================================================
+--- a/ctree.c
++++ b/ctree.c
+@@ -262,7 +262,6 @@
+ 			     struct extent_buffer **cow_ret,
+ 			     u64 search_start, u64 empty_size)
+ {
+-	u64 generation;
+ 	struct extent_buffer *cow;
+ 	struct btrfs_disk_key disk_key;
+ 	int level;
+@@ -272,7 +271,6 @@
+ 	WARN_ON(root->ref_cows && trans->transid != root->last_trans);
+ 
+ 	level = btrfs_header_level(buf);
+-	generation = btrfs_header_generation(buf);
+ 
+ 	if (level == 0)
+ 		btrfs_item_key(buf, &disk_key, 0);
+@@ -795,7 +793,6 @@
+ 	int wret;
+ 	int pslot;
+ 	int orig_slot = path->slots[level];
+-	int err_on_enospc = 0;
+ 	u64 orig_ptr;
+ 
+ 	if (level == 0)
+@@ -845,9 +842,6 @@
+ 	    BTRFS_NODEPTRS_PER_BLOCK(root) / 4)
+ 		return 0;
+ 
+-	if (btrfs_header_nritems(mid) < 2)
+-		err_on_enospc = 1;
+-
+ 	left = read_node_slot(root, parent, pslot - 1);
+ 	if (left) {
+ 		wret = btrfs_cow_block(trans, root, left,
+@@ -873,8 +867,6 @@
+ 		wret = push_node_left(trans, root, left, mid, 1);
+ 		if (wret < 0)
+ 			ret = wret;
+-		if (btrfs_header_nritems(mid) < 2)
+-			err_on_enospc = 1;
+ 	}
+ 
+ 	/*
+@@ -996,14 +988,12 @@
+ 	int wret;
+ 	int pslot;
+ 	int orig_slot = path->slots[level];
+-	u64 orig_ptr;
+ 
+ 	if (level == 0)
+ 		return 1;
+ 
+ 	mid = path->nodes[level];
+ 	WARN_ON(btrfs_header_generation(mid) != trans->transid);
+-	orig_ptr = btrfs_node_blockptr(mid, orig_slot);
+ 
+ 	if (level < BTRFS_MAX_LEVEL - 1)
+ 		parent = path->nodes[level + 1];
+@@ -2370,7 +2360,6 @@
+ {
+ 	int ret = 0;
+ 	int slot;
+-	int slot_orig;
+ 	struct extent_buffer *leaf;
+ 	struct btrfs_item *item;
+ 	u32 nritems;
+@@ -2380,7 +2369,6 @@
+ 	unsigned int size_diff;
+ 	int i;
+ 
+-	slot_orig = path->slots[0];
+ 	leaf = path->nodes[0];
+ 	slot = path->slots[0];
+ 
+@@ -2468,7 +2456,6 @@
+ {
+ 	int ret = 0;
+ 	int slot;
+-	int slot_orig;
+ 	struct extent_buffer *leaf;
+ 	struct btrfs_item *item;
+ 	u32 nritems;
+@@ -2477,7 +2464,6 @@
+ 	unsigned int old_size;
+ 	int i;
+ 
+-	slot_orig = path->slots[0];
+ 	leaf = path->nodes[0];
+ 
+ 	nritems = btrfs_header_nritems(leaf);
+@@ -2541,7 +2527,6 @@
+ 	struct btrfs_item *item;
+ 	int ret = 0;
+ 	int slot;
+-	int slot_orig;
+ 	int i;
+ 	u32 nritems;
+ 	u32 total_size = 0;
+@@ -2565,7 +2550,6 @@
+ 	if (ret < 0)
+ 		goto out;
+ 
+-	slot_orig = path->slots[0];
+ 	leaf = path->nodes[0];
+ 
+ 	nritems = btrfs_header_nritems(leaf);
+Index: b/debug-tree.c
+===================================================================
+--- a/debug-tree.c
++++ b/debug-tree.c
+@@ -37,6 +37,7 @@
+ 
+ static void print_extent_leaf(struct btrfs_root *root, struct extent_buffer *l)
+ {
++#if 0
+ 	int i;
+ 	struct btrfs_item *item;
+ //	struct btrfs_extent_ref *ref;
+@@ -71,6 +72,7 @@
+ 		};
+ 		fflush(stdout);
+ 	}
++#endif
+ }
+ 
+ static void print_extents(struct btrfs_root *root, struct extent_buffer *eb)
+Index: b/dir-item.c
+===================================================================
+--- a/dir-item.c
++++ b/dir-item.c
+@@ -313,14 +313,13 @@
+ 	struct extent_buffer *leaf;
+ 	u32 sub_item_len;
+ 	u32 item_len;
+-	int ret = 0;
+ 
+ 	leaf = path->nodes[0];
+ 	sub_item_len = sizeof(*di) + btrfs_dir_name_len(leaf, di) +
+ 		btrfs_dir_data_len(leaf, di);
+ 	item_len = btrfs_item_size_nr(leaf, path->slots[0]);
+ 	if (sub_item_len == item_len) {
+-		ret = btrfs_del_item(trans, root, path);
++		btrfs_del_item(trans, root, path);
+ 	} else {
+ 		/* MARKER */
+ 		unsigned long ptr = (unsigned long)di;
+@@ -329,8 +328,8 @@
+ 		start = btrfs_item_ptr_offset(leaf, path->slots[0]);
+ 		memmove_extent_buffer(leaf, ptr, ptr + sub_item_len,
+ 			item_len - (ptr + sub_item_len - start));
+-		ret = btrfs_truncate_item(trans, root, path,
+-					  item_len - sub_item_len, 1);
++		btrfs_truncate_item(trans, root, path,
++				    item_len - sub_item_len, 1);
+ 	}
+ 	return 0;
+ }
+Index: b/disk-io.c
+===================================================================
+--- a/disk-io.c
++++ b/disk-io.c
+@@ -123,7 +123,6 @@
+ 			 u64 parent_transid)
+ {
+ 	int ret;
+-	int dev_nr;
+ 	struct extent_buffer *eb;
+ 	u64 length;
+ 	struct btrfs_multi_bio *multi = NULL;
+@@ -135,7 +134,6 @@
+ 		return 0;
+ 	}
+ 
+-	dev_nr = 0;
+ 	length = blocksize;
+ 	ret = btrfs_map_block(&root->fs_info->mapping_tree, READ,
+ 			      bytenr, &length, &multi, 0);
+@@ -177,7 +175,6 @@
+ 				     u32 blocksize, u64 parent_transid)
+ {
+ 	int ret;
+-	int dev_nr;
+ 	struct extent_buffer *eb;
+ 	u64 length;
+ 	struct btrfs_multi_bio *multi = NULL;
+@@ -192,7 +189,6 @@
+ 	if (btrfs_buffer_uptodate(eb, parent_transid))
+ 		return eb;
+ 
+-	dev_nr = 0;
+ 	length = blocksize;
+ 	while (1) {
+ 		ret = btrfs_map_block(&root->fs_info->mapping_tree, READ,
+Index: b/extent-cache.c
+===================================================================
+--- a/extent-cache.c
++++ b/extent-cache.c
+@@ -96,13 +96,10 @@
+ 				 struct cache_extent *pe)
+ {
+ 	struct rb_node *found;
+-	struct cache_extent *entry;
+ 
+ 	found = tree_insert(&tree->root, pe->start, pe->size, &pe->rb_node);
+-	if (found) {
+-		entry = rb_entry(found, struct cache_extent, rb_node);
++	if (found)
+ 		return -EEXIST;
+-	}
+ 	return 0;
+ }
+ 
+Index: b/extent-tree.c
+===================================================================
+--- a/extent-tree.c
++++ b/extent-tree.c
+@@ -1550,7 +1550,9 @@
+ 	int i;
+ 	int level;
+ 	int ret = 0;
++#if 0
+ 	int faili = 0;
++#endif
+ 	int (*process_func)(struct btrfs_trans_handle *trans,
+ 			    struct btrfs_root *root,
+ 			    u64, u64, u64, u64, u64, u64);
+@@ -1593,7 +1595,9 @@
+ 					   parent, ref_root, key.objectid,
+ 					   key.offset);
+ 			if (ret) {
++#if 0
+ 				faili = i;
++#endif
+ 				WARN_ON(1);
+ 				goto fail;
+ 			}
+@@ -1603,7 +1607,9 @@
+ 			ret = process_func(trans, root, bytenr, num_bytes,
+ 					   parent, ref_root, level - 1, 0);
+ 			if (ret) {
++#if 0
+ 				faili = i;
++#endif
+ 				WARN_ON(1);
+ 				goto fail;
+ 			}
+Index: b/extent_io.c
+===================================================================
+--- a/extent_io.c
++++ b/extent_io.c
+@@ -296,7 +296,6 @@
+ 	struct extent_state *prealloc = NULL;
+ 	struct cache_extent *node;
+ 	int err = 0;
+-	int set;
+ 	u64 last_start;
+ 	u64 last_end;
+ again:
+@@ -327,7 +326,6 @@
+ 	 * Just lock what we found and keep going
+ 	 */
+ 	if (state->start == start && state->end <= end) {
+-		set = state->state & bits;
+ 		state->state |= bits;
+ 		merge_state(tree, state);
+ 		if (last_end == (u64)-1)
+@@ -352,7 +350,6 @@
+ 	 * desired bit on it.
+ 	 */
+ 	if (state->start < start) {
+-		set = state->state & bits;
+ 		err = split_state(tree, state, prealloc, start);
+ 		BUG_ON(err == -EEXIST);
+ 		prealloc = NULL;
+@@ -398,7 +395,6 @@
+ 	 * We need to split the extent, and set the bit
+ 	 * on the first half
+ 	 */
+-	set = state->state & bits;
+ 	err = split_state(tree, state, prealloc, end + 1);
+ 	BUG_ON(err == -EEXIST);
+ 
+Index: b/mkfs.c
+===================================================================
+--- a/mkfs.c
++++ b/mkfs.c
+@@ -348,7 +348,6 @@
+ 	int zero_end = 1;
+ 	int option_index = 0;
+ 	int fd;
+-	int first_fd;
+ 	int ret;
+ 	int i;
+ 
+@@ -430,7 +429,6 @@
+ 		fprintf(stderr, "unable to open %s\n", file);
+ 		exit(1);
+ 	}
+-	first_fd = fd;
+ 	first_file = file;
+ 	ret = btrfs_prepare_device(fd, file, zero_end, &dev_block_count);
+ 	if (block_count == 0)
+Index: b/print-tree.c
+===================================================================
+--- a/print-tree.c
++++ b/print-tree.c
+@@ -441,7 +441,6 @@
+ 	struct btrfs_dir_item *di;
+ 	struct btrfs_inode_item *ii;
+ 	struct btrfs_file_extent_item *fi;
+-	struct btrfs_csum_item *ci;
+ 	struct btrfs_block_group_item *bi;
+ 	struct btrfs_extent_data_ref *dref;
+ 	struct btrfs_shared_data_ref *sref;
+@@ -553,11 +552,9 @@
+ #endif
+ 			break;
+ 		case BTRFS_CSUM_ITEM_KEY:
+-			ci = btrfs_item_ptr(l, i, struct btrfs_csum_item);
+ 			printf("\t\tcsum item\n");
+ 			break;
+ 		case BTRFS_EXTENT_CSUM_KEY:
+-			ci = btrfs_item_ptr(l, i, struct btrfs_csum_item);
+ 			printf("\t\textent csum item\n");
+ 			break;
+ 		case BTRFS_EXTENT_DATA_KEY:
+Index: b/utils.c
+===================================================================
+--- a/utils.c
++++ b/utils.c
+@@ -647,7 +647,6 @@
+ {
+ 	struct btrfs_ioctl_vol_args args;
+ 	int fd;
+-	int ret;
+ 
+ 	fd = open("/dev/btrfs-control", O_RDONLY);
+ 	if (fd < 0) {
+@@ -656,7 +655,7 @@
+ 		return;
+ 	}
+ 	strcpy(args.name, fname);
+-	ret = ioctl(fd, BTRFS_IOC_SCAN_DEV, &args);
++	ioctl(fd, BTRFS_IOC_SCAN_DEV, &args);
+ 	close(fd);
+ }
+ 
+Index: b/volumes.c
+===================================================================
+--- a/volumes.c
++++ b/volumes.c
+@@ -643,7 +643,6 @@
+ 	struct list_head *cur;
+ 	struct map_lookup *map;
+ 	int min_stripe_size = 1 * 1024 * 1024;
+-	u64 physical;
+ 	u64 calc_size = 8 * 1024 * 1024;
+ 	u64 min_free;
+ 	u64 max_chunk_size = 4 * calc_size;
+@@ -811,7 +810,6 @@
+ 		btrfs_set_stack_stripe_devid(stripe, device->devid);
+ 		btrfs_set_stack_stripe_offset(stripe, dev_offset);
+ 		memcpy(stripe->dev_uuid, device->uuid, BTRFS_UUID_SIZE);
+-		physical = dev_offset;
+ 		index++;
+ 	}
+ 	BUG_ON(!list_empty(&private_devs));
+@@ -867,14 +865,12 @@
+ 	struct cache_extent *ce;
+ 	struct map_lookup *map;
+ 	int ret;
+-	u64 offset;
+ 
+ 	ce = find_first_cache_extent(&map_tree->cache_tree, logical);
+ 	BUG_ON(!ce);
+ 	BUG_ON(ce->start > logical || ce->start + ce->size < logical);
+ 	map = container_of(ce, struct map_lookup, ce);
+ 
+-	offset = logical - ce->start;
+ 	if (map->type & (BTRFS_BLOCK_GROUP_DUP | BTRFS_BLOCK_GROUP_RAID1))
+ 		ret = map->num_stripes;
+ 	else if (map->type & BTRFS_BLOCK_GROUP_RAID10)
diff -pruN 0.19+20100601-3/debian/patches/series 0.19+20100601-3ubuntu3/debian/patches/series
--- 0.19+20100601-3/debian/patches/series	2011-08-25 14:48:20.000000000 +0000
+++ 0.19+20100601-3ubuntu3/debian/patches/series	2011-08-25 14:48:20.000000000 +0000
@@ -1,3 +1,7 @@
 01-labels.patch
 02-ftbfs.patch
 03-glibc.patch
+04-werror.patch
+05-fix-ld.patch
+08-allow-fsck-options.patch
+09-unused-warnings.patch

