Hello community,

here is the log from the commit of package btrfsprogs for openSUSE:Factory 
checked in at 2016-10-04 15:42:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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    2016-09-20 
13:20:35.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.btrfsprogs.new/btrfsprogs.changes       
2016-10-04 15:42:22.000000000 +0200
@@ -1,0 +2,17 @@
+Wed Sep 28 00:00:00 CEST 2016 - [email protected]
+
+- update to 4.7.3
+  * fixed free space tree compat status
+  * check: low-mem mode: handle partially dropped snapshots
+  * dump-super: consolidate options for superblock copy
+  * tree-stats: check mount status
+  * subvol delete: handle verbosity option
+  * defrag: print correct error string
+  * mkfs: fix reading rotational status
+  * other:
+    * UBSAN build option
+    * documentation updates
+    * enhanced tests: convert, fuzzed images, more tools to run on fuzzed
+      images
+
+-------------------------------------------------------------------

Old:
----
  btrfs-progs-v4.7.2.tar.gz

New:
----
  btrfs-progs-v4.7.3.tar.gz

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

Other differences:
------------------
++++++ btrfsprogs.spec ++++++
--- /var/tmp/diff_new_pack.sglz9n/_old  2016-10-04 15:42:24.000000000 +0200
+++ /var/tmp/diff_new_pack.sglz9n/_new  2016-10-04 15:42:24.000000000 +0200
@@ -28,7 +28,7 @@
 %endif
 
 Name:           btrfsprogs
-Version:        4.7.2
+Version:        4.7.3
 Release:        0
 Summary:        Utilities for the Btrfs filesystem
 License:        GPL-2.0

++++++ btrfs-progs-v4.7.2.tar.gz -> btrfs-progs-v4.7.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v4.7.2/CHANGES 
new/btrfs-progs-v4.7.3/CHANGES
--- old/btrfs-progs-v4.7.2/CHANGES      2016-09-05 12:21:24.000000000 +0200
+++ new/btrfs-progs-v4.7.3/CHANGES      2016-09-21 13:59:53.000000000 +0200
@@ -1,3 +1,17 @@
+btrfs-progs-4.7.3 (2016-09-21)
+  * fixed free space tree compat status
+  * check: low-mem mode: handle partially dropped snapshots
+  * dump-super: consolidate options for superblock copy
+  * tree-stats: check mount status
+  * subvol delete: handle verbosity option
+  * defrag: print correct error string
+  * mkfs: fix reading rotational status
+  * other:
+    * UBSAN build option
+    * documentation updates
+    * enhanced tests: convert, fuzzed images, more tools to run on fuzzed
+      images
+
 btrfs-progs-4.7.2 (2016-09-05)
   * check:
     * urgent fix: false report of backref mismatches; do not --repair
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/btrfs-progs-v4.7.2/Documentation/btrfs-inspect-internal.asciidoc 
new/btrfs-progs-v4.7.3/Documentation/btrfs-inspect-internal.asciidoc
--- old/btrfs-progs-v4.7.2/Documentation/btrfs-inspect-internal.asciidoc        
2016-09-05 12:21:24.000000000 +0200
+++ new/btrfs-progs-v4.7.3/Documentation/btrfs-inspect-internal.asciidoc        
2016-09-21 13:59:53.000000000 +0200
@@ -30,25 +30,36 @@
 checks. The superblock checksum status is reported, the device item and
 filesystem UUIDs are checked and reported.
 +
+NOTE: the meaning of option '-s' has changed in version 4.8 to be consistent
+with other tools to specify superblock copy rather the offset. The old way 
still
+works, but prints a warning. Please update your scripts to use '--bytenr'
+instead. The option '-i' has been deprecated.
++
 `Options`
 +
 -f|--full::::
 print full superblock information, including the system chunk array and backup 
roots
 -a|--all::::
-print information about all present superblock copies (cannot be used together 
with '-i' option)
--i <super_mirror>::::
-specify which mirror to print, valid values are 0, 1 and 2 and the superblock 
must be present on the device
+print information about all present superblock copies (cannot be used together
+with '-s' option)
+-i <super>::::
+(deprecated since 4.8, same behaviour as '--super')
+--bytenr <bytenr>::::
+specify offset to a superblock in a non-standard location at 'bytenr', useful
+for debugging (disables the '-f' option)
 +
-If there are multiple options specified, only the last one is applies.
+If there are multiple options specified, only the last one applies.
 +
 -F|--force::::
-attempt to print the superblock even if thre's no valid BTRFS signature found
+attempt to print the superblock even if thre's no valid BTRFS signature found,
+the result may be completely wrong if the data do not resemble a superblock
 +
-The result may be completely wrong if the data do not resemble a superblock.
+-s|--super <bytenr>::::
+(see compatibility note above)
 +
--s <bytenr>::::
-specify offset to a superblock in a non-standard location at 'bytenr', useful
-for debugging (disables the '-f' option)
+specify which mirror to print, valid values are 0, 1 and 2 and the superblock
+must be present on the device with a valid signature, can be used together with
+'--force'
 
 *dump-tree* [options] <device>::
 (replaces the standalone tool *btrfs-debug-tree*)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v4.7.2/Documentation/btrfs-man5.asciidoc 
new/btrfs-progs-v4.7.3/Documentation/btrfs-man5.asciidoc
--- old/btrfs-progs-v4.7.2/Documentation/btrfs-man5.asciidoc    2016-09-05 
12:21:24.000000000 +0200
+++ new/btrfs-progs-v4.7.3/Documentation/btrfs-man5.asciidoc    2016-09-21 
13:59:53.000000000 +0200
@@ -214,15 +214,18 @@
 
 *flushoncommit*::
 *noflushoncommit*::
-(default: on)
+(default: off)
 +
 This option forces any data dirtied by a write in a prior transaction to commit
-as part of the current commit.  This makes the committed state a fully
-consistent view of the file system from the application's perspective (i.e., it
-includes all completed file system operations).  This was previously the
-behavior only when a snapshot was created.
+as part of the current commit, effectively a full filesystem sync.
 +
-Disabling flushing may improve performance but is not crash-safe.
+This makes the committed state a fully consistent view of the file system from
+the application's perspective (i.e., it includes all completed file system
+operations). This was previously the behavior only when a snapshot was
+created.
++
+When off, the filesystem is consistent but buffered writes may last more than
+one transaction commit.
 
 *fragment='type'*::
 (depends on compile-time option BTRFS_DEBUG, since: 4.4, default: off)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/btrfs-progs-v4.7.2/Documentation/btrfs-subvolume.asciidoc 
new/btrfs-progs-v4.7.3/Documentation/btrfs-subvolume.asciidoc
--- old/btrfs-progs-v4.7.2/Documentation/btrfs-subvolume.asciidoc       
2016-09-05 12:21:24.000000000 +0200
+++ new/btrfs-progs-v4.7.3/Documentation/btrfs-subvolume.asciidoc       
2016-09-21 13:59:53.000000000 +0200
@@ -47,7 +47,7 @@
 
 SUBCOMMAND
 -----------
-*create* [-i <qgroupid>] [<dest>]<name>::
+*create* [-i <qgroupid>] [<dest>/]<name>::
 Create a subvolume <name> in <dest>.
 +
 If <dest> is not given, subvolume <name> will be created in the current
@@ -130,14 +130,14 @@
 neither \'+' nor \'-', it means = value.
 -C [+|-]<value>::::
 list subvolumes in the filesystem that its ogeneration is
->=, \<= or = value. The usage is the same to '-g' option.
+>=, \<= or = value. The usage is the same to '-G' option.
 --sort=rootid,gen,ogen,path::::
 list subvolumes in order by specified items.
 you can add \'\+' or \'-' in front of each items, \'+' means ascending,
 \'-' means descending. The default is ascending.
 +
 for --sort you can combine some items together by \',', just like
