summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* btrfs-progs: send-stream: switch to common message helpersDavid Sterba2016-11-23
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add more fuzzed images from bugzillaDavid Sterba2016-11-23
| | | | | | | | Fixing the problems by one does not scale now. Add more images despite the fuzz tests will fail. They have been for some time already. Reported-by: Lukas Lueg <lukas.lueg@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: ioctl: fix compilation if ioctl.h is included standaloneDavid Sterba2016-11-23
| | | | | | | | Definition of NULL is missing if ioctl.h is included standalone or when no other include pulls the definition. Reported-by: Sergei Trofimovich <slyich@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: return best entry, if it is the first oneGoldwyn Rodrigues2016-11-23
| | | | | | | | | | | | The find_most_right_entry() tends to miss on the best entry if it is the first one on the list and there are only two entries in the list. So, we assign both prev and best to entry. To do this, the selection process (rather the rejection) has to be performed earlier to skip on broken==count. Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: utils: Fix NULL pointer derefernces in string_is_numericalQu Wenruo2016-11-23
| | | | | | | | | | | | | | In get_running_kernel_version() function, we directly pass return pointer from strtok_r() to string_is_numerical(). Return pointer from strok_r() can be NULL, but string_is_numerical() can't handle it and will cause NULL pointer derefernces. Fix it by check if it's a NULL pointer first. Resolves-Coverity-CID: 1374097 Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* Btrfs progs v4.8.3David Sterba2016-11-11
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: update CHANGES for v4.8.3David Sterba2016-11-11
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: enhance run_mayfail description commentDavid Sterba2016-11-11
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add quotation around variables in support scriptsDavid Sterba2016-11-11
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add quotation around variables in common.convertDavid Sterba2016-11-11
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add quotes around variables in commonDavid Sterba2016-11-11
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add path assertions to post-checksDavid Sterba2016-11-11
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add assertion helperDavid Sterba2016-11-11
| | | | | | Helper to extend sanity checks in various functions. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: refactor post-convert check helpersDavid Sterba2016-11-11
| | | | | | | | Separate checksum test from convert_test_post_check and use it to fix the broken test 005 as reported. References: https://bugzilla.kernel.org/show_bug.cgi?id=177141 Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: check if kernel has btrfs supportDavid Sterba2016-11-11
| | | | | | | Add some sanity checks, reported among other issues via bugzilla. References: https://bugzilla.kernel.org/show_bug.cgi?id=177141 Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: mkfs: print the new UUIDDavid Sterba2016-11-11
| | | | | | | Unless the uuid is specified as the command line option, it's not printed in the summary. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: mkfs: add names of matching sysfs feature namesDavid Sterba2016-11-11
| | | | | | The mkfs parameters do not match file names exported through sysfs. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: mkfs: enhance feature tableDavid Sterba2016-11-11
| | | | | | | Add string and numeric version for later use so we don't have to convert all the time. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: mkfs: extend mkfs features with compat, safe and default versionsDavid Sterba2016-11-11
| | | | | | | Enhance the mkfs_features list with the minimum kernel versions that will allow for turning on compatible and/or safe options. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: mkfs: add temporary variable for fs featuresDavid Sterba2016-11-11
| | | | | | A minor cleanup before other changes. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: Fix memory leak in write_raid56_with_parityQu Wenruo2016-11-11
| | | | | | | | | | Ebs and pointers are allocated, but if any of the allocation failed, we should free the allocated memory. Resolves-Coverity-CID: 1374101 Resolves-Coverity-CID: 1374100 Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add checking of send multiple clone source optionTsutomu Itoh2016-11-11
| | | | | | | | Sending stream size of clone-src(-c) option is checked. Fixed by "btrfs-progs: send: fix handling of -c option". Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: send: check for output file existence before creatingDavid Sterba2016-11-11
| | | | | | | | In some cases the root might not be able to create the output file (and streaming to stdout is not an option). Make the output file creation two step and let it work if the file is already created. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: send: fix handling of -c optionTsutomu Itoh2016-11-11
| | | | | | | | | | | | | | | | | | | | | When two or more -c options are specified, cannot find a suitable parent. So, output stream is bigger than correct one. [before] At subvol Snap1 At subvol Snap2 At subvol ../SnapY -rw------- 1 root root 3153 Oct 19 10:37 /tmp/data1 [after] At subvol Snap1 At subvol Snap2 At subvol ../SnapY -rw------- 1 root root 1492 Oct 19 10:39 /tmp/data1 Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> [ constify subvol argument, renamed single letter variables ] Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: teach extract_image about packed streamsDavid Sterba2016-11-11
| | | | | | | Packed streams for testing purposes should be packed with 'xz -9' and use suffix .stream.xz . Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: use correct type for device id iteration in get_fs_infoDavid Sterba2016-11-09
| | | | | | | | Coverity reports (CID 1374096) that there's return value overflow of ret from get_device_info, but this most likely cannot happen. There's another minor issue where we use int to iterate over devids. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: crc32: use fallback implementation for unaligned buffersDavid Sterba2016-11-09
| | | | | | | | ASAN reports that at some point the crc function gets an unaligned buffer. It's the optimized intel version that casts char to ulong, the buffer is the embedded filename in the directory items. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: teach scan-results about more errorsDavid Sterba2016-11-09
| | | | | | ASAN detects use after free. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: fix search tree v2 ioctl detectionDavid Sterba2016-11-09
| | | | | | | The result of the test applies per-filesystem, so we can't simply cache it. The function hasn't been used yet. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: fix unaligned u64 access in btrfs_alloc_data_chunkDavid Sterba2016-11-09
| | | | | | | | The key.offset member is not well-aligned as the key is packed, use a temporary variable to pass the argument. Reported by ASAN in misc test 002. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: docs: update mkfs help string and manual pageDavid Sterba2016-11-09
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: mkfs: simplify checks in directory_selectDavid Sterba2016-11-09
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: btrfstune: use on-stack path buffer in change_devices_uuidDavid Sterba2016-11-09
| | | | | | | We don't need to conserve stack space too much unlike kernel, also remove one error condition. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: btrfstune: use on-stack path buffer in change_extents_uuidDavid Sterba2016-11-09
| | | | | | | We don't need to conserve stack space too much unlike kernel, also remove one error condition. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: chunk-recover: use on-stack path buffer in rebuild_block_groupDavid Sterba2016-11-09
| | | | | | | We don't need to conserve stack space too much unlike kernel, also remove one error condition. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: check: remove unused variable in record_extentDavid Sterba2016-11-09
| | | | | | | | In a similar code, it's used for a message. Not used in this code since the beggingin, safe to remove. Resolves-coverity-id: 1364085 Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: restore: use on-stack path buffer in find_first_dirDavid Sterba2016-11-09
| | | | | | | We don't need to conserve stack space too much unlike kernel, also remove one error condition. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: restore: use on-stack path buffer in do_list_rootsDavid Sterba2016-11-09
| | | | | | | We don't need to conserve stack space too much unlike kernel, also remove one error condition. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: restore: use on-stack path buffer in search_dirDavid Sterba2016-11-09
| | | | | | | We don't need to conserve stack space too much unlike kernel, also remove one error condition. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: restore: use on-stack path buffer in copy_symlinkDavid Sterba2016-11-09
| | | | | | | We don't need to conserve stack space too much unlike kernel, also remove one error condition. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: restore: use on-stack path buffer in copy_fileDavid Sterba2016-11-09
| | | | | | | We don't need to conserve stack space too much unlike kernel, also remove one error condition. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: restore: use on-stack path buffer in copy_metadataDavid Sterba2016-11-09
| | | | | | | We don't need to conserve stack space too much unlike kernel, also remove one error condition. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: restore: use on-stack path buffer in set_file_xattrsDavid Sterba2016-11-09
| | | | | | | We don't need to conserve stack space too much unlike kernel, also remove one error condition. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tree-stats: use on-stack path buffer in calc_root_sizeDavid Sterba2016-11-09
| | | | | | | We don't need to conserve stack space too much unlike kernel, also remove one error condition. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: check: use on-stack path buffer in repair_root_itemsDavid Sterba2016-11-09
| | | | | | | We don't need to conserve stack space too much unlike kernel, also remove one error condition. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: check: use on-stack path buffer in build_roots_info_cacheDavid Sterba2016-11-09
| | | | | | | We don't need to conserve stack space too much unlike kernel, also remove one error condition. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: check: use on-stack path buffer in fill_csum_tree_from_extentDavid Sterba2016-11-09
| | | | | | | We don't need to conserve stack space too much unlike kernel, also remove one error condition. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: check: use on-stack path buffer in fill_csum_tree_from_fsDavid Sterba2016-11-09
| | | | | | | We don't need to conserve stack space too much unlike kernel, also remove one error condition. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: check: use on-stack path buffer in fill_csum_tree_from_one_fs_rootDavid Sterba2016-11-09
| | | | | | | We don't need to conserve stack space too much unlike kernel, also remove one error condition. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: check: use on-stack path buffer in delete_bad_itemDavid Sterba2016-11-09
| | | | | | | We don't need to conserve stack space too much unlike kernel, also remove one error condition. Signed-off-by: David Sterba <dsterba@suse.com>