Hello community, here is the log from the commit of package btrfsprogs for openSUSE:Factory checked in at 2015-10-22 12:58:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 2015-09-24 07:18:08.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.btrfsprogs.new/btrfsprogs.changes 2015-10-22 12:58:13.000000000 +0200 @@ -1,0 +2,19 @@ +Mon Oct 19 00:00:00 CEST 2015 - dste...@suse.cz + +- update to 4.2.3 + - subvol sync: make it actually work again + - scanning: do not scan already discovered filesystems (minor optimization) + - convert: better error message in case the filesystem is not finalized + - restore: off-by-one symlink path check fix + +------------------------------------------------------------------- +Mon Oct 5 00:00:00 CEST 2015 - dste...@suse.cz + +- update to 4.2.2 + - fi label: use fallback if the label ioctl is not available + - convert: check nodesize constraints against commandline features (-O) + - scrub: report status 'running' until all devices are finished + - device scanning might crash in some scenarios + - fi usage: print summary for non-root users + +------------------------------------------------------------------- Old: ---- btrfs-progs-v4.2.1.tar.gz New: ---- btrfs-progs-v4.2.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ btrfsprogs.spec ++++++ --- /var/tmp/diff_new_pack.1I0CJP/_old 2015-10-22 12:58:15.000000000 +0200 +++ /var/tmp/diff_new_pack.1I0CJP/_new 2015-10-22 12:58:15.000000000 +0200 @@ -17,7 +17,7 @@ Name: btrfsprogs -Version: 4.2.1 +Version: 4.2.3 Release: 0 Summary: Utilities for the Btrfs filesystem License: GPL-2.0 ++++++ btrfs-progs-v4.2.1.tar.gz -> btrfs-progs-v4.2.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btrfs-progs-v4.2.1/btrfs-convert.c new/btrfs-progs-v4.2.3/btrfs-convert.c --- old/btrfs-progs-v4.2.1/btrfs-convert.c 2015-09-20 14:50:06.000000000 +0200 +++ new/btrfs-progs-v4.2.3/btrfs-convert.c 2015-10-19 11:29:01.000000000 +0200 @@ -2292,6 +2292,7 @@ { int i, ret, blocks_per_node; int fd = -1; + int is_btrfs = 0; u32 blocksize; u64 blocks[7]; u64 total_bytes; @@ -2319,7 +2320,7 @@ fprintf(stderr, "filetype feature is missing\n"); goto fail; } - if (btrfs_check_nodesize(nodesize, blocksize)) + if (btrfs_check_nodesize(nodesize, blocksize, features)) goto fail; blocks_per_node = nodesize / blocksize; ret = -blocks_per_node; @@ -2459,6 +2460,7 @@ fprintf(stderr, "unable to migrate super block\n"); goto fail; } + is_btrfs = 1; root = open_ctree_fd(fd, devname, 0, OPEN_CTREE_WRITES); if (!root) { @@ -2479,7 +2481,11 @@ fail: if (fd != -1) close(fd); - fprintf(stderr, "conversion aborted.\n"); + if (is_btrfs) + fprintf(stderr, + "WARNING: an error occured during chunk mapping fixup, filesystem mountable but not finalized\n"); + else + fprintf(stderr, "conversion aborted\n"); return -1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btrfs-progs-v4.2.1/cmds-check.c new/btrfs-progs-v4.2.3/cmds-check.c --- old/btrfs-progs-v4.2.1/cmds-check.c 2015-09-20 14:50:06.000000000 +0200 +++ new/btrfs-progs-v4.2.3/cmds-check.c 2015-10-19 11:29:01.000000000 +0200 @@ -2969,7 +2969,7 @@ } backref = malloc(sizeof(*backref) + namelen + 1); - memset(backref, 0, sizeof(*backref)); + memset(backref, 0, sizeof(*backref) + namelen + 1); backref->ref_root = ref_root; backref->dir = dir; backref->index = index; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btrfs-progs-v4.2.1/cmds-device.c new/btrfs-progs-v4.2.3/cmds-device.c --- old/btrfs-progs-v4.2.1/cmds-device.c 2015-09-20 14:50:06.000000000 +0200 +++ new/btrfs-progs-v4.2.3/cmds-device.c 2015-10-19 11:29:01.000000000 +0200 @@ -163,7 +163,7 @@ struct btrfs_ioctl_vol_args arg; int res; - if (!is_block_device(argv[i])) { + if (is_block_device(argv[i]) != 1) { fprintf(stderr, "ERROR: %s is not a block device\n", argv[i]); ret++; @@ -264,7 +264,7 @@ for( i = devstart ; i < argc ; i++ ){ char *path; - if (!is_block_device(argv[i])) { + if (is_block_device(argv[i]) != 1) { fprintf(stderr, "ERROR: %s is not a block device\n", argv[i]); ret = 1; @@ -323,7 +323,7 @@ goto out; } - if (!is_block_device(path)) { + if (is_block_device(path) != 1) { fprintf(stderr, "ERROR: %s is not a block device\n", path); ret = 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btrfs-progs-v4.2.1/cmds-fi-usage.c new/btrfs-progs-v4.2.3/cmds-fi-usage.c --- old/btrfs-progs-v4.2.1/cmds-fi-usage.c 2015-09-20 14:50:06.000000000 +0200 +++ new/btrfs-progs-v4.2.3/cmds-fi-usage.c 2015-10-19 11:29:01.000000000 +0200 @@ -504,7 +504,7 @@ static int load_device_info(int fd, struct device_info **device_info_ptr, int *device_info_count) { - int ret, i, ndevs, e; + int ret, i, ndevs; struct btrfs_ioctl_fs_info_args fi_args; struct btrfs_ioctl_dev_info_args dev_info; struct device_info *info; @@ -513,12 +513,11 @@ *device_info_ptr = 0; ret = ioctl(fd, BTRFS_IOC_FS_INFO, &fi_args); - e = errno; - if (e == EPERM) - return -e; if (ret < 0) { + if (errno == EPERM) + return -errno; fprintf(stderr, "ERROR: cannot get filesystem info - %s\n", - strerror(e)); + strerror(errno)); return 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btrfs-progs-v4.2.1/cmds-filesystem.c new/btrfs-progs-v4.2.3/cmds-filesystem.c --- old/btrfs-progs-v4.2.1/cmds-filesystem.c 2015-09-20 14:50:06.000000000 +0200 +++ new/btrfs-progs-v4.2.3/cmds-filesystem.c 2015-10-19 11:29:01.000000000 +0200 @@ -468,13 +468,24 @@ goto out; } - if (get_label_mounted(mnt->mnt_dir, label)) { + /* skip all fs already shown as mounted fs */ + if (is_seen_fsid(fs_info_arg.fsid)) + continue; + + ret = get_label_mounted(mnt->mnt_dir, label); + /* provide backward kernel compatibility */ + if (ret == -ENOTTY) + ret = get_label_unmounted( + (const char *)dev_info_arg->path, label); + + if (ret) { kfree(dev_info_arg); goto out; } if (search && !match_search_item_kernel(fs_info_arg.fsid, mnt->mnt_dir, label, search)) { kfree(dev_info_arg); + dev_info_arg = NULL; continue; } @@ -490,6 +501,7 @@ if (fd != -1) close(fd); kfree(dev_info_arg); + dev_info_arg = NULL; } out: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btrfs-progs-v4.2.1/cmds-restore.c new/btrfs-progs-v4.2.3/cmds-restore.c --- old/btrfs-progs-v4.2.1/cmds-restore.c 2015-09-20 14:50:06.000000000 +0200 +++ new/btrfs-progs-v4.2.3/cmds-restore.c 2015-10-19 11:29:01.000000000 +0200 @@ -863,7 +863,7 @@ len = btrfs_file_extent_inline_item_len(leaf, btrfs_item_nr(path->slots[0])); - if (len > PATH_MAX) { + if (len >= PATH_MAX) { fprintf(stderr, "Symlink '%s' target length %d is longer than PATH_MAX\n", fs_name, len); ret = -1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btrfs-progs-v4.2.1/cmds-scrub.c new/btrfs-progs-v4.2.3/cmds-scrub.c --- old/btrfs-progs-v4.2.1/cmds-scrub.c 2015-09-20 14:50:06.000000000 +0200 +++ new/btrfs-progs-v4.2.3/cmds-scrub.c 2015-10-19 11:29:01.000000000 +0200 @@ -254,17 +254,15 @@ hours = ss->duration / (60 * 60); gmtime_r(&seconds, &tm); strftime(t, sizeof(t), "%M:%S", &tm); - if (ss->finished && !ss->canceled) { - printf(" and finished after %02u:%s\n", hours, t); - } else if (ss->canceled) { + if (ss->in_progress) + printf(", running for %02u:%s\n", hours, t); + else if (ss->canceled) printf(" and was aborted after %02u:%s\n", hours, t); - } else { - if (ss->in_progress) - printf(", running for %02u:%s\n", hours, t); - else - printf(", interrupted after %02u:%s, not running\n", - hours, t); - } + else if (ss->finished) + printf(" and finished after %02u:%s\n", hours, t); + else + printf(", interrupted after %02u:%s, not running\n", + hours, t); } static void print_scrub_dev(struct btrfs_ioctl_dev_info_args *di, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btrfs-progs-v4.2.1/cmds-subvolume.c new/btrfs-progs-v4.2.3/cmds-subvolume.c --- old/btrfs-progs-v4.2.1/cmds-subvolume.c 2015-09-20 14:50:06.000000000 +0200 +++ new/btrfs-progs-v4.2.3/cmds-subvolume.c 2015-10-19 11:29:01.000000000 +0200 @@ -89,7 +89,7 @@ clean = 0; } } - if (clean == 0) + if (clean) break; sleep(sleep_interval); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btrfs-progs-v4.2.1/configure new/btrfs-progs-v4.2.3/configure --- old/btrfs-progs-v4.2.1/configure 2015-09-20 14:51:42.000000000 +0200 +++ new/btrfs-progs-v4.2.3/configure 2015-10-19 11:30:54.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.2.1. +# Generated by GNU Autoconf 2.69 for btrfs-progs v4.2.3. # # Report bugs to <linux-bt...@vger.kernel.org>. # @@ -580,8 +580,8 @@ # Identity of this package. PACKAGE_NAME='btrfs-progs' PACKAGE_TARNAME='btrfs-progs' -PACKAGE_VERSION='v4.2.1' -PACKAGE_STRING='btrfs-progs v4.2.1' +PACKAGE_VERSION='v4.2.3' +PACKAGE_STRING='btrfs-progs v4.2.3' PACKAGE_BUGREPORT='linux-bt...@vger.kernel.org' PACKAGE_URL='http://btrfs.wiki.kernel.org' @@ -1287,7 +1287,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.2.1 to adapt to many kinds of systems. +\`configure' configures btrfs-progs v4.2.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1352,7 +1352,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of btrfs-progs v4.2.1:";; + short | recursive ) echo "Configuration of btrfs-progs v4.2.3:";; esac cat <<\_ACEOF @@ -1461,7 +1461,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -btrfs-progs configure v4.2.1 +btrfs-progs configure v4.2.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1830,7 +1830,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.2.1, which was +It was created by btrfs-progs $as_me v4.2.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -6375,7 +6375,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.2.1, which was +This file was extended by btrfs-progs $as_me v4.2.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6438,7 +6438,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.2.1 +btrfs-progs config.status v4.2.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.2.1/disk-io.c new/btrfs-progs-v4.2.3/disk-io.c --- old/btrfs-progs-v4.2.1/disk-io.c 2015-09-20 14:50:06.000000000 +0200 +++ new/btrfs-progs-v4.2.3/disk-io.c 2015-10-19 11:29:01.000000000 +0200 @@ -1412,7 +1412,8 @@ ret = pwrite64(device->fd, root->fs_info->super_copy, BTRFS_SUPER_INFO_SIZE, root->fs_info->super_bytenr); - BUG_ON(ret != BTRFS_SUPER_INFO_SIZE); + if (ret != BTRFS_SUPER_INFO_SIZE) + goto write_err; return 0; } @@ -1434,10 +1435,19 @@ */ ret = pwrite64(device->fd, root->fs_info->super_copy, BTRFS_SUPER_INFO_SIZE, bytenr); - BUG_ON(ret != BTRFS_SUPER_INFO_SIZE); + if (ret != BTRFS_SUPER_INFO_SIZE) + goto write_err; } return 0; + +write_err: + if (ret > 0) + fprintf(stderr, "WARNING: failed to write all sb data\n"); + else + fprintf(stderr, "WARNING: failed to write sb: %s\n", + strerror(errno)); + return ret; } int write_all_supers(struct btrfs_root *root) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btrfs-progs-v4.2.1/mkfs.c new/btrfs-progs-v4.2.3/mkfs.c --- old/btrfs-progs-v4.2.1/mkfs.c 2015-09-20 14:50:06.000000000 +0200 +++ new/btrfs-progs-v4.2.3/mkfs.c 2015-10-19 11:29:01.000000000 +0200 @@ -1466,9 +1466,8 @@ print_usage(c != GETOPT_VAL_HELP); } } + sectorsize = max(sectorsize, (u32)sysconf(_SC_PAGESIZE)); - if (btrfs_check_nodesize(nodesize, sectorsize)) - exit(1); saved_optind = optind; dev_cnt = ac - optind; if (dev_cnt == 0) @@ -1495,7 +1494,7 @@ while (dev_cnt-- > 0) { file = av[optind++]; - if (is_block_device(file)) + if (is_block_device(file) == 1) if (test_dev_for_mkfs(file, force_overwrite)) exit(1); } @@ -1542,17 +1541,12 @@ } } - if (!nodesize_forced) { + if (!nodesize_forced) nodesize = best_nodesize; - if (btrfs_check_nodesize(nodesize, sectorsize)) - exit(1); - } - if (nodesize != sectorsize) { - fprintf(stderr, "Error: mixed metadata/data block groups " - "require metadata blocksizes equal to the sectorsize\n"); - exit(1); - } } + if (btrfs_check_nodesize(nodesize, sectorsize, + features)) + exit(1); /* Check device/block_count after the nodesize is determined */ if (block_count && block_count < btrfs_min_dev_size(nodesize)) { @@ -1724,7 +1718,7 @@ exit(1); } - if (is_block_device(file)) + if (is_block_device(file) == 1) btrfs_register_one_device(file); if (dev_cnt == 0) @@ -1774,7 +1768,7 @@ (unsigned long long)device->devid); } - if (is_block_device(file)) + if (is_block_device(file) == 1) btrfs_register_one_device(file); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btrfs-progs-v4.2.1/task-utils.c new/btrfs-progs-v4.2.3/task-utils.c --- old/btrfs-progs-v4.2.1/task-utils.c 2015-09-20 14:50:06.000000000 +0200 +++ new/btrfs-progs-v4.2.3/task-utils.c 2015-10-19 11:29:01.000000000 +0200 @@ -51,7 +51,7 @@ info->private_data); if (ret) - info->id = -1; + info->id = 0; return ret; } @@ -64,7 +64,7 @@ if (info->id > 0) { pthread_cancel(info->id); pthread_join(info->id, NULL); - info->id = -1; + info->id = 0; } if (info->periodic.timer_fd) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btrfs-progs-v4.2.1/utils.c new/btrfs-progs-v4.2.3/utils.c --- old/btrfs-progs-v4.2.1/utils.c 2015-09-20 14:50:06.000000000 +0200 +++ new/btrfs-progs-v4.2.3/utils.c 2015-10-19 11:29:01.000000000 +0200 @@ -959,7 +959,7 @@ if (stat(path, &statbuf) < 0) return -errno; - return S_ISBLK(statbuf.st_mode); + return !!S_ISBLK(statbuf.st_mode); } /* @@ -1086,7 +1086,8 @@ char mp[PATH_MAX]; int fdmnt; - if (is_block_device(path)) { + fdmnt = is_block_device(path); + if (fdmnt == 1) { int ret; ret = get_btrfs_mount(path, mp, sizeof(mp)); @@ -1096,7 +1097,7 @@ return -1; } fdmnt = open_file_or_dir(mp, dirstream); - } else { + } else if (fdmnt == 0) { fdmnt = open_file_or_dir(path, dirstream); } @@ -1740,7 +1741,7 @@ return 0; } -static int get_label_unmounted(const char *dev, char *label) +int get_label_unmounted(const char *dev, char *label) { struct btrfs_root *root; int ret; @@ -1750,11 +1751,6 @@ fprintf(stderr, "FATAL: error checking %s mount status\n", dev); return -1; } - if (ret > 0) { - fprintf(stderr, "ERROR: dev %s is mounted, use mount point\n", - dev); - return -1; - } /* Open the super_block at the default location * and as read-only. @@ -1779,6 +1775,7 @@ { char label[BTRFS_LABEL_SIZE]; int fd; + int ret; fd = open(mount_path, O_RDONLY | O_NOATIME); if (fd < 0) { @@ -1787,10 +1784,14 @@ } memset(label, '\0', sizeof(label)); - if (ioctl(fd, BTRFS_IOC_GET_FSLABEL, label) < 0) { - fprintf(stderr, "ERROR: unable get label %s\n", strerror(errno)); + ret = ioctl(fd, BTRFS_IOC_GET_FSLABEL, label); + if (ret < 0) { + if (errno != ENOTTY) + fprintf(stderr, "ERROR: unable to get label %s\n", + strerror(errno)); + ret = -errno; close(fd); - return -1; + return ret; } strncpy(labelp, label, sizeof(label)); @@ -2138,7 +2139,7 @@ memset(fi_args, 0, sizeof(*fi_args)); - if (is_block_device(path)) { + if (is_block_device(path) == 1) { struct btrfs_super_block *disk_super; char buf[BTRFS_SUPER_INFO_SIZE]; u64 devid; @@ -2928,7 +2929,7 @@ return v2_supported; } -int btrfs_check_nodesize(u32 nodesize, u32 sectorsize) +int btrfs_check_nodesize(u32 nodesize, u32 sectorsize, u64 features) { if (nodesize < sectorsize) { fprintf(stderr, @@ -2945,6 +2946,12 @@ "ERROR: Illegal nodesize %u (not aligned to %u)\n", nodesize, sectorsize); return -1; + } else if (features & BTRFS_FEATURE_INCOMPAT_MIXED_GROUPS && + nodesize != sectorsize) { + fprintf(stderr, + "ERROR: Illegal nodesize %u (not equal to %u for mixed block group)\n", + nodesize, sectorsize); + return -1; } return 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btrfs-progs-v4.2.1/utils.h new/btrfs-progs-v4.2.3/utils.h --- old/btrfs-progs-v4.2.1/utils.h 2015-09-20 14:50:06.000000000 +0200 +++ new/btrfs-progs-v4.2.3/utils.h 2015-10-19 11:29:01.000000000 +0200 @@ -164,6 +164,7 @@ #define strncpy_null(dest, src) __strncpy__null(dest, src, sizeof(dest)) int test_dev_for_mkfs(char *file, int force_overwrite); int get_label_mounted(const char *mount_path, char *labelp); +int get_label_unmounted(const char *dev, char *label); int test_num_disk_vs_raid(u64 metadata_profile, u64 data_profile, u64 dev_cnt, int mixed); int group_profile_max_safe_loss(u64 flags); @@ -241,7 +242,7 @@ } int btrfs_tree_search2_ioctl_supported(int fd); -int btrfs_check_nodesize(u32 nodesize, u32 sectorsize); +int btrfs_check_nodesize(u32 nodesize, u32 sectorsize, u64 features); const char *get_argv0_buf(void); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btrfs-progs-v4.2.1/version.sh new/btrfs-progs-v4.2.3/version.sh --- old/btrfs-progs-v4.2.1/version.sh 2015-09-20 14:50:06.000000000 +0200 +++ new/btrfs-progs-v4.2.3/version.sh 2015-10-19 11:29:01.000000000 +0200 @@ -6,7 +6,7 @@ # Copyright 2008, Oracle # Released under the GNU GPLv2 -v="v4.2.1" +v="v4.2.3" opt=$1 ++++++ local-version-override.patch ++++++ --- /var/tmp/diff_new_pack.1I0CJP/_old 2015-10-22 12:58:15.000000000 +0200 +++ /var/tmp/diff_new_pack.1I0CJP/_new 2015-10-22 12:58:15.000000000 +0200 @@ -6,8 +6,8 @@ # Copyright 2008, Oracle # Released under the GNU GPLv2 --v="v4.2.1" -+v="v4.2+20150922" +-v="v4.2.3" ++v="v4.2.3+20151019" opt=$1