Hello community,

here is the log from the commit of package btrfsprogs for openSUSE:Factory 
checked in at 2014-09-25 09:33:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/btrfsprogs (Old)
 and      /work/SRC/openSUSE:Factory/.btrfsprogs.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "btrfsprogs"

Changes:
--------
--- /work/SRC/openSUSE:Factory/btrfsprogs/btrfsprogs.changes    2014-09-08 
21:28:19.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.btrfsprogs.new/btrfsprogs.changes       
2014-09-25 09:33:25.000000000 +0200
@@ -1,0 +2,21 @@
+Mon Sep 22 23:01:01 CEST 2014 - dste...@suse.cz
+
+- version 3.16.1
+  - library version defines
+  - subvol list: -R to print received UUID
+  - fixed detection of multiple mounts on the same directory
+  - restore: misc fixes
+  - other fixes
+- Modified patches (sync with pending upstream versions):
+  * 0011-btrfs-progs-Enhance-the-command-btrfs-filesystem-df.patch
+  * 0012-btrfs-progs-Add-helpers-functions-to-handle-the-prin.patch
+  * 0013-btrfs-progs-Add-command-btrfs-filesystem-disk-usage.patch
+  * 0018-btrfs-progs-read-global-reserve-size-from-space-info.patch
+  * 0020-btrfs-progs-move-device-usage-to-cmds-device-more-cl.patch
+  * 0024-btrfs-progs-Print-more-info-about-device-sizes.patch
+  * 0025-btrfs-progs-compare-unallocated-space-against-the-co.patch
+  * 0028-btrfs-progs-extend-pretty-printers-with-unit-mode.patch
+  * 0029-btrfs-progs-replace-df_pretty_sizes-with-pretty_size.patch
+- Removed patch: library-version-defines.patch (upstream)
+
+-------------------------------------------------------------------

Old:
----
  btrfs-progs-v3.16.tar.gz
  library-version-defines.patch

New:
----
  btrfs-progs-v3.16.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ btrfsprogs.spec ++++++
--- /var/tmp/diff_new_pack.LYX7Gg/_old  2014-09-25 09:33:26.000000000 +0200
+++ /var/tmp/diff_new_pack.LYX7Gg/_new  2014-09-25 09:33:26.000000000 +0200
@@ -16,17 +16,17 @@
 #
 
 
-%define tar_version v3.16
+%define tar_version v3.16.1
 Name:           btrfsprogs
-Version:        3.16
+Version:        3.16.1
 Release:        0
 Summary:        Utilities for the Btrfs filesystem
 License:        GPL-2.0
 Group:          System/Filesystems
 Url:            http://btrfs.wiki.kernel.org/index.php/Main_Page
-#Git-Web:      
http://git.kernel.org/cgit/linux/kernel/git/mason/btrfs-progs.git
-#Git-Clone:    git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs
-Source:         
https://www.kernel.org/pub/linux/kernel/people/mason/btrfs-progs/btrfs-progs-%{tar_version}.tar.gz
+#Git-Web:      
http://git.kernel.org/cgit/linux/kernel/git/kdave/btrfs-progs.git
+#Git-Clone:    git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs
+Source:         
https://www.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-%{tar_version}.tar.gz
 Source1:        boot-btrfs.sh
 Source4:        setup-btrfs.sh
 
@@ -63,7 +63,6 @@
 Patch171:       0171-btrfs-progs-make-free-space-checker-work-on-non-4k-s.patch
 
 Patch1000:      local-version-override.patch
-Patch1001:      library-version-defines.patch
 
 BuildRequires:  asciidoc
 BuildRequires:  libacl-devel
@@ -132,7 +131,6 @@
 %patch169 -p1
 %patch171 -p1
 %patch1000 -p1
-%patch1001 -p1
 
 %build
 make %{?_smp_mflags} CFLAGS="%{optflags}" all btrfs-convert \

++++++ 0011-btrfs-progs-Enhance-the-command-btrfs-filesystem-df.patch ++++++
--- /var/tmp/diff_new_pack.LYX7Gg/_old  2014-09-25 09:33:26.000000000 +0200
+++ /var/tmp/diff_new_pack.LYX7Gg/_new  2014-09-25 09:33:26.000000000 +0200
@@ -597,7 +597,7 @@
  #include "list_sort.h"
  #include "disk-io.h"
  
-@@ -112,50 +113,6 @@ static const char * const filesystem_cmd
+@@ -112,55 +113,6 @@ static const char * const filesystem_cmd_group_usage[] = {
        NULL
  };
  
@@ -609,7 +609,10 @@
 -
 -static char *group_type_str(u64 flag)
 -{
--      switch (flag & BTRFS_BLOCK_GROUP_TYPE_MASK) {
+-      u64 mask = BTRFS_BLOCK_GROUP_TYPE_MASK |
+-              BTRFS_SPACE_INFO_GLOBAL_RSV;
+-
+-      switch (flag & mask) {
 -      case BTRFS_BLOCK_GROUP_DATA:
 -              return "Data";
 -      case BTRFS_BLOCK_GROUP_SYSTEM:
@@ -618,6 +621,8 @@
 -              return "Metadata";
 -      case BTRFS_BLOCK_GROUP_DATA|BTRFS_BLOCK_GROUP_METADATA:
 -              return "Data+Metadata";
+-      case BTRFS_SPACE_INFO_GLOBAL_RSV:
+-              return "GlobalReserve";
 -      default:
 -              return "unknown";
 -      }
@@ -739,7 +744,7 @@
  #include "kerncompat.h"
  #include "radix-tree.h"
  #include "ctree.h"
-@@ -2436,3 +2438,13 @@ int test_isdir(const char *path)
+@@ -2439,3 +2441,13 @@ int test_isdir(const char *path)
  
        return S_ISDIR(st.st_mode);
  }
@@ -753,15 +758,18 @@
 +      else
 +              return sfs.f_bsize * sfs.f_blocks;
 +}
-Index: btrfs-progs-v3.16/utils.h
-===================================================================
---- btrfs-progs-v3.16.orig/utils.h
-+++ btrfs-progs-v3.16/utils.h
-@@ -118,6 +118,7 @@ int test_uuid_unique(char *fs_uuid);
- int test_minimum_size(const char *file, u32 leafsize);
- int test_issubvolname(const char *name);
- int test_isdir(const char *path);
+diff --git a/utils.h b/utils.h
+index fd25126dac81..c683818e003f 100644
+--- a/utils.h
++++ b/utils.h
+@@ -114,6 +114,7 @@ int find_mount_root(const char *path, char **mount_root);
+ int get_device_info(int fd, u64 devid,
+               struct btrfs_ioctl_dev_info_args *di_args);
+ int test_uuid_unique(char *fs_uuid);
 +u64 disk_size(char *path);
  
- /*
-  * Btrfs minimum size calculation is complicated, it should include at least:
+ int test_minimum_size(const char *file, u32 leafsize);
+ int test_issubvolname(const char *name);
+-- 
+2.1.1
+

++++++ 0012-btrfs-progs-Add-helpers-functions-to-handle-the-prin.patch ++++++
--- /var/tmp/diff_new_pack.LYX7Gg/_old  2014-09-25 09:33:26.000000000 +0200
+++ /var/tmp/diff_new_pack.LYX7Gg/_new  2014-09-25 09:33:26.000000000 +0200
@@ -48,14 +48,15 @@
          extent-cache.o extent_io.o volumes.o utils.o repair.o \
          qgroup.o raid6.o free-space-cache.o list_sort.o props.o \
 -        ulist.o qgroup-verify.o
-+        ulist.o qgroup-verify.o string_table.o
++        ulist.o qgroup-verify.o string-table.o
  cmds_objects = cmds-subvolume.o cmds-filesystem.o cmds-device.o cmds-scrub.o \
               cmds-inspect.o cmds-balance.o cmds-send.o cmds-receive.o \
               cmds-quota.o cmds-qgroup.o cmds-replace.o cmds-check.o \
-Index: btrfs-progs-v3.16/string_table.c
-===================================================================
+diff --git a/string-table.c b/string-table.c
+new file mode 100644
+index 000000000000..701f2147a3cc
 --- /dev/null
-+++ btrfs-progs-v3.16/string_table.c
++++ b/string-table.c
 @@ -0,0 +1,156 @@
 +/*
 + * This program is free software; you can redistribute it and/or
@@ -78,7 +79,7 @@
 +#include <stdio.h>
 +#include <stdarg.h>
 +
-+#include "string_table.h"
++#include "string-table.h"
 +
 +/*
 + *  This function create an array of char * which will represent a table
@@ -213,10 +214,11 @@
 +      free(tab);
 +
 +}
-Index: btrfs-progs-v3.16/string_table.h
-===================================================================
+diff --git a/string-table.h b/string-table.h
+new file mode 100644
+index 000000000000..83c4425d5f76
 --- /dev/null
-+++ btrfs-progs-v3.16/string_table.h
++++ b/string-table.h
 @@ -0,0 +1,36 @@
 +/*
 + * This program is free software; you can redistribute it and/or

++++++ 0013-btrfs-progs-Add-command-btrfs-filesystem-disk-usage.patch ++++++
--- /var/tmp/diff_new_pack.LYX7Gg/_old  2014-09-25 09:33:26.000000000 +0200
+++ /var/tmp/diff_new_pack.LYX7Gg/_new  2014-09-25 09:33:26.000000000 +0200
@@ -26,7 +26,7 @@
  #include "utils.h"
  #include "kerncompat.h"
  #include "ctree.h"
-+#include "string_table.h"
++#include "string-table.h"
  
  #include "commands.h"
  
@@ -561,13 +561,13 @@
 +              return "unknown";
 +      }
 +}
-Index: btrfs-progs-v3.16/utils.h
-===================================================================
---- btrfs-progs-v3.16.orig/utils.h
-+++ btrfs-progs-v3.16/utils.h
-@@ -119,6 +119,11 @@ int test_minimum_size(const char *file,
- int test_issubvolname(const char *name);
- int test_isdir(const char *path);
+diff --git a/utils.h b/utils.h
+index c683818e003f..5c364b61dffa 100644
+--- a/utils.h
++++ b/utils.h
+@@ -115,6 +115,11 @@ int get_device_info(int fd, u64 devid,
+               struct btrfs_ioctl_dev_info_args *di_args);
+ int test_uuid_unique(char *fs_uuid);
  u64 disk_size(char *path);
 +int get_device_info(int fd, u64 devid,
 +              struct btrfs_ioctl_dev_info_args *di_args);
@@ -575,5 +575,8 @@
 +const char* group_type_str(u64 flags);
 +const char* group_profile_str(u64 flags);
  
- /*
-  * Btrfs minimum size calculation is complicated, it should include at least:
+ int test_minimum_size(const char *file, u32 leafsize);
+ int test_issubvolname(const char *name);
+-- 
+2.1.1
+

++++++ 0018-btrfs-progs-read-global-reserve-size-from-space-info.patch ++++++
--- /var/tmp/diff_new_pack.LYX7Gg/_old  2014-09-25 09:33:26.000000000 +0200
+++ /var/tmp/diff_new_pack.LYX7Gg/_new  2014-09-25 09:33:26.000000000 +0200
@@ -13,28 +13,11 @@
  utils.c | 7 ++++++-
  2 files changed, 12 insertions(+), 1 deletion(-)
 
-diff --git a/ctree.h b/ctree.h
-index 8ac17619b9dc..5c43fc5f5f6e 100644
---- a/ctree.h
-+++ b/ctree.h
-@@ -862,6 +862,12 @@ struct btrfs_csum_item {
- /* used in struct btrfs_balance_args fields */
- #define BTRFS_AVAIL_ALLOC_BIT_SINGLE  (1ULL << 48)
- 
-+/*
-+ * GLOBAL_RSV does not exist as a on-disk block group type and is used
-+ * internally for exporting info about global block reserve from space infos
-+ */
-+#define BTRFS_SPACE_INFO_GLOBAL_RSV    (1ULL << 49)
-+
- #define BTRFS_QGROUP_STATUS_OFF                       0
- #define BTRFS_QGROUP_STATUS_ON                        1
- #define BTRFS_QGROUP_STATUS_SCANNING          2
 diff --git a/utils.c b/utils.c
 index f2ab416c28b2..ca150404ea6f 100644
 --- a/utils.c
 +++ b/utils.c
-@@ -2240,7 +2240,10 @@ u64 get_partition_size(char *dev)
+@@ -2473,7 +2473,10 @@ u64 get_partition_size(char *dev)
   */
  const char *group_type_str(u64 flag)
  {
@@ -46,7 +29,7 @@
        case BTRFS_BLOCK_GROUP_DATA:
                return "Data";
        case BTRFS_BLOCK_GROUP_SYSTEM:
-@@ -2249,6 +2252,8 @@ const char *group_type_str(u64 flag)
+@@ -2482,6 +2485,8 @@ const char *group_type_str(u64 flag)
                return "Metadata";
        case BTRFS_BLOCK_GROUP_DATA|BTRFS_BLOCK_GROUP_METADATA:
                return "Data+Metadata";

++++++ 0020-btrfs-progs-move-device-usage-to-cmds-device-more-cl.patch ++++++
--- /var/tmp/diff_new_pack.LYX7Gg/_old  2014-09-25 09:33:26.000000000 +0200
+++ /var/tmp/diff_new_pack.LYX7Gg/_new  2014-09-25 09:33:26.000000000 +0200
@@ -139,7 +139,7 @@
 @@ -26,38 +26,16 @@
  #include "kerncompat.h"
  #include "ctree.h"
- #include "string_table.h"
+ #include "string-table.h"
 -
 +#include "cmds-fi-disk_usage.h"
  #include "commands.h"

++++++ 0024-btrfs-progs-Print-more-info-about-device-sizes.patch ++++++
--- /var/tmp/diff_new_pack.LYX7Gg/_old  2014-09-25 09:33:26.000000000 +0200
+++ /var/tmp/diff_new_pack.LYX7Gg/_new  2014-09-25 09:33:26.000000000 +0200
@@ -13,7 +13,7 @@
 Sample:
 /dev/sda7, ID: 3
    Device size:            10.00GiB
-   FS occuppied:            5.00GiB
+   FS occupied:             5.00GiB
    Data,RAID10:           512.00MiB
    Metadata,RAID10:       512.00MiB
    System,RAID10:           4.00MiB
@@ -57,7 +57,7 @@
                ++ndevs;
        }
  
-@@ -879,5 +880,15 @@ void print_device_chunks(int fd, u64 devid, u64 
total_size,
+@@ -879,5 +880,14 @@ void print_device_chunks(int fd, u64 devid, u64 
total_size,
        printf("   Unallocated: %*s%10s\n",
                (int)(20 - strlen("Unallocated")), "",
                df_pretty_sizes(total_size - allocated, mode));
@@ -68,10 +68,9 @@
 +      printf("   Device size: %*s%10s\n",
 +              (int)(20 - strlen("Device size")), "",
 +              df_pretty_sizes(devinfo->device_size, mode));
-+      printf("   FS occuppied:%*s%10s\n",
++      printf("   FS occupied: %*s%10s\n",
 +              (int)(20 - strlen("FS occupied")), "",
 +              df_pretty_sizes(devinfo->size, mode));
-+      }
  }
 diff --git a/cmds-fi-disk_usage.h b/cmds-fi-disk_usage.h
 index 787b4eb56acf..79cc2a115bc5 100644

++++++ 0025-btrfs-progs-compare-unallocated-space-against-the-co.patch ++++++
--- /var/tmp/diff_new_pack.LYX7Gg/_old  2014-09-25 09:33:26.000000000 +0200
+++ /var/tmp/diff_new_pack.LYX7Gg/_new  2014-09-25 09:33:26.000000000 +0200
@@ -72,12 +72,6 @@
  }
  
  void print_device_sizes(int fd, struct device_info *devinfo, int mode)
-@@ -890,5 +890,4 @@ void print_device_sizes(int fd, struct device_info 
*devinfo, int mode)
-       printf("   FS occuppied:%*s%10s\n",
-               (int)(20 - strlen("FS occupied")), "",
-               df_pretty_sizes(devinfo->size, mode));
--      }
- }
 diff --git a/cmds-fi-disk_usage.h b/cmds-fi-disk_usage.h
 index 79cc2a115bc5..dbc2a10f31eb 100644
 --- a/cmds-fi-disk_usage.h

++++++ 0028-btrfs-progs-extend-pretty-printers-with-unit-mode.patch ++++++
--- /var/tmp/diff_new_pack.LYX7Gg/_old  2014-09-25 09:33:26.000000000 +0200
+++ /var/tmp/diff_new_pack.LYX7Gg/_new  2014-09-25 09:33:26.000000000 +0200
@@ -62,23 +62,10 @@
 +      int base = 0;
 +      const char const **suffix = NULL;
 +      u64 last_size;
-+
-+      if (str_size == 0)
-+              return 0;
  
 -      if (str_bytes == 0)
-+      if (unit_mode == UNITS_RAW) {
-+              snprintf(str, str_size, "%llu", size);
++      if (str_size == 0)
                return 0;
-+      }
-+
-+      if (unit_mode == UNITS_BINARY) {
-+              base = 1024;
-+              suffix = unit_suffix_binary;
-+      } else if (unit_mode == UNITS_DECIMAL) {
-+              base = 1000;
-+              suffix = unit_suffix_decimal;
-+      }
  
 -      if( size < 1024 ){
 -              fraction = size;
@@ -91,21 +78,33 @@
 -                      size /= 1024;
 -                      num_divs ++;
 -              }
--
++      if (unit_mode == UNITS_RAW) {
++              snprintf(str, str_size, "%llu", size);
++              return 0;
++      }
+ 
 -              if (num_divs >= ARRAY_SIZE(size_strs)) {
 -                      str[0] = '\0';
 -                      return -1;
 -              }
 -              fraction = (float)last_size / 1024;
++      if (unit_mode == UNITS_BINARY) {
++              base = 1024;
++              suffix = unit_suffix_binary;
++      } else if (unit_mode == UNITS_DECIMAL) {
++              base = 1000;
++              suffix = unit_suffix_decimal;
+       }
+-      return snprintf(str, str_bytes, "%.2f%s", fraction,
+-                      size_strs[num_divs]);
++
 +      /* Unknown mode */
 +      if (!base) {
 +              fprintf(stderr, "INTERNAL ERROR: unknown unit base, mode %d",
 +                              unit_mode);
 +              assert(0);
 +              return -1;
-       }
--      return snprintf(str, str_bytes, "%.2f%s", fraction,
--                      size_strs[num_divs]);
++      }
 +
 +      num_divs = 0;
 +      last_size = size;

++++++ 0029-btrfs-progs-replace-df_pretty_sizes-with-pretty_size.patch ++++++
--- /var/tmp/diff_new_pack.LYX7Gg/_old  2014-09-25 09:33:26.000000000 +0200
+++ /var/tmp/diff_new_pack.LYX7Gg/_new  2014-09-25 09:33:26.000000000 +0200
@@ -232,7 +232,7 @@
                (int)(20 - strlen("Device size")), "",
 -              df_pretty_sizes(devinfo->device_size, mode));
 +              pretty_size_mode(devinfo->device_size, mode));
-       printf("   FS occuppied:%*s%10s\n",
+       printf("   FS occupied: %*s%10s\n",
                (int)(20 - strlen("FS occupied")), "",
 -              df_pretty_sizes(devinfo->size, mode));
 +              pretty_size_mode(devinfo->size, mode));

++++++ btrfs-progs-v3.16.tar.gz -> btrfs-progs-v3.16.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v3.16/Documentation/btrfs-property.txt 
new/btrfs-progs-v3.16.1/Documentation/btrfs-property.txt
--- old/btrfs-progs-v3.16/Documentation/btrfs-property.txt      2014-08-26 
15:50:36.000000000 +0200
+++ new/btrfs-progs-v3.16.1/Documentation/btrfs-property.txt    2014-09-15 
15:18:00.000000000 +0200
@@ -64,4 +64,4 @@
 --------
 `mkfs.btrfs`(8),
 `lsattr`(1),
-`setattr`(8)
+`chattr`(1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v3.16/Documentation/btrfs-subvolume.txt 
new/btrfs-progs-v3.16.1/Documentation/btrfs-subvolume.txt
--- old/btrfs-progs-v3.16/Documentation/btrfs-subvolume.txt     2014-08-26 
15:50:36.000000000 +0200
+++ new/btrfs-progs-v3.16.1/Documentation/btrfs-subvolume.txt   2014-09-15 
15:18:00.000000000 +0200
@@ -104,6 +104,8 @@
 print the UUID of the subvolume.
 -q::::
 print the parent uuid of subvolumes (and snapshots).
+-R::::
+print the UUID of the sent subvolume, where the subvolume is the result of a 
receive operation
 -t::::
 print the result as a table.
 -s::::
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v3.16/Makefile 
new/btrfs-progs-v3.16.1/Makefile
--- old/btrfs-progs-v3.16/Makefile      2014-08-26 15:50:36.000000000 +0200
+++ new/btrfs-progs-v3.16.1/Makefile    2014-09-15 15:18:00.000000000 +0200
@@ -20,7 +20,7 @@
                   uuid-tree.o utils-lib.o
 libbtrfs_headers = send-stream.h send-utils.h send.h rbtree.h btrfs-list.h \
               crc32c.h list.h kerncompat.h radix-tree.h extent-cache.h \
-              extent_io.h ioctl.h ctree.h btrfsck.h
+              extent_io.h ioctl.h ctree.h btrfsck.h version.h
 TESTS = fsck-tests.sh convert-tests.sh
 
 INSTALL = install
@@ -50,6 +50,8 @@
        btrfs btrfs-map-logical btrfs-image btrfs-zero-log btrfs-convert \
        btrfs-find-root btrfstune btrfs-show-super
 
+progs_static = $(foreach p,$(progs),$(p).static)
+
 # external libs required by various binaries; for btrfs-foo,
 # specify btrfs_foo_libs = <list of libs>; see $($(subst...)) rules below
 btrfs_convert_libs = -lext2fs -lcom_err
@@ -57,10 +59,15 @@
 btrfs_fragments_libs = -lgd -lpng -ljpeg -lfreetype
 
 SUBDIRS =
-BUILDDIRS = $(patsubst %,build-%,$(SUBDIRS)) build-Documentation
-INSTALLDIRS = $(patsubst %,install-%,$(SUBDIRS)) install-Documentation
+BUILDDIRS = $(patsubst %,build-%,$(SUBDIRS))
+INSTALLDIRS = $(patsubst %,install-%,$(SUBDIRS))
 CLEANDIRS = $(patsubst %,clean-%,$(SUBDIRS))
 
+ifneq ($(DISABLE_DOCUMENTATION),1)
+BUILDDIRS += build-Documentation
+INSTALLDIRS += install-Documentation
+endif
+
 .PHONY: $(SUBDIRS)
 .PHONY: $(BUILDDIRS)
 .PHONY: $(INSTALLDIRS)
@@ -136,7 +143,7 @@
 # NOTE: For static compiles, you need to have all the required libs
 #      static equivalent available
 #
-static: btrfs.static mkfs.btrfs.static btrfs-find-root.static
+static: $(progs_static)
 
 version.h:
        @echo "    [SH]     $@"
@@ -169,8 +176,8 @@
 btrfs-%.static: $(static_objects) btrfs-%.static.o $(static_libbtrfs_objects)
        @echo "    [LD]     $@"
        $(Q)$(CC) $(STATIC_CFLAGS) -o $@ $@.o $(static_objects) \
-               $(static_libbtrfs_objects) $(STATIC_LDFLAGS) $(STATIC_LIBS) \
-               $($(subst -,_,$(subst .static,,$@)-libs))
+               $(static_libbtrfs_objects) $(STATIC_LDFLAGS) \
+               $($(subst -,_,$(subst .static,,$@)-libs)) $(STATIC_LIBS)
 
 btrfs-%: $(objects) $(libs) btrfs-%.o
        @echo "    [LD]     $@"
@@ -191,6 +198,10 @@
        @echo "    [LN]     $@"
        $(Q)$(LN) -f btrfs btrfsck
 
+btrfsck.static: btrfs.static
+       @echo "    [LN]     $@"
+       $(Q)$(LN) -f $^ $@
+
 mkfs.btrfs: $(objects) $(libs) mkfs.o
        @echo "    [LD]     $@"
        $(Q)$(CC) $(CFLAGS) -o mkfs.btrfs $(objects) mkfs.o $(LDFLAGS) $(LIBS)
@@ -204,6 +215,11 @@
        @echo "    [LD]     $@"
        $(Q)$(CC) $(CFLAGS) -o btrfstune $(objects) btrfstune.o $(LDFLAGS) 
$(LIBS)
 
+btrfstune.static: $(static_objects) btrfstune.static.o 
$(static_libbtrfs_objects)
+       @echo "    [LD]     $@"
+       $(Q)$(CC) $(STATIC_CFLAGS) -o $@ btrfstune.static.o $(static_objects) \
+               $(static_libbtrfs_objects) $(STATIC_LDFLAGS) $(STATIC_LIBS)
+
 dir-test: $(objects) $(libs) dir-test.o
        @echo "    [LD]     $@"
        $(Q)$(CC) $(CFLAGS) -o dir-test $(objects) dir-test.o $(LDFLAGS) $(LIBS)
@@ -253,6 +269,11 @@
        $(INSTALL) -m755 -d $(DESTDIR)$(incdir)
        $(INSTALL) -m644 $(headers) $(DESTDIR)$(incdir)
 
+install-static: $(progs_static) $(INSTALLDIRS)
+       for p in $(progs_static) ; do \
+               $(INSTALL) -D -m755 $$p $(DESTDIR)$(bindir)/`basename $$p 
.static` ; \
+       done
+
 $(INSTALLDIRS):
        @echo "Making install in $(patsubst install-%,%,$@)"
        $(Q)$(MAKE) $(MAKEOPTS) -C $(patsubst install-%,%,$@) install
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v3.16/btrfs-convert.c 
new/btrfs-progs-v3.16.1/btrfs-convert.c
--- old/btrfs-progs-v3.16/btrfs-convert.c       2014-08-26 15:50:36.000000000 
+0200
+++ new/btrfs-progs-v3.16.1/btrfs-convert.c     2014-09-15 15:18:00.000000000 
+0200
@@ -1643,7 +1643,7 @@
 }
 
 /*
- * Migrate super block to it's default position and zero 0 ~ 16k
+ * Migrate super block to its default position and zero 0 ~ 16k
  */
 static int migrate_super_block(int fd, u64 old_bytenr, u32 sectorsize)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v3.16/btrfs-corrupt-block.c 
new/btrfs-progs-v3.16.1/btrfs-corrupt-block.c
--- old/btrfs-progs-v3.16/btrfs-corrupt-block.c 2014-08-26 15:50:36.000000000 
+0200
+++ new/btrfs-progs-v3.16.1/btrfs-corrupt-block.c       2014-09-15 
15:18:00.000000000 +0200
@@ -264,12 +264,10 @@
                                      struct extent_buffer *eb)
 {
        int i;
-       u32 nr;
 
        if (!eb)
                return;
 
-       nr = btrfs_header_nritems(eb);
        if (btrfs_is_leaf(eb)) {
                btrfs_corrupt_extent_leaf(trans, root, eb);
                return;
@@ -280,7 +278,7 @@
                        return;
        }
 
-       for (i = 0; i < nr; i++) {
+       for (i = 0; i < btrfs_header_nritems(eb); i++) {
                struct extent_buffer *next;
 
                next = read_tree_block(root, btrfs_node_blockptr(eb, i),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v3.16/btrfs-list.c 
new/btrfs-progs-v3.16.1/btrfs-list.c
--- old/btrfs-progs-v3.16/btrfs-list.c  2014-08-26 15:50:36.000000000 +0200
+++ new/btrfs-progs-v3.16.1/btrfs-list.c        2014-09-15 15:18:00.000000000 
+0200
@@ -85,6 +85,11 @@
                .need_print     = 0,
        },
        {
+               .name           = "received_uuid",
+               .column_name    = "Received UUID",
+               .need_print     = 0,
+       },
+       {
                .name           = "uuid",
                .column_name    = "UUID",
                .need_print     = 0,
@@ -391,7 +396,7 @@
 static int update_root(struct root_lookup *root_lookup,
                       u64 root_id, u64 ref_tree, u64 root_offset, u64 flags,
                       u64 dir_id, char *name, int name_len, u64 ogen, u64 gen,
-                      time_t ot, void *uuid, void *puuid)
+                      time_t ot, void *uuid, void *puuid, void *ruuid)
 {
        struct root_info *ri;
 
@@ -429,6 +434,8 @@
                memcpy(&ri->uuid, uuid, BTRFS_UUID_SIZE);
        if (puuid)
                memcpy(&ri->puuid, puuid, BTRFS_UUID_SIZE);
+       if (ruuid)
+               memcpy(&ri->ruuid, ruuid, BTRFS_UUID_SIZE);
 
        return 0;
 }
@@ -447,17 +454,19 @@
  * ot: the original time(create time) of the root
  * uuid: uuid of the root
  * puuid: uuid of the root parent if any
+ * ruuid: uuid of the received subvol, if any
  */
 static int add_root(struct root_lookup *root_lookup,
                    u64 root_id, u64 ref_tree, u64 root_offset, u64 flags,
                    u64 dir_id, char *name, int name_len, u64 ogen, u64 gen,
-                   time_t ot, void *uuid, void *puuid)
+                   time_t ot, void *uuid, void *puuid, void *ruuid)
 {
        struct root_info *ri;
        int ret;
 
        ret = update_root(root_lookup, root_id, ref_tree, root_offset, flags,
-                         dir_id, name, name_len, ogen, gen, ot, uuid, puuid);
+                         dir_id, name, name_len, ogen, gen, ot,
+                         uuid, puuid, ruuid);
        if (!ret)
                return 0;
 
@@ -501,6 +510,9 @@
        if (puuid)
                memcpy(&ri->puuid, puuid, BTRFS_UUID_SIZE);
 
+       if (ruuid)
+               memcpy(&ri->ruuid, ruuid, BTRFS_UUID_SIZE);
+
        ret = root_tree_insert(root_lookup, ri);
        if (ret) {
                printf("failed to insert tree %llu\n", (unsigned long 
long)root_id);
@@ -978,6 +990,7 @@
        time_t t;
        u8 uuid[BTRFS_UUID_SIZE];
        u8 puuid[BTRFS_UUID_SIZE];
+       u8 ruuid[BTRFS_UUID_SIZE];
 
        root_lookup_init(root_lookup);
        memset(&args, 0, sizeof(args));
@@ -1030,7 +1043,7 @@
 
                                add_root(root_lookup, sh.objectid, sh.offset,
                                         0, 0, dir_id, name, name_len, 0, 0, 0,
-                                        NULL, NULL);
+                                        NULL, NULL, NULL);
                        } else if (sh.type == BTRFS_ROOT_ITEM_KEY) {
                                ri = (struct btrfs_root_item *)(args.buf + off);
                                gen = btrfs_root_generation(ri);
@@ -1041,16 +1054,18 @@
                                        ogen = btrfs_root_otransid(ri);
                                        memcpy(uuid, ri->uuid, BTRFS_UUID_SIZE);
                                        memcpy(puuid, ri->parent_uuid, 
BTRFS_UUID_SIZE);
+                                       memcpy(ruuid, ri->received_uuid, 
BTRFS_UUID_SIZE);
                                } else {
                                        t = 0;
                                        ogen = 0;
                                        memset(uuid, 0, BTRFS_UUID_SIZE);
                                        memset(puuid, 0, BTRFS_UUID_SIZE);
+                                       memset(ruuid, 0, BTRFS_UUID_SIZE);
                                }
 
                                add_root(root_lookup, sh.objectid, 0,
                                         sh.offset, flags, 0, NULL, 0, ogen,
-                                        gen, t, uuid, puuid);
+                                        gen, t, uuid, puuid, ruuid);
                        }
 
                        off += sh.len;
@@ -1361,6 +1376,13 @@
                        uuid_unparse(subv->puuid, uuidparse);
                printf("%s", uuidparse);
                break;
+       case BTRFS_LIST_RUUID:
+               if (uuid_is_null(subv->ruuid))
+                       strcpy(uuidparse, "-");
+               else
+                       uuid_unparse(subv->ruuid, uuidparse);
+               printf("%s", uuidparse);
+               break;
        case BTRFS_LIST_PATH:
                BUG_ON(!subv->full_path);
                printf("%s", subv->full_path);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v3.16/btrfs-list.h 
new/btrfs-progs-v3.16.1/btrfs-list.h
--- old/btrfs-progs-v3.16/btrfs-list.h  2014-08-26 15:50:36.000000000 +0200
+++ new/btrfs-progs-v3.16.1/btrfs-list.h        2014-09-15 15:18:00.000000000 
+0200
@@ -61,6 +61,7 @@
 
        u8 uuid[BTRFS_UUID_SIZE];
        u8 puuid[BTRFS_UUID_SIZE];
+       u8 ruuid[BTRFS_UUID_SIZE];
 
        /* path from the subvol we live in to this root, including the
         * root's name.  This is null until we do the extra lookup ioctl.
@@ -110,6 +111,7 @@
        BTRFS_LIST_TOP_LEVEL,
        BTRFS_LIST_OTIME,
        BTRFS_LIST_PUUID,
+       BTRFS_LIST_RUUID,
        BTRFS_LIST_UUID,
        BTRFS_LIST_PATH,
        BTRFS_LIST_ALL,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v3.16/cmds-check.c 
new/btrfs-progs-v3.16.1/cmds-check.c
--- old/btrfs-progs-v3.16/cmds-check.c  2014-08-26 15:50:36.000000000 +0200
+++ new/btrfs-progs-v3.16.1/cmds-check.c        2014-09-15 15:18:00.000000000 
+0200
@@ -1287,7 +1287,6 @@
        u32 nritems;
        u32 blocksize;
        int i;
-       int ret;
        int level;
 
        level = btrfs_header_level(node);
@@ -1299,9 +1298,7 @@
        for (i = slot; i < nritems; i++) {
                bytenr = btrfs_node_blockptr(node, i);
                ptr_gen = btrfs_node_ptr_generation(node, i);
-               ret = readahead_tree_block(root, bytenr, blocksize, ptr_gen);
-               if (ret)
-                       break;
+               readahead_tree_block(root, bytenr, blocksize, ptr_gen);
        }
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v3.16/cmds-device.c 
new/btrfs-progs-v3.16.1/cmds-device.c
--- old/btrfs-progs-v3.16/cmds-device.c 2014-08-26 15:50:36.000000000 +0200
+++ new/btrfs-progs-v3.16.1/cmds-device.c       2014-09-15 15:18:00.000000000 
+0200
@@ -295,7 +295,7 @@
 
 static const char * const cmd_ready_dev_usage[] = {
        "btrfs device ready <device>",
-       "Check device to see if it has all of it's devices in cache for 
mounting",
+       "Check device to see if it has all of its devices in cache for 
mounting",
        NULL
 };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v3.16/cmds-filesystem.c 
new/btrfs-progs-v3.16.1/cmds-filesystem.c
--- old/btrfs-progs-v3.16/cmds-filesystem.c     2014-08-26 15:50:36.000000000 
+0200
+++ new/btrfs-progs-v3.16.1/cmds-filesystem.c   2014-09-15 15:18:00.000000000 
+0200
@@ -120,7 +120,10 @@
 
 static char *group_type_str(u64 flag)
 {
-       switch (flag & BTRFS_BLOCK_GROUP_TYPE_MASK) {
+       u64 mask = BTRFS_BLOCK_GROUP_TYPE_MASK |
+               BTRFS_SPACE_INFO_GLOBAL_RSV;
+
+       switch (flag & mask) {
        case BTRFS_BLOCK_GROUP_DATA:
                return "Data";
        case BTRFS_BLOCK_GROUP_SYSTEM:
@@ -129,6 +132,8 @@
                return "Metadata";
        case BTRFS_BLOCK_GROUP_DATA|BTRFS_BLOCK_GROUP_METADATA:
                return "Data+Metadata";
+       case BTRFS_SPACE_INFO_GLOBAL_RSV:
+               return "GlobalReserve";
        default:
                return "unknown";
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v3.16/cmds-restore.c 
new/btrfs-progs-v3.16.1/cmds-restore.c
--- old/btrfs-progs-v3.16/cmds-restore.c        2014-08-26 15:50:36.000000000 
+0200
+++ new/btrfs-progs-v3.16.1/cmds-restore.c      2014-09-15 15:18:00.000000000 
+0200
@@ -191,6 +191,7 @@
                        level++;
                        if (level == BTRFS_MAX_LEVEL)
                                return 1;
+                       offset = 1;
                        continue;
                }
 
@@ -231,13 +232,15 @@
        unsigned long ptr;
        int ret;
        int len;
+       int inline_item_len;
        int compress;
 
        fi = btrfs_item_ptr(leaf, path->slots[0],
                            struct btrfs_file_extent_item);
        ptr = btrfs_file_extent_inline_start(fi);
        len = btrfs_file_extent_inline_len(leaf, path->slots[0], fi);
-       read_extent_buffer(leaf, buf, ptr, len);
+       inline_item_len = btrfs_file_extent_inline_item_len(leaf, 
btrfs_item_nr(path->slots[0]));
+       read_extent_buffer(leaf, buf, ptr, inline_item_len);
 
        compress = btrfs_file_extent_compression(leaf, fi);
        if (compress == BTRFS_COMPRESS_NONE) {
@@ -251,7 +254,7 @@
        }
 
        ram_size = btrfs_file_extent_ram_bytes(leaf, fi);
-       outbuf = malloc(ram_size);
+       outbuf = calloc(1, ram_size);
        if (!outbuf) {
                fprintf(stderr, "No memory\n");
                return -ENOMEM;
@@ -307,7 +310,7 @@
        if (compress == BTRFS_COMPRESS_NONE)
                bytenr += offset;
 
-       if (offset)
+       if (verbose && offset)
                printf("offset is %Lu\n", offset);
        /* we found a hole */
        if (disk_size == 0)
@@ -320,7 +323,7 @@
        }
 
        if (compress != BTRFS_COMPRESS_NONE) {
-               outbuf = malloc(ram_size);
+               outbuf = calloc(1, ram_size);
                if (!outbuf) {
                        fprintf(stderr, "No memory\n");
                        free(inbuf);
@@ -566,7 +569,6 @@
                fprintf(stderr, "Ran out of memory\n");
                return -ENOMEM;
        }
-       path->skip_locking = 1;
 
        ret = btrfs_lookup_inode(NULL, root, path, key, 0);
        if (ret == 0) {
@@ -704,7 +706,6 @@
                fprintf(stderr, "Ran out of memory\n");
                return -ENOMEM;
        }
-       path->skip_locking = 1;
 
        key->offset = 0;
        key->type = BTRFS_DIR_INDEX_KEY;
@@ -1228,7 +1229,6 @@
                }
        }
 
-       set_argv0(argv);
        if (!list_roots && check_argc_min(argc - optind, 2))
                usage(cmd_restore_usage);
        else if (list_roots && check_argc_min(argc - optind, 1))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v3.16/cmds-subvolume.c 
new/btrfs-progs-v3.16.1/cmds-subvolume.c
--- old/btrfs-progs-v3.16/cmds-subvolume.c      2014-08-26 15:50:36.000000000 
+0200
+++ new/btrfs-progs-v3.16.1/cmds-subvolume.c    2014-09-15 15:18:00.000000000 
+0200
@@ -372,6 +372,7 @@
        "-o           print only subvolumes below specified path",
        "-u           print the uuid of subvolumes (and snapshots)",
        "-q           print the parent uuid of the snapshots",
+       "-R           print the uuid of the received snapshots",
        "-t           print the result as a table",
        "-s           list snapshots only in the filesystem",
        "-r           list readonly subvolumes (including snapshots)",
@@ -414,7 +415,7 @@
        optind = 1;
        while(1) {
                c = getopt_long(argc, argv,
-                                   "acdgopqsurG:C:t", long_options, NULL);
+                                   "acdgopqsurRG:C:t", long_options, NULL);
                if (c < 0)
                        break;
 
@@ -455,6 +456,9 @@
                case 'q':
                        btrfs_list_setup_print_column(BTRFS_LIST_PUUID);
                        break;
+               case 'R':
+                       btrfs_list_setup_print_column(BTRFS_LIST_RUUID);
+                       break;
                case 'r':
                        flags |= BTRFS_ROOT_SUBVOL_RDONLY;
                        break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v3.16/ctree.h 
new/btrfs-progs-v3.16.1/ctree.h
--- old/btrfs-progs-v3.16/ctree.h       2014-08-26 15:50:36.000000000 +0200
+++ new/btrfs-progs-v3.16.1/ctree.h     2014-09-15 15:18:00.000000000 +0200
@@ -548,9 +548,6 @@
         * and to force calls to keep space in the nodes
         */
        unsigned int search_for_split:1;
-       unsigned int keep_locks:1;
-       unsigned int skip_locking:1;
-       unsigned int leave_spinning:1;
        unsigned int skip_check_block:1;
 };
 
@@ -863,6 +860,12 @@
 /* used in struct btrfs_balance_args fields */
 #define BTRFS_AVAIL_ALLOC_BIT_SINGLE   (1ULL << 48)
 
+/*
+ * GLOBAL_RSV does not exist as a on-disk block group type and is used
+ * internally for exporting info about global block reserve from space infos
+ */
+#define BTRFS_SPACE_INFO_GLOBAL_RSV    (1ULL << 49)
+
 #define BTRFS_QGROUP_STATUS_OFF                        0
 #define BTRFS_QGROUP_STATUS_ON                 1
 #define BTRFS_QGROUP_STATUS_SCANNING           2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v3.16/disk-io.c 
new/btrfs-progs-v3.16.1/disk-io.c
--- old/btrfs-progs-v3.16/disk-io.c     2014-08-26 15:50:36.000000000 +0200
+++ new/btrfs-progs-v3.16.1/disk-io.c   2014-09-15 15:18:00.000000000 +0200
@@ -134,31 +134,26 @@
                                   blocksize);
 }
 
-int readahead_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize,
-                        u64 parent_transid)
+void readahead_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize,
+                         u64 parent_transid)
 {
-       int ret;
        struct extent_buffer *eb;
        u64 length;
        struct btrfs_multi_bio *multi = NULL;
        struct btrfs_device *device;
 
        eb = btrfs_find_tree_block(root, bytenr, blocksize);
-       if (eb && btrfs_buffer_uptodate(eb, parent_transid)) {
-               free_extent_buffer(eb);
-               return 0;
+       if (!(eb && btrfs_buffer_uptodate(eb, parent_transid)) &&
+           !btrfs_map_block(&root->fs_info->mapping_tree, READ,
+                            bytenr, &length, &multi, 0, NULL)) {
+               device = multi->stripes[0].dev;
+               device->total_ios++;
+               blocksize = min(blocksize, (u32)(64 * 1024));
+               readahead(device->fd, multi->stripes[0].physical, blocksize);
        }
 
-       length = blocksize;
-       ret = btrfs_map_block(&root->fs_info->mapping_tree, READ,
-                             bytenr, &length, &multi, 0, NULL);
-       BUG_ON(ret);
-       device = multi->stripes[0].dev;
-       device->total_ios++;
-       blocksize = min(blocksize, (u32)(64 * 1024));
-       readahead(device->fd, multi->stripes[0].physical, blocksize);
+       free_extent_buffer(eb);
        kfree(multi);
-       return 0;
 }
 
 static int verify_parent_transid(struct extent_io_tree *io_tree,
@@ -633,7 +628,6 @@
        memcpy(&root->root_key, location, sizeof(*location));
        ret = 0;
 out:
-       btrfs_release_path(path);
        btrfs_free_path(path);
        if (ret) {
                free(root);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v3.16/disk-io.h 
new/btrfs-progs-v3.16.1/disk-io.h
--- old/btrfs-progs-v3.16/disk-io.h     2014-08-26 15:50:36.000000000 +0200
+++ new/btrfs-progs-v3.16.1/disk-io.h   2014-09-15 15:18:00.000000000 +0200
@@ -48,8 +48,8 @@
 int read_whole_eb(struct btrfs_fs_info *info, struct extent_buffer *eb, int 
mirror);
 struct extent_buffer *read_tree_block(struct btrfs_root *root, u64 bytenr,
                                      u32 blocksize, u64 parent_transid);
-int readahead_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize,
-                        u64 parent_transid);
+void readahead_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize,
+                         u64 parent_transid);
 struct extent_buffer *btrfs_find_create_tree_block(struct btrfs_root *root,
                                                   u64 bytenr, u32 blocksize);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v3.16/extent-tree.c 
new/btrfs-progs-v3.16.1/extent-tree.c
--- old/btrfs-progs-v3.16/extent-tree.c 2014-08-26 15:50:36.000000000 +0200
+++ new/btrfs-progs-v3.16.1/extent-tree.c       2014-09-15 15:18:00.000000000 
+0200
@@ -1418,7 +1418,6 @@
                return -ENOMEM;
 
        path->reada = 1;
-       path->leave_spinning = 1;
 
        ret = insert_inline_extent_backref(trans, root->fs_info->extent_root,
                                           path, bytenr, num_bytes, parent,
@@ -1440,7 +1439,6 @@
        btrfs_release_path(path);
 
        path->reada = 1;
-       path->leave_spinning = 1;
 
        /* now insert the actual backref */
        ret = insert_extent_backref(trans, root->fs_info->extent_root,
@@ -2195,7 +2193,6 @@
                return -ENOMEM;
 
        path->reada = 1;
-       path->leave_spinning = 1;
 
        is_data = owner_objectid >= BTRFS_FIRST_FREE_OBJECTID;
        if (is_data)
@@ -2239,7 +2236,6 @@
                                                    is_data);
                        BUG_ON(ret);
                        btrfs_release_path(path);
-                       path->leave_spinning = 1;
 
                        key.objectid = bytenr;
 
@@ -2304,7 +2300,6 @@
                BUG_ON(ret < 0);
 
                btrfs_release_path(path);
-               path->leave_spinning = 1;
 
                key.objectid = bytenr;
                key.type = BTRFS_EXTENT_ITEM_KEY;
@@ -2711,7 +2706,6 @@
        path = btrfs_alloc_path();
        BUG_ON(!path);
 
-       path->leave_spinning = 1;
        ret = btrfs_insert_empty_item(trans, fs_info->extent_root, path,
                                      ins, size);
        BUG_ON(ret);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v3.16/extent_io.c 
new/btrfs-progs-v3.16.1/extent_io.c
--- old/btrfs-progs-v3.16/extent_io.c   2014-08-26 15:50:36.000000000 +0200
+++ new/btrfs-progs-v3.16.1/extent_io.c 2014-09-15 15:18:00.000000000 +0200
@@ -552,7 +552,7 @@
 
        list_for_each_safe(node, next, &tree->lru) {
                eb = list_entry(node, struct extent_buffer, lru);
-               if (eb->refs == 1) {
+               if (eb->refs == 1 && !(eb->flags & EXTENT_DIRTY)) {
                        free_extent_buffer(eb);
                        if (tree->cache_size < cache_hard_max)
                                break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v3.16/file-item.c 
new/btrfs-progs-v3.16.1/file-item.c
--- old/btrfs-progs-v3.16/file-item.c   2014-08-26 15:50:36.000000000 +0200
+++ new/btrfs-progs-v3.16.1/file-item.c 2014-09-15 15:18:00.000000000 +0200
@@ -306,7 +306,6 @@
                            csum_size);
        btrfs_mark_buffer_dirty(path->nodes[0]);
 fail:
-       btrfs_release_path(path);
        btrfs_free_path(path);
        return ret;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v3.16/inode-map.c 
new/btrfs-progs-v3.16.1/inode-map.c
--- old/btrfs-progs-v3.16/inode-map.c   2014-08-26 15:50:36.000000000 +0200
+++ new/btrfs-progs-v3.16.1/inode-map.c 2014-09-15 15:18:00.000000000 +0200
@@ -90,12 +90,10 @@
        // FIXME -ENOSPC
 found:
        root->last_inode_alloc = *objectid;
-       btrfs_release_path(path);
        btrfs_free_path(path);
        BUG_ON(*objectid < search_start);
        return 0;
 error:
-       btrfs_release_path(path);
        btrfs_free_path(path);
        return ret;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v3.16/qgroup-verify.c 
new/btrfs-progs-v3.16.1/qgroup-verify.c
--- old/btrfs-progs-v3.16/qgroup-verify.c       2014-08-26 15:50:36.000000000 
+0200
+++ new/btrfs-progs-v3.16.1/qgroup-verify.c     2014-09-15 15:18:00.000000000 
+0200
@@ -63,9 +63,9 @@
  * finding roots to account against.
  *
  * An implied ref is when a tree block has refs on it that may not
- * exist in any of it's child nodes. Even though the refs might not
+ * exist in any of its child nodes. Even though the refs might not
  * exist further down the tree, the fact that our interior node has a
- * ref means we need to account anything below it to all it's roots.
+ * ref means we need to account anything below it to all its roots.
  */
 struct ulist *tree_blocks = NULL;      /* unode->val = bytenr, ->aux
                                         * = tree_block pointer */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v3.16/send-stream.h 
new/btrfs-progs-v3.16.1/send-stream.h
--- old/btrfs-progs-v3.16/send-stream.h 2014-08-26 15:50:36.000000000 +0200
+++ new/btrfs-progs-v3.16.1/send-stream.h       2014-09-15 15:18:00.000000000 
+0200
@@ -18,6 +18,11 @@
 #ifndef SEND_STREAM_H_
 #define SEND_STREAM_H_
 
+/*
+ * NOTE: this file is public API, any incompatible change has to update
+ * library version
+ */
+
 #ifdef __cplusplus
 extern "C" {
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v3.16/utils.c 
new/btrfs-progs-v3.16.1/utils.c
--- old/btrfs-progs-v3.16/utils.c       2014-08-26 15:50:36.000000000 +0200
+++ new/btrfs-progs-v3.16.1/utils.c     2014-09-15 15:18:00.000000000 +0200
@@ -2304,7 +2304,7 @@
 /*
  * For a given:
  * - file or directory return the containing tree root id
- * - subvolume return it's own tree id
+ * - subvolume return its own tree id
  * - BTRFS_EMPTY_SUBVOL_DIR_OBJECTID (directory with ino == 2) the result is
  *   undefined and function returns -1
  */
@@ -2359,8 +2359,8 @@
        while ((ent = getmntent(mnttab))) {
                len = strlen(ent->mnt_dir);
                if (strncmp(ent->mnt_dir, path, len) == 0) {
-                       /* match found */
-                       if (longest_matchlen < len) {
+                       /* match found and use the latest match */
+                       if (longest_matchlen <= len) {
                                free(longest_match);
                                longest_matchlen = len;
                                longest_match = strdup(ent->mnt_dir);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v3.16/version.sh 
new/btrfs-progs-v3.16.1/version.sh
--- old/btrfs-progs-v3.16/version.sh    2014-08-26 15:50:36.000000000 +0200
+++ new/btrfs-progs-v3.16.1/version.sh  2014-09-15 15:18:00.000000000 +0200
@@ -6,7 +6,11 @@
 # Copyright 2008, Oracle
 # Released under the GNU GPLv2
  
-v="v3.16"
+v="v3.16.1"
+
+lib_major=0
+lib_minor=1
+lib_patchlevel=1
 
 which git &> /dev/null
 if [ $? == 0 -a -d .git ]; then
@@ -24,8 +28,19 @@
     fi
 fi
 
-echo "#ifndef __BUILD_VERSION" > .build-version.h
+echo "/* NOTE: this file is autogenerated by version.sh, do not edit */" > 
.build-version.h
+echo "#ifndef __BUILD_VERSION" >> .build-version.h
+echo >> .build-version.h
 echo "#define __BUILD_VERSION" >> .build-version.h
+echo >> .build-version.h
+echo "#define BTRFS_LIB_MAJOR $lib_major" >> .build-version.h
+echo "#define BTRFS_LIB_MINOR $lib_minor" >> .build-version.h
+echo "#define BTRFS_LIB_PATCHLEVEL $lib_patchlevel" >> .build-version.h
+echo >> .build-version.h
+echo "#define BTRFS_LIB_VERSION ( BTRFS_LIB_MAJOR * 10000 + \\" >> 
.build-version.h
+echo "                            BTRFS_LIB_MINOR * 100 + \\" >> 
.build-version.h
+echo "                            BTRFS_LIB_PATCHLEVEL )" >> .build-version.h
+echo >> .build-version.h
 echo "#define BTRFS_BUILD_VERSION \"Btrfs $v\"" >> .build-version.h
 echo "#endif" >> .build-version.h
 

++++++ local-version-override.patch ++++++
--- /var/tmp/diff_new_pack.LYX7Gg/_old  2014-09-25 09:33:27.000000000 +0200
+++ /var/tmp/diff_new_pack.LYX7Gg/_new  2014-09-25 09:33:27.000000000 +0200
@@ -1,13 +1,13 @@
-Index: btrfs-progs-v0.19-116-g13eced9/version.sh
+Index: btrfs-progs-v3.16.1/version.sh
 ===================================================================
---- btrfs-progs-v0.19-116-g13eced9.orig/version.sh
-+++ btrfs-progs-v0.19-116-g13eced9/version.sh
+--- btrfs-progs-v3.16.1.orig/version.sh
++++ btrfs-progs-v3.16.1/version.sh
 @@ -6,7 +6,7 @@
  # Copyright 2008, Oracle
  # Released under the GNU GPLv2
   
--v="v3.16"
-+v="v3.16"
+-v="v3.16.1"
++v="v3.16.1+20140922"
  
- which git &> /dev/null
- if [ $? == 0 -a -d .git ]; then
+ lib_major=0
+ lib_minor=1

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to