--sort=+ogen,-gen,path,rootid.
+--sort=+ogen,-gen,path,rootid.
 
 *set-default* <id> <path>::
 Set the subvolume of the filesystem <path> which is mounted as
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v4.7.2/Documentation/mkfs.btrfs.asciidoc 
new/btrfs-progs-v4.7.3/Documentation/mkfs.btrfs.asciidoc
--- old/btrfs-progs-v4.7.2/Documentation/mkfs.btrfs.asciidoc    2016-09-05 
12:21:24.000000000 +0200
+++ new/btrfs-progs-v4.7.3/Documentation/mkfs.btrfs.asciidoc    2016-09-21 
13:59:53.000000000 +0200
@@ -263,18 +263,30 @@
 .2+^.<h| Profile   3+^.^h| Redundancy           .2+^.<h| Min/max devices
       ^.^h| Copies   ^.^h| Parity     ^.<h| Striping
 | single  | 1            |                |            | 1/any
-| DUP     | 2 / 1 device |                |            | 1/any ^(see note)^
+| DUP     | 2 / 1 device |                |            | 1/any ^(see note 1)^
 | RAID0   |              |                | 1 to N     | 2/any
 | RAID1   | 2            |                |            | 2/any
 | RAID10  | 2            |                | 1 to N     | 4/any
-| RAID5   | 1            | 1              | 2 to N - 1 | 2/any
-| RAID6   | 1            | 2              | 3 to N - 2 | 3/any
+| RAID5   | 1            | 1              | 2 to N - 1 | 2/any ^(see note 2)^
+| RAID6   | 1            | 2              | 3 to N - 2 | 3/any ^(see note 3)^
 |=============================================================
 
-'Note:' DUP may exist on more than 1 device if it starts on a single device and
+WARNING: It's not recommended to build btrfs with RAID0/1/10/5/6 prfiles on
+partitions from the same device.  Neither redundancy nor performance will be
+improved.
+
+'Note 1:' DUP may exist on more than 1 device if it starts on a single device 
and
 another one is added. Since version 4.5.1, *mkfs.btrfs* will let you create DUP
 on multiple devices.
 
+'Note 2:' It's not recommended to use 2 devices with RAID5. In that case,
+parity stripe will contain the same data as the data stripe, making RAID5
+degraded to RAID1 with more overhead.
+
+'Note 3:' It's also not recommended to use 3 devices with RAID6, unless you
+want to get effectively 3 copies in a RAID1-like manner (but not exactly that).
+N-copies RAID1 is not implemented.
+
 DUP PROFILES ON A SINGLE DEVICE
 -------------------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v4.7.2/Makefile.in 
new/btrfs-progs-v4.7.3/Makefile.in
--- old/btrfs-progs-v4.7.2/Makefile.in  2016-09-05 12:21:24.000000000 +0200
+++ new/btrfs-progs-v4.7.3/Makefile.in  2016-09-21 13:59:53.000000000 +0200
@@ -18,6 +18,7 @@
 #                  abort   - call abort() on first error (dumps core)
 #                  all     - shortcut for all of the above
 #                  asan    - enable address sanitizer compiler feature
+#                  ubsan   - undefined behaviour sanitizer compiler feature
 #   W=123          build with warnings (default: off)
 #   DEBUG_CFLAGS   additional compiler flags for debugging build
 #   EXTRA_CFLAGS   additional compiler flags
@@ -150,6 +151,10 @@
   DEBUG_CFLAGS_INTERNAL += -fsanitize=address
 endif
 
+ifneq (,$(findstring ubsan,$(D)))
+  DEBUG_CFLAGS_INTERNAL += -fsanitize=undefined
+endif
+
 MAKEOPTS = --no-print-directory Q=$(Q)
 
 # build all by default
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v4.7.2/btrfs-convert.c 
new/btrfs-progs-v4.7.3/btrfs-convert.c
--- old/btrfs-progs-v4.7.2/btrfs-convert.c      2016-09-05 12:21:24.000000000 
+0200
+++ new/btrfs-progs-v4.7.3/btrfs-convert.c      2016-09-21 13:59:53.000000000 
+0200
@@ -2373,10 +2373,8 @@
        mkfs_cfg.stripesize = blocksize;
        mkfs_cfg.features = features;
        /* New convert need these space */
-       mkfs_cfg.fs_uuid = malloc(BTRFS_UUID_UNPARSED_SIZE);
-       mkfs_cfg.chunk_uuid = malloc(BTRFS_UUID_UNPARSED_SIZE);
-       *(mkfs_cfg.fs_uuid) = '\0';
-       *(mkfs_cfg.chunk_uuid) = '\0';
+       memset(mkfs_cfg.chunk_uuid, 0, BTRFS_UUID_UNPARSED_SIZE);
+       memset(mkfs_cfg.fs_uuid, 0, BTRFS_UUID_UNPARSED_SIZE);
 
        ret = make_btrfs(fd, &mkfs_cfg, &cctx);
        if (ret) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v4.7.2/cmds-check.c 
new/btrfs-progs-v4.7.3/cmds-check.c
--- old/btrfs-progs-v4.7.2/cmds-check.c 2016-09-05 12:21:24.000000000 +0200
+++ new/btrfs-progs-v4.7.3/cmds-check.c 2016-09-21 13:59:53.000000000 +0200
@@ -9063,9 +9063,10 @@
        free_extent_buffer(eb);
 
        btrfs_init_path(&path);
+       path.lowest_level = level;
        /* Search with the first key, to ensure we can reach it */
        ret = btrfs_search_slot(NULL, root, &key, &path, 0, 0);
-       if (ret) {
+       if (ret < 0) {
                err |= REFERENCER_MISSING;
                goto release_out;
        }
@@ -9948,6 +9949,8 @@
                                struct extent_buffer *node)
 {
        struct extent_buffer *eb;
+       struct btrfs_key key;
+       struct btrfs_key drop_key;
        int level;
        u64 nr;
        int i;
@@ -9993,6 +9996,7 @@
        }
 
        nr = btrfs_header_nritems(node);
+       btrfs_disk_key_to_cpu(&drop_key, &root->root_item.drop_progress);
        btree_space_waste += (BTRFS_NODEPTRS_PER_BLOCK(root) - nr) *
                sizeof(struct btrfs_key_ptr);
 
@@ -10000,6 +10004,11 @@
        for (i = 0; i < nr; i++) {
                u64 blocknr = btrfs_node_blockptr(node, i);
 
+               btrfs_node_key_to_cpu(node, &key, i);
+               if (level == root->root_item.drop_level &&
+                   is_dropped_key(&key, &drop_key))
+                       continue;
+
                /*
                 * As a btrfs tree has most 8 levels (0..7), so it's quite safe
                 * to call the function itself.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v4.7.2/cmds-filesystem.c 
new/btrfs-progs-v4.7.3/cmds-filesystem.c
--- old/btrfs-progs-v4.7.2/cmds-filesystem.c    2016-09-05 12:21:24.000000000 
+0200
+++ new/btrfs-progs-v4.7.3/cmds-filesystem.c    2016-09-21 13:59:53.000000000 
+0200
@@ -993,32 +993,35 @@
                int typeflag, struct FTW *ftwbuf)
 {
        int ret = 0;
-       int e = 0;
+       int err = 0;
        int fd = 0;
 
        if ((typeflag == FTW_F) && S_ISREG(sb->st_mode)) {
                if (defrag_global_verbose)
                        printf("%s\n", fpath);
                fd = open(fpath, O_RDWR);
-               if (fd < 0)
+               if (fd < 0) {
+                       err = errno;
                        goto error;
+               }
                ret = do_defrag(fd, defrag_global_fancy_ioctl, 
&defrag_global_range);
-               e = errno;
                close(fd);
-               if (ret && e == ENOTTY && defrag_global_fancy_ioctl) {
+               if (ret && errno == ENOTTY && defrag_global_fancy_ioctl) {
                        error("defrag range ioctl not "
                                "supported in this kernel, please try "
                                "without any options.");
                        defrag_global_errors++;
                        return ENOTTY;
                }
-               if (ret)
+               if (ret) {
+                       err = errno;
                        goto error;
+               }
        }
        return 0;
 
 error:
-       error("defrag failed on %s: %s", fpath, strerror(e));
+       error("defrag failed on %s: %s", fpath, strerror(err));
        defrag_global_errors++;
        return 0;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v4.7.2/cmds-inspect-dump-super.c 
new/btrfs-progs-v4.7.3/cmds-inspect-dump-super.c
--- old/btrfs-progs-v4.7.2/cmds-inspect-dump-super.c    2016-09-05 
12:21:24.000000000 +0200
+++ new/btrfs-progs-v4.7.3/cmds-inspect-dump-super.c    2016-09-21 
13:59:53.000000000 +0200
@@ -458,11 +458,18 @@
 const char * const cmd_inspect_dump_super_usage[] = {
        "btrfs inspect-internal dump-super [options] device [device...]",
        "Dump superblock from a device in a textual form",
-       "-f|--full           print full superblock information",
-       "-a|--all            print information about all superblocks",
-       "-i <super_mirror>   specify which mirror to print out",
-       "-F|--force          attempt to dump superblocks with bad magic",
-       "-s <bytenr>         specify alternate superblock offset",
+       "-f|--full             print full superblock information, backup roots 
etc.",
+       "-a|--all              print information about all superblocks",
+       "-s|--super <super>    specify which copy to print out (values: 0, 1, 
2)",
+       "-F|--force            attempt to dump superblocks with bad magic",
+       "--bytenr <offset>     specify alternate superblock offset",
+       "",
+       "Deprecated syntax:",
+       "-s <bytenr>           specify alternate superblock offset, values 
other than 0, 1, 2",
+       "                      will be interpreted as --bytenr for backward 
compatibility,",
+       "                      option renamed for consistency with other tools 
(eg. check)",
+       "-i <super>            specify which copy to print out (values: 0, 1, 
2), now moved",
+       "                      to -s|--super",
        NULL
 };
 
@@ -484,6 +491,7 @@
                        {"all", no_argument, NULL, 'a'},
                        {"full", no_argument, NULL, 'f'},
                        {"force", no_argument, NULL, 'F'},
+                       {"super", required_argument, NULL, 's' },
                        {NULL, 0, NULL, 0}
                };
 
@@ -493,11 +501,13 @@
 
                switch (c) {
                case 'i':
+                       warning(
+                           "option -i is deprecated, please use -s or 
--super");
                        arg = arg_strtou64(optarg);
                        if (arg >= BTRFS_SUPER_MIRROR_MAX) {
                                error("super mirror too big: %llu >= %d",
                                        arg, BTRFS_SUPER_MIRROR_MAX);
-                               usage(cmd_inspect_dump_super_usage);
+                               return 1;
                        }
                        sb_bytenr = btrfs_sb_offset(arg);
                        break;
@@ -512,7 +522,15 @@
                        force = 1;
                        break;
                case 's':
-                       sb_bytenr = arg_strtou64(optarg);
+                       arg = arg_strtou64(optarg);
+                       if (BTRFS_SUPER_MIRROR_MAX <= arg) {
+                               warning(
+               "deprecated use of -s <bytenr> with %llu, assuming --bytenr",
+                                               (unsigned long long)arg);
+                               sb_bytenr = arg;
+                       } else {
+                               sb_bytenr = btrfs_sb_offset(arg);
+                       }
                        all = 0;
                        break;
                default:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v4.7.2/cmds-inspect-tree-stats.c 
new/btrfs-progs-v4.7.3/cmds-inspect-tree-stats.c
--- old/btrfs-progs-v4.7.2/cmds-inspect-tree-stats.c    2016-09-05 
12:21:24.000000000 +0200
+++ new/btrfs-progs-v4.7.3/cmds-inspect-tree-stats.c    2016-09-21 
13:59:53.000000000 +0200
@@ -457,18 +457,14 @@
                usage(cmd_inspect_tree_stats_usage);
        }
 
-       /*
-       if ((ret = check_mounted(argv[optind])) < 0) {
-               fprintf(stderr, "Could not check mount status: %d\n", ret);
-               if (ret == -EACCES)
-                       fprintf(stderr, "Maybe you need to run as root?\n");
-               return ret;
+       ret = check_mounted(argv[optind]);
+       if (ret < 0) {
+               warning("unable to check mount status of: %s",
+                               strerror(-ret));
        } else if (ret) {
-               fprintf(stderr, "%s is currently mounted.  Aborting.\n",
-                       argv[optind]);
-               return -EBUSY;
+               warning("%s already mounted, results may be inaccurate",
+                               argv[optind]);
        }
-       */
 
        root = open_ctree(argv[optind], 0, 0);
        if (!root) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v4.7.2/cmds-subvolume.c 
new/btrfs-progs-v4.7.3/cmds-subvolume.c
--- old/btrfs-progs-v4.7.2/cmds-subvolume.c     2016-09-05 12:21:24.000000000 
+0200
+++ new/btrfs-progs-v4.7.3/cmds-subvolume.c     2016-09-21 13:59:53.000000000 
+0200
@@ -128,7 +128,7 @@
        DIR     *dirstream = NULL;
 
        while (1) {
-               int c = getopt(argc, argv, "c:i:v");
+               int c = getopt(argc, argv, "c:i:");
                if (c < 0)
                        break;
 
@@ -245,6 +245,7 @@
        "",
        "-c|--commit-after      wait for transaction commit at the end of the 
operation",
        "-C|--commit-each       wait for transaction commit after deleting each 
subvolume",
+       "-v|--verbose           verbose output of operations",
        NULL
 };
 
@@ -267,10 +268,11 @@
                static const struct option long_options[] = {
                        {"commit-after", no_argument, NULL, 'c'},  /* commit 
mode 1 */
                        {"commit-each", no_argument, NULL, 'C'},  /* commit 
mode 2 */
+                       {"verbose", no_argument, NULL, 'v'},
                        {NULL, 0, NULL, 0}
                };
 
-               c = getopt_long(argc, argv, "cC", long_options, NULL);
+               c = getopt_long(argc, argv, "cCv", long_options, NULL);
                if (c < 0)
                        break;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v4.7.2/configure 
new/btrfs-progs-v4.7.3/configure
--- old/btrfs-progs-v4.7.2/configure    2016-09-05 12:23:11.000000000 +0200
+++ new/btrfs-progs-v4.7.3/configure    2016-09-21 14:02:33.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for btrfs-progs v4.7.2.
+# Generated by GNU Autoconf 2.69 for btrfs-progs v4.7.3.
 #
 # Report bugs to <[email protected]>.
 #
@@ -580,8 +580,8 @@
 # Identity of this package.
 PACKAGE_NAME='btrfs-progs'
 PACKAGE_TARNAME='btrfs-progs'
-PACKAGE_VERSION='v4.7.2'
-PACKAGE_STRING='btrfs-progs v4.7.2'
+PACKAGE_VERSION='v4.7.3'
+PACKAGE_STRING='btrfs-progs v4.7.3'
 PACKAGE_BUGREPORT='[email protected]'
 PACKAGE_URL='http://btrfs.wiki.kernel.org'
 
@@ -1290,7 +1290,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures btrfs-progs v4.7.2 to adapt to many kinds of systems.
+\`configure' configures btrfs-progs v4.7.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1355,7 +1355,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of btrfs-progs v4.7.2:";;
+     short | recursive ) echo "Configuration of btrfs-progs v4.7.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1471,7 +1471,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-btrfs-progs configure v4.7.2
+btrfs-progs configure v4.7.3
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1840,7 +1840,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by btrfs-progs $as_me v4.7.2, which was
+It was created by btrfs-progs $as_me v4.7.3, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -6684,7 +6684,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by btrfs-progs $as_me v4.7.2, which was
+This file was extended by btrfs-progs $as_me v4.7.3, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -6747,7 +6747,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-btrfs-progs config.status v4.7.2
+btrfs-progs config.status v4.7.3
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v4.7.2/ctree.h 
new/btrfs-progs-v4.7.3/ctree.h
--- old/btrfs-progs-v4.7.2/ctree.h      2016-09-05 12:21:24.000000000 +0200
+++ new/btrfs-progs-v4.7.3/ctree.h      2016-09-21 13:59:53.000000000 +0200
@@ -490,8 +490,7 @@
 
 #define BTRFS_FEATURE_COMPAT_SUPP              0ULL
 
-#define BTRFS_FEATURE_COMPAT_RO_SUPP                   \
-       (BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE)
+#define BTRFS_FEATURE_COMPAT_RO_SUPP           0ULL
 
 #define BTRFS_FEATURE_INCOMPAT_SUPP                    \
        (BTRFS_FEATURE_INCOMPAT_MIXED_BACKREF |         \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v4.7.2/disk-io.c 
new/btrfs-progs-v4.7.3/disk-io.c
--- old/btrfs-progs-v4.7.2/disk-io.c    2016-09-05 12:21:24.000000000 +0200
+++ new/btrfs-progs-v4.7.3/disk-io.c    2016-09-21 13:59:53.000000000 +0200
@@ -1149,7 +1149,9 @@
        dev_size = seek_ret;
        lseek(fd, 0, SEEK_SET);
        if (sb_bytenr > dev_size) {
-               fprintf(stderr, "Superblock bytenr is larger than device 
size\n");
+               error("superblock bytenr %llu is larger than device size %llu",
+                               (unsigned long long)sb_bytenr,
+                               (unsigned long long)dev_size);
                return -EINVAL;
        }
 
@@ -1439,7 +1441,7 @@
 
        csum_type = btrfs_super_csum_type(sb);
        if (csum_type >= ARRAY_SIZE(btrfs_csum_sizes)) {
-               error("unsupported checksum algorithm %u\n", csum_type);
+               error("unsupported checksum algorithm %u", csum_type);
                return -EIO;
        }
        csum_size = btrfs_csum_sizes[csum_type];
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v4.7.2/extent-tree.c 
new/btrfs-progs-v4.7.3/extent-tree.c
--- old/btrfs-progs-v4.7.2/extent-tree.c        2016-09-05 12:21:24.000000000 
+0200
+++ new/btrfs-progs-v4.7.3/extent-tree.c        2016-09-21 13:59:53.000000000 
+0200
@@ -3259,6 +3259,8 @@
                cache->cached = 0;
                cache->pinned = 0;
                key.objectid = found_key.objectid + found_key.offset;
+               if (found_key.offset == 0)
+                       key.objectid++;
                btrfs_release_path(path);
                cache->flags = btrfs_block_group_flags(&cache->item);
                bit = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v4.7.2/extent_io.h 
new/btrfs-progs-v4.7.3/extent_io.h
--- old/btrfs-progs-v4.7.2/extent_io.h  2016-09-05 12:21:24.000000000 +0200
+++ new/btrfs-progs-v4.7.3/extent_io.h  2016-09-21 13:59:53.000000000 +0200
@@ -97,7 +97,7 @@
        int refs;
        u32 flags;
        int fd;
-       char data[];
+       char data[] __attribute__((aligned(8)));
 };
 
 static inline void extent_buffer_get(struct extent_buffer *eb)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v4.7.2/mkfs.c 
new/btrfs-progs-v4.7.3/mkfs.c
--- old/btrfs-progs-v4.7.2/mkfs.c       2016-09-05 12:21:24.000000000 +0200
+++ new/btrfs-progs-v4.7.3/mkfs.c       2016-09-21 13:59:53.000000000 +0200
@@ -1193,13 +1193,13 @@
                return 0;
        }
 
-       if (read(fd, &rotational, sizeof(char)) < sizeof(char)) {
+       if (read(fd, &rotational, 1) < 1) {
                close(fd);
                return 0;
        }
        close(fd);
 
-       return !atoi((const char *)&rotational);
+       return rotational == '0';
 }
 
 static int _cmp_device_by_id(void *priv, struct list_head *a,
@@ -1735,7 +1735,7 @@
        }
 
        mkfs_cfg.label = label;
-       mkfs_cfg.fs_uuid = fs_uuid;
+       memcpy(mkfs_cfg.fs_uuid, fs_uuid, sizeof(mkfs_cfg.fs_uuid));
        memcpy(mkfs_cfg.blocks, blocks, sizeof(blocks));
        mkfs_cfg.num_bytes = dev_block_count;
        mkfs_cfg.nodesize = nodesize;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v4.7.2/tests/common.convert 
new/btrfs-progs-v4.7.3/tests/common.convert
--- old/btrfs-progs-v4.7.2/tests/common.convert 2016-09-05 12:21:24.000000000 
+0200
+++ new/btrfs-progs-v4.7.3/tests/common.convert 2016-09-21 13:59:53.000000000 
+0200
@@ -123,6 +123,38 @@
                count=1 >/dev/null 2>&1
        run_check_stdout $SUDO_HELPER find $TEST_MNT -type f ! -name 'image' 
-exec md5sum {} \+ > "$CHECKSUMTMP"
 }
+# list $TEST_MNT data set file permissions.
+# $1: path where the permissions will be stored
+convert_test_perm() {
+       local PERMTMP
+       PERMTMP="$1"
+       FILES_LIST=$(mktemp --tmpdir btrfs-progs-convert.fileslistXXXXXX)
+
+       run_check $SUDO_HELPER dd if=/dev/zero of=$TEST_MNT/test bs=$nodesize \
+               count=1 >/dev/null 2>&1
+       run_check_stdout $SUDO_HELPER find $TEST_MNT -type f ! -name 'image' 
-fprint $FILES_LIST
+       # Fix directory entries order
+       sort $FILES_LIST -o $FILES_LIST
+       for file in `cat $FILES_LIST` ;do
+               run_check_stdout $SUDO_HELPER getfacl --absolute-names $file >> 
"$PERMTMP"
+       done
+       rm -- $FILES_LIST
+}
+# list acls of files on $TEST_MNT
+# $1: path where the acls will be stored
+convert_test_acl() {
+       local ACLSTMP
+       ACLTMP="$1"
+       FILES_LIST=$(mktemp --tmpdir btrfs-progs-convert.fileslistXXXXXX)
+
+       run_check_stdout $SUDO_HELPER find $TEST_MNT/acls -type f -fprint 
$FILES_LIST
+       # Fix directory entries order
+       sort $FILES_LIST -o $FILES_LIST
+       for file in `cat $FILES_LIST`;do
+               run_check_stdout $SUDO_HELPER getfattr --absolute-names -d 
$file >> "$ACLTMP"
+       done
+       rm -- $FILES_LIST
+}
 
 # do conversion with given features and nodesize, fsck afterwards
 # $1: features, argument of -O, can be empty
@@ -133,15 +165,68 @@
        run_check $TOP/btrfs-show-super -Ffa $TEST_DEV
 }
 
+# post conversion check, verify file permissions.
+# $1: file with ext permissions.
+convert_test_post_check_permissions() {
+       local EXT_PERMTMP
+       local BTRFS_PERMTMP
+
+       EXT_PERMTMP="$1"
+       BTRFS_PERMTMP=$(mktemp --tmpdir btrfs-progs-convert.permXXXXXX)
+       convert_test_perm "$BTRFS_PERMTMP"
+
+       btrfs_perm=`md5sum $BTRFS_PERMTMP | cut -f1 -d' '`
+       ext_perm=`md5sum $EXT_PERMTMP | cut -f1 -d' '`
+
+       if [ "$btrfs_perm" != "$ext_perm" ];
+       then
+               btrfs_perm_file=`md5sum $BTRFS_PERMTMP | cut -f2 -d' '`
+               ext_perm_file=`md5sum $EXT_PERMTMP | cut -f2 -d' '`
+               _fail "file permission failed. Mismatched 
BTRFS:$btrfs_perm_file:$btrfs_perm EXT:$ext_perm_file:$ext_perm"
+       fi
+
+       rm -- $BTRFS_PERMTMP
+}
+# post conversion check, compare BTRFS file acls against EXT.
+# $1: file with ext acls.
+convert_test_post_check_acl() {
+       local EXT_ACLTMP
+       local BTRFS_ACLTMP
+
+       EXT_ACLTMP="$1"
+       BTRFS_ACLTMP=$(mktemp --tmpdir btrfs-progs-convert.aclsXXXXXXX)
+       convert_test_acl "$BTRFS_ACLTMP"
+
+       btrfs_acl=`md5sum $BTRFS_ACLTMP | cut -f1 -d' '`
+       ext_acl=`md5sum $EXT_ACLTMP | cut -f1 -d' '`
+
+       if [ "$btrfs_acl" != "$ext_acl" ]
+       then
+               btrfs_acl_file=`md5sum $BTRFS_ACLTMP | cut -f2 -d' '`
+               ext_acl_file=`md5sum $EXT_ACLTMP | cut -f2 -d' '`
+               _fail "file acl failed. Mismatched 
BTRFS:$btrfs_acl_file:$btrfs_acl EXT:$ext_acl_file:$ext_acl"
+       fi
+
+       rm -- $BTRFS_ACLTMP
+}
 # post conversion checks, verify md5sums
 # $1: file with checksums
+# $2: file with permissions.
+# $3: file with acl entries.
 convert_test_post_check() {
        local CHECKSUMTMP
+       local EXT_PERMTMP
+       local EXT_ACLTMP
+
        CHECKSUMTMP="$1"
+       EXT_PERMTMP="$2"
+       EXT_ACLTMP="$3"
 
        run_check_mount_test_dev
        run_check_stdout $SUDO_HELPER md5sum -c "$CHECKSUMTMP" |
                grep -q 'FAILED' && _fail "file validation failed"
+       convert_test_post_check_permissions "$EXT_PERMTMP"
+       convert_test_post_check_acl "$EXT_ACLTMP"
        run_check_umount_test_dev
 }
 
@@ -161,6 +246,8 @@
        local nodesize
        local msg
        local CHECKSUMTMP
+       local EXT_PERMTMP
+       local EXT_ACLTMP
 
        features="$1"
        msg="$2"
@@ -170,13 +257,19 @@
        convert_test_prep_fs "$@"
        populate_fs
        CHECKSUMTMP=$(mktemp --tmpdir btrfs-progs-convert.XXXXXXXXXX)
+       EXT_PERMTMP=$(mktemp --tmpdir btrfs-progs-convert.permXXXXXX)
+       EXT_ACLTMP=$(mktemp --tmpdir btrfs-progs-convert.aclsXXXXXXX)
        convert_test_gen_checksums "$CHECKSUMTMP"
+       convert_test_perm "$EXT_PERMTMP"
+       convert_test_acl "$EXT_ACLTMP"
 
        run_check_umount_test_dev
 
        convert_test_do_convert "$features" "$nodesize"
-       convert_test_post_check "$CHECKSUMTMP"
+       convert_test_post_check "$CHECKSUMTMP" "$EXT_PERMTMP" "$EXT_ACLTMP"
        rm $CHECKSUMTMP
+       rm $EXT_PERMTMP
+       rm $EXT_ACLTMP
 
        convert_test_post_rollback
 }
Files 
old/btrfs-progs-v4.7.2/tests/fsck-tests/021-partially-dropped-snapshot-case/dropped-snapshot.img
 and 
new/btrfs-progs-v4.7.3/tests/fsck-tests/021-partially-dropped-snapshot-case/dropped-snapshot.img
 differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/btrfs-progs-v4.7.2/tests/fsck-tests/021-partially-dropped-snapshot-case/test.sh
 
new/btrfs-progs-v4.7.3/tests/fsck-tests/021-partially-dropped-snapshot-case/test.sh
--- 
old/btrfs-progs-v4.7.2/tests/fsck-tests/021-partially-dropped-snapshot-case/test.sh
 1970-01-01 01:00:00.000000000 +0100
+++ 
new/btrfs-progs-v4.7.3/tests/fsck-tests/021-partially-dropped-snapshot-case/test.sh
 2016-09-21 13:59:53.000000000 +0200
@@ -0,0 +1,18 @@
+#!/bin/bash
+# confirm whether btrfsck supports to check a partially dropped snapshot
+
+source $TOP/tests/common
+
+check_prereq btrfs
+
+for img in *.img
+do
+       image=$(extract_image $img)
+       run_check_stdout $TOP/btrfs check "$image" 2>&1 |
+               grep -q "Errors found in extent allocation tree or chunk 
allocation"
+       if [ $? -eq 0 ]; then
+               rm -f "$image"
+               _fail "unexpected error occurred when checking $img"
+       fi
+       rm -f "$image"
+done
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/btrfs-progs-v4.7.2/tests/fuzz-tests/001-simple-check-unmounted/test.sh 
new/btrfs-progs-v4.7.3/tests/fuzz-tests/001-simple-check-unmounted/test.sh
--- old/btrfs-progs-v4.7.2/tests/fuzz-tests/001-simple-check-unmounted/test.sh  
1970-01-01 01:00:00.000000000 +0100
+++ new/btrfs-progs-v4.7.3/tests/fuzz-tests/001-simple-check-unmounted/test.sh  
2016-09-21 13:59:53.000000000 +0200
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# iterate over all fuzzed images and run 'btrfs check'
+
+source $TOP/tests/common
+
+setup_root_helper
+check_prereq btrfs
+
+# redefine the one provided by common
+check_image() {
+       local image
+
+       image=$1
+       run_mayfail $TOP/btrfs check "$image"
+}
+
+check_all_images $TOP/tests/fuzz-tests/images
+
+exit 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/btrfs-progs-v4.7.2/tests/fuzz-tests/001-simple-unmounted/test.sh 
new/btrfs-progs-v4.7.3/tests/fuzz-tests/001-simple-unmounted/test.sh
--- old/btrfs-progs-v4.7.2/tests/fuzz-tests/001-simple-unmounted/test.sh        
2016-09-05 12:21:24.000000000 +0200
+++ new/btrfs-progs-v4.7.3/tests/fuzz-tests/001-simple-unmounted/test.sh        
1970-01-01 01:00:00.000000000 +0100
@@ -1,20 +0,0 @@
-#!/bin/bash
-
-# iterate over all fuzzed images and run 'btrfs check'
-
-source $TOP/tests/common
-
-setup_root_helper
-check_prereq btrfs
-
-# redefine the one provided by common
-check_image() {
-       local image
-
-       image=$1
-       run_mayfail $TOP/btrfs check "$image"
-}
-
-check_all_images $TOP/tests/fuzz-tests/images
-
-exit 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/btrfs-progs-v4.7.2/tests/fuzz-tests/002-simple-image/test.sh 
new/btrfs-progs-v4.7.3/tests/fuzz-tests/002-simple-image/test.sh
--- old/btrfs-progs-v4.7.2/tests/fuzz-tests/002-simple-image/test.sh    
1970-01-01 01:00:00.000000000 +0100
+++ new/btrfs-progs-v4.7.3/tests/fuzz-tests/002-simple-image/test.sh    
2016-09-21 13:59:53.000000000 +0200
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+# iterate over all fuzzed images and run 'btrfs-image'
+
+source $TOP/tests/common
+
+setup_root_helper
+check_prereq btrfs-image
+
+# redefine the one provided by common
+check_image() {
+       local image
+
+       image=$1
+       truncate -s0 target
+       run_mayfail $TOP/btrfs-image "$image" target
+       truncate -s0 target
+}
+
+check_all_images $TOP/tests/fuzz-tests/images
+
+rm -- target
+
+exit 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/btrfs-progs-v4.7.2/tests/fuzz-tests/003-multi-check-unmounted/test.sh 
new/btrfs-progs-v4.7.3/tests/fuzz-tests/003-multi-check-unmounted/test.sh
--- old/btrfs-progs-v4.7.2/tests/fuzz-tests/003-multi-check-unmounted/test.sh   
1970-01-01 01:00:00.000000000 +0100
+++ new/btrfs-progs-v4.7.3/tests/fuzz-tests/003-multi-check-unmounted/test.sh   
2016-09-21 13:59:53.000000000 +0200
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+# iterate over all fuzzed images and run 'btrfs check', try various options to
+# get more code coverage
+
+source $TOP/tests/common
+
+setup_root_helper
+check_prereq btrfs
+
+# redefine the one provided by common
+check_image() {
+       local image
+
+       image=$1
+       run_mayfail $TOP/btrfs check -s 1 "$image"
+       run_mayfail $TOP/btrfs check --init-csum-tree "$image"
+       run_mayfail $TOP/btrfs check --init-extent-tree "$image"
+       run_mayfail $TOP/btrfs check --check-data-csum "$image"
+       run_mayfail $TOP/btrfs check --subvol-extents "$image"
+       run_mayfail $TOP/btrfs check --repair "$image"
+}
+
+check_all_images $TOP/tests/fuzz-tests/images
+
+exit 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/btrfs-progs-v4.7.2/tests/fuzz-tests/images/bko-155151-bad-block-group-offset.raw.txt
 
new/btrfs-progs-v4.7.3/tests/fuzz-tests/images/bko-155151-bad-block-group-offset.raw.txt
--- 
old/btrfs-progs-v4.7.2/tests/fuzz-tests/images/bko-155151-bad-block-group-offset.raw.txt
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/btrfs-progs-v4.7.3/tests/fuzz-tests/images/bko-155151-bad-block-group-offset.raw.txt
    2016-09-21 13:59:53.000000000 +0200
@@ -0,0 +1,5 @@
+URL: https://bugzilla.kernel.org/show_bug.cgi?id=155151
+Lukas Lueg 2016-08-27 20:19:24 UTC
+
+More news from the fuzzer. The attached image causes btrfsck to enter what
+seems to be an endless loop; using btrfs-progs v4.7-42-g56e9586.
Files 
old/btrfs-progs-v4.7.2/tests/fuzz-tests/images/bko-155151-bad-block-group-offset.raw.xz
 and 
new/btrfs-progs-v4.7.3/tests/fuzz-tests/images/bko-155151-bad-block-group-offset.raw.xz
 differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/btrfs-progs-v4.7.2/tests/fuzz-tests/images/bko-155181-bad-backref.raw.txt 
new/btrfs-progs-v4.7.3/tests/fuzz-tests/images/bko-155181-bad-backref.raw.txt
--- 
old/btrfs-progs-v4.7.2/tests/fuzz-tests/images/bko-155181-bad-backref.raw.txt   
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/btrfs-progs-v4.7.3/tests/fuzz-tests/images/bko-155181-bad-backref.raw.txt   
    2016-09-21 13:59:53.000000000 +0200
@@ -0,0 +1,22 @@
+ULR: https://bugzilla.kernel.org/show_bug.cgi?id=155181
+Lukas Lueg 2016-08-28 10:52:32 UTC
+
+More news from the fuzzer. The attached image causes btrfsck to reach abort()
+in in cmds-check.c:add_tree_backref(); using btrfs-progs v4.7-42-g56e9586.
+
+[Thread debugging using libthread_db enabled]
+Using host libthread_db library "/lib64/libthread_db.so.1".
+Checking filesystem on crash2.bin
+UUID: 5cb33553-6f6d-4ce8-83fd-20af5a2f8181
+
+Program received signal SIGABRT, Aborted.
+0x00007ffff6fae6f5 in raise () from /lib64/libc.so.6
+#0  0x00007ffff6fae6f5 in raise () from /lib64/libc.so.6
+#1  0x00007ffff6fb02fa in abort () from /lib64/libc.so.6
+#2  0x000000000041fbe1 in add_tree_backref 
(extent_cache=extent_cache@entry=0x7fffffffdd20, bytenr=bytenr@entry=131200, 
parent=parent@entry=0, root=3, found_ref=found_ref@entry=0) at cmds-check.c:4869
+#3  0x0000000000423538 in process_extent_item (root=root@entry=0x6b2cf0, 
extent_cache=extent_cache@entry=0x7fffffffdd20, eb=eb@entry=0x6af7c0, 
slot=slot@entry=1) at cmds-check.c:5452
+#4  0x000000000042a605 in run_next_block (root=root@entry=0x6b2cf0, 
bits=bits@entry=0x6b4ff0, bits_nr=bits_nr@entry=1024, 
last=last@entry=0x7fffffffd878, pending=pending@entry=0x7fffffffdd00, 
seen=seen@entry=0x7fffffffdd10, reada=0x7fffffffdcf0, nodes=0x7fffffffdce0, 
extent_cache=0x7fffffffdd20, chunk_cache=0x7fffffffdd80, 
dev_cache=0x7fffffffdd90, block_group_cache=0x7fffffffdd60, 
dev_extent_cache=0x7fffffffdd30, ri=0x6b9000) at cmds-check.c:6280
+#5  0x000000000042afb6 in deal_root_from_list (list=list@entry=0x7fffffffda10, 
root=root@entry=0x6b2cf0, bits=bits@entry=0x6b4ff0, bits_nr=bits_nr@entry=1024, 
pending=pending@entry=0x7fffffffdd00, seen=seen@entry=0x7fffffffdd10, 
reada=0x7fffffffdcf0, nodes=0x7fffffffdce0, extent_cache=0x7fffffffdd20, 
chunk_cache=0x7fffffffdd80, dev_cache=0x7fffffffdd90, 
block_group_cache=0x7fffffffdd60, dev_extent_cache=0x7fffffffdd30) at 
cmds-check.c:8338
+#6  0x000000000042bb15 in check_chunks_and_extents (root=root@entry=0x6b2cf0) 
at cmds-check.c:8505
+#7  0x000000000042e3cb in cmd_check (argc=<optimized out>, argv=<optimized 
out>) at cmds-check.c:11430
+#8  0x000000000040a416 in main (argc=2, argv=0x7fffffffe218) at btrfs.c:243
Files 
old/btrfs-progs-v4.7.2/tests/fuzz-tests/images/bko-155181-bad-backref.raw.xz 
and 
new/btrfs-progs-v4.7.3/tests/fuzz-tests/images/bko-155181-bad-backref.raw.xz 
differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/btrfs-progs-v4.7.2/tests/fuzz-tests/images/bko-155621-bad-block-group-offset.raw.txt
 
new/btrfs-progs-v4.7.3/tests/fuzz-tests/images/bko-155621-bad-block-group-offset.raw.txt
--- 
old/btrfs-progs-v4.7.2/tests/fuzz-tests/images/bko-155621-bad-block-group-offset.raw.txt
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/btrfs-progs-v4.7.3/tests/fuzz-tests/images/bko-155621-bad-block-group-offset.raw.txt
    2016-09-21 13:59:53.000000000 +0200
@@ -0,0 +1,25 @@
+URL: https://bugzilla.kernel.org/show_bug.cgi?id=155621
+Lukas Lueg 2016-08-30 16:07:36 UTC
+
+More news from the fuzzer. The attached image causes btrfsck to enter what
+seems to be an endless loop; using btrfs-progs v4.7-42-g56e9586.
+
+Starting program: /home/lukas/dev/btrfsfuzz/bin/bin/btrfsck hang17.img
+[Thread debugging using libthread_db enabled]
+Using host libthread_db library "/lib64/libthread_db.so.1".
+
+Program received signal SIGINT, Interrupt.
+__find_space_info (info=info@entry=0x6ab3a0, flags=0, flags@entry=8589934592) 
at extent-tree.c:1796
+1796           list_for_each_entry(found, &info->space_info, list) {
+#0  __find_space_info (info=info@entry=0x6ab3a0, flags=0, 
flags@entry=8589934592) at extent-tree.c:1796
+#1  0x000000000044c66d in update_space_info (info=info@entry=0x6ab3a0, 
flags=8589934592, total_bytes=total_bytes@entry=0, bytes_used=17592186044416, 
space_info=space_info@entry=0x7fffffffdbd8)
+    at extent-tree.c:1835
+#2  0x0000000000451622 in btrfs_read_block_groups (root=0x6ab850) at 
extent-tree.c:3278
+#3  0x000000000044b157 in btrfs_setup_all_roots 
(fs_info=fs_info@entry=0x6ab3a0, root_tree_bytenr=<optimized out>, 
root_tree_bytenr@entry=0, flags=flags@entry=64) at disk-io.c:1055
+#4  0x000000000044b484 in __open_ctree_fd (fp=fp@entry=3, 
path=path@entry=0x7fffffffe4eb "hang17.img", sb_bytenr=65536, 
sb_bytenr@entry=0, root_tree_bytenr=root_tree_bytenr@entry=0, 
+    chunk_root_bytenr=chunk_root_bytenr@entry=0, flags=flags@entry=64) at 
disk-io.c:1317
+#5  0x000000000044b611 in open_ctree_fs_info (filename=0x7fffffffe4eb 
"hang17.img", sb_bytenr=sb_bytenr@entry=0, 
root_tree_bytenr=root_tree_bytenr@entry=0, 
chunk_root_bytenr=chunk_root_bytenr@entry=0, 
+    flags=64) at disk-io.c:1363
+#6  0x000000000042deca in cmd_check (argc=<optimized out>, 
argv=0x7fffffffe218) at cmds-check.c:11320
+#7  0x000000000040a416 in main (argc=2, argv=0x7fffffffe218) at btrfs.c:243
+quit
Files 
old/btrfs-progs-v4.7.2/tests/fuzz-tests/images/bko-155621-bad-block-group-offset.raw.xz
 and 
new/btrfs-progs-v4.7.3/tests/fuzz-tests/images/bko-155621-bad-block-group-offset.raw.xz
 differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/btrfs-progs-v4.7.2/tests/fuzz-tests/images/bko-156471-ubsan-trigger-crc32c-unaligned.raw.txt
 
new/btrfs-progs-v4.7.3/tests/fuzz-tests/images/bko-156471-ubsan-trigger-crc32c-unaligned.raw.txt
--- 
old/btrfs-progs-v4.7.2/tests/fuzz-tests/images/bko-156471-ubsan-trigger-crc32c-unaligned.raw.txt
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/btrfs-progs-v4.7.3/tests/fuzz-tests/images/bko-156471-ubsan-trigger-crc32c-unaligned.raw.txt
    2016-09-21 13:59:53.000000000 +0200
@@ -0,0 +1,62 @@
+URL: https://bugzilla.kernel.org/show_bug.cgi?id=156471
+Lukas Lueg 2016-09-09 18:58:27 UTC
+
+More news from the fuzzer and (up to now) the only news from UBSAN using
+btrfs-progs v4.7-42-g56e9586. The attached image causes btrfsck to trigger
+undefined behavior by dereferencing a ptr to a long unsigned int that was cast
+from an uchar with no alignment guarantees.
+
+UBSAN complains:
+crc32c.c:75:19: runtime error: load of misaligned address 0x000001b3736c for
+type 'long unsigned int', which requires 8 byte alignment
+
+I've attached an image and a log, the behavior is triggered all the time and
+unspecific, though.
+
+AFAIC the problem is that *ptmp is cast from *data. This may actually not cause
+the CPU to fault due to how *data is de-facto aligned by it's callers. The code
+may still cause nose demons as the pure act of having *ptmp is undefined
+behavior.
+
+crc32c.c:75:19: runtime error: load of misaligned address 0x000001b3736c for 
type 'long unsigned int', which requires 8 byte alignment
+0x000001b3736c: note: pointer points here
+  00 00 00 00 b7 0e 65 6c  64 61 40 4b a5 0d 0f ba  33 0c 75 27 00 00 02 00  
00 00 00 00 01 00 00 00
+              ^ 
+    #0 0x4f4308 in crc32c_intel /home/lukas/dev/btrfsfuzz/src-ubsan/crc32c.c:75
+    #1 0x4f43f3 in crc32c_le /home/lukas/dev/btrfsfuzz/src-ubsan/crc32c.c:221
+    #2 0x486c39 in __csum_tree_block_size 
/home/lukas/dev/btrfsfuzz/src-ubsan/disk-io.c:139
+    #3 0x486c39 in csum_tree_block_size 
/home/lukas/dev/btrfsfuzz/src-ubsan/disk-io.c:159
+    #4 0x486d48 in csum_tree_block_fs_info 
/home/lukas/dev/btrfsfuzz/src-ubsan/disk-io.c:174
+    #5 0x48ba29 in read_tree_block_fs_info 
/home/lukas/dev/btrfsfuzz/src-ubsan/disk-io.c:348
+    #6 0x48d48d in read_tree_block 
/home/lukas/dev/btrfsfuzz/src-ubsan/disk-io.h:112
+    #7 0x48d48d in btrfs_setup_chunk_tree_and_device_map 
/home/lukas/dev/btrfsfuzz/src-ubsan/disk-io.c:1210
+    #8 0x48d95b in __open_ctree_fd 
/home/lukas/dev/btrfsfuzz/src-ubsan/disk-io.c:1322
+    #9 0x48dd80 in open_ctree_fs_info 
/home/lukas/dev/btrfsfuzz/src-ubsan/disk-io.c:1381
+    #10 0x45011a in cmd_check 
/home/lukas/dev/btrfsfuzz/src-ubsan/cmds-check.c:11449
+    #11 0x40a799 in main /home/lukas/dev/btrfsfuzz/src-ubsan/btrfs.c:243
+    #12 0x7fdf11c96730 in __libc_start_main (/lib64/libc.so.6+0x20730)
+    #13 0x40a1e8 in _start 
(/home/lukas/dev/btrfsfuzz/bin-ubsan/bin/btrfs+0x40a1e8)
+
+key (3472328296227680304 INODE_EXTREF 3472328296227680304)slot end outside of 
leaf 12360 > 3995
+parent transid verify failed on 4227072 wanted 3472328296227680304 found 4
+Ignoring transid failure
+checking extents
+Checking filesystem on ubsan_logs/id:000990,src:000816,op:flip1,pos:3845.img
+UUID: b70e656c-6461-404b-a50d-0fba330c7527
+key (3472328296227680304 INODE_EXTREF 3472328296227680304)slot end outside of 
leaf 12360 > 3995
+Invalid key type(ROOT_ITEM) found in root(3472328296227680304)
+ignoring invalid key
+Invalid key type(ROOT_ITEM) found in root(3472328296227680304)
+ignoring invalid key
+Invalid key type(ROOT_ITEM) found in root(3472328296227680304)
+ignoring invalid key
+Invalid key type(ROOT_ITEM) found in root(3472328296227680304)
+ignoring invalid key
+key (3472328296227680304 INODE_EXTREF 3472328296227680304)slot end outside of 
leaf 12360 > 3995
+key (3472328296227680304 INODE_EXTREF 3472328296227680304)slot end outside of 
leaf 12360 > 3995
+key (3472328296227680304 INODE_EXTREF 3472328296227680304)slot end outside of 
leaf 12360 > 3995
+key (3472328296227680304 INODE_EXTREF 3472328296227680304)slot end outside of 
leaf 12360 > 3995
+key (3472328296227680304 INODE_EXTREF 3472328296227680304)slot end outside of 
leaf 12360 > 3995
+bad block 4202496
+Errors found in extent allocation tree or chunk allocation
+key (3472328296227680304 INODE_EXTREF 3472328296227680304)slot end outside of 
leaf 12360 > 3995
Files 
old/btrfs-progs-v4.7.2/tests/fuzz-tests/images/bko-156471-ubsan-trigger-crc32c-unaligned.raw.xz
 and 
new/btrfs-progs-v4.7.3/tests/fuzz-tests/images/bko-156471-ubsan-trigger-crc32c-unaligned.raw.xz
 differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v4.7.2/utils.c 
new/btrfs-progs-v4.7.3/utils.c
--- old/btrfs-progs-v4.7.2/utils.c      2016-09-05 12:21:24.000000000 +0200
+++ new/btrfs-progs-v4.7.3/utils.c      2016-09-21 13:59:53.000000000 +0200
@@ -250,16 +250,10 @@
        struct btrfs_super_block *super = (struct btrfs_super_block *)super_buf;
        int ret;
 
-       /*
-        * We rely on cfg->chunk_uuid and cfg->fs_uuid to pass uuid
-        * for other functions.
-        * Caller must allocate space for them
-        */
-       BUG_ON(!cfg->chunk_uuid || !cfg->fs_uuid);
        memset(super_buf, 0, BTRFS_SUPER_INFO_SIZE);
        cfg->num_bytes = round_down(cfg->num_bytes, cfg->sectorsize);
 
-       if (cfg->fs_uuid && *cfg->fs_uuid) {
+       if (*cfg->fs_uuid) {
                if (uuid_parse(cfg->fs_uuid, super->fsid) != 0) {
                        error("cound not parse UUID: %s", cfg->fs_uuid);
                        ret = -EINVAL;
@@ -320,8 +314,6 @@
        unsigned char chunk_uuid[BTRFS_UUID_SIZE];
        int ret;
 
-       /* We rely on cfg->fs_uuid and chunk_uuid to fsid and chunk uuid */
-       BUG_ON(!cfg->fs_uuid || !cfg->chunk_uuid);
        ret = uuid_parse(cfg->fs_uuid, fsid);
        if (ret)
                return -EINVAL;
@@ -1049,7 +1041,7 @@
        memset(&super, 0, sizeof(super));
 
        num_bytes = (cfg->num_bytes / cfg->sectorsize) * cfg->sectorsize;
-       if (cfg->fs_uuid && *cfg->fs_uuid) {
+       if (*cfg->fs_uuid) {
                if (uuid_parse(cfg->fs_uuid, super.fsid) != 0) {
                        error("cannot not parse UUID: %s", cfg->fs_uuid);
                        ret = -EINVAL;
@@ -3280,6 +3272,7 @@
        u64 dev_cnt, int mixed, int ssd)
 {
        u64 allowed = 0;
+       u64 profile = metadata_profile | data_profile;
 
        switch (dev_cnt) {
        default:
@@ -3294,8 +3287,7 @@
                allowed |= BTRFS_BLOCK_GROUP_DUP;
        }
 
-       if (dev_cnt > 1 &&
-           ((metadata_profile | data_profile) & BTRFS_BLOCK_GROUP_DUP)) {
+       if (dev_cnt > 1 && profile & BTRFS_BLOCK_GROUP_DUP) {
                warning("DUP is not recommended on filesystem with multiple 
devices");
        }
        if (metadata_profile & ~allowed) {
@@ -3315,6 +3307,12 @@
                return 1;
        }
 
+       if (dev_cnt == 3 && profile & BTRFS_BLOCK_GROUP_RAID6) {
+               warning("RAID6 is not recommended on filesystem with 3 devices 
only");
+       }
+       if (dev_cnt == 2 && profile & BTRFS_BLOCK_GROUP_RAID5) {
+               warning("RAID5 is not recommended on filesystem with 2 devices 
only");
+       }
        warning_on(!mixed && (data_profile & BTRFS_BLOCK_GROUP_DUP) && ssd,
                   "DUP may not actually lead to 2 copies on the device, see 
manual page");
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v4.7.2/utils.h 
new/btrfs-progs-v4.7.3/utils.h
--- old/btrfs-progs-v4.7.2/utils.h      2016-09-05 12:21:24.000000000 +0200
+++ new/btrfs-progs-v4.7.3/utils.h      2016-09-21 13:59:53.000000000 +0200
@@ -112,8 +112,8 @@
 
 struct btrfs_mkfs_config {
        char *label;
-       char *fs_uuid;
-       char *chunk_uuid;
+       char fs_uuid[BTRFS_UUID_UNPARSED_SIZE];
+       char chunk_uuid[BTRFS_UUID_UNPARSED_SIZE];
        u64 blocks[8];
        u64 num_bytes;
        u32 nodesize;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v4.7.2/version.sh 
new/btrfs-progs-v4.7.3/version.sh
--- old/btrfs-progs-v4.7.2/version.sh   2016-09-05 12:21:24.000000000 +0200
+++ new/btrfs-progs-v4.7.3/version.sh   2016-09-21 13:59:53.000000000 +0200
@@ -6,7 +6,7 @@
 # Copyright 2008, Oracle
 # Released under the GNU GPLv2
 
-v="v4.7.2"
+v="v4.7.3"
 
 opt=$1
 

++++++ local-version-override.patch ++++++
--- /var/tmp/diff_new_pack.sglz9n/_old  2016-10-04 15:42:24.000000000 +0200
+++ /var/tmp/diff_new_pack.sglz9n/_new  2016-10-04 15:42:24.000000000 +0200
@@ -6,8 +6,8 @@
  # Copyright 2008, Oracle
  # Released under the GNU GPLv2
  
--v="v4.7.2"
-+v="v4.7.2+20160906"
+-v="v4.7.3"
++v="v4.7.3+20160926"
  
  opt=$1
  


Reply via email to