summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* btrfs-progs: check: fix missing newlinesOmar Sandoval2016-11-23
| | | | | | | | | Also, the other progress messages go to stderr, so "checking extents" probably should, as well. Fixes: c7a1f66a205f ("btrfs-progs: check: switch some messages to common helpers") Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: qgroup: fix error in ASSERT condition expressionTsutomu Itoh2016-11-23
| | | | | | | | Option -f, -F and --sort don't work because a conditional expression of ASSERT is wrong. Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add fallback to current directory for check_all_imagesDavid Sterba2016-11-23
| | | | | Reported-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: test: fix error of test target of MakefileTsutomu Itoh2016-11-23
| | | | | | | Add test-cli to test target of Makefile. Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: document space_cache=v2 more thoroughlyOmar Sandoval2016-11-23
| | | | | Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: implement btrfs check --clear-space-cache v2Omar Sandoval2016-11-23
| | | | | | | Reviewed-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: Omar Sandoval <osandov@fb.com> [ adjusted error messages ] Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: add btrfs_clear_free_space_tree() from the kernelOmar Sandoval2016-11-23
| | | | | | Reviewed-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: add OPEN_CTREE_INVALIDATE_FST flagOmar Sandoval2016-11-23
| | | | | | | | | | If this flag is passed to open_ctree(), we'll clear the FREE_SPACE_TREE_VALID compat_ro bit. The kernel will then reconstruct the free space tree the next time the filesystem is mounted. Reviewed-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: format FREE_SPACE_TREE{,_VALID} nicely in dump-superOmar Sandoval2016-11-23
| | | | | Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: add the FREE_SPACE_TREE_VALID compat_ro bit definitionOmar Sandoval2016-11-23
| | | | | | | This is just the definition; we don't support it yet. Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: send: fix failure of fstests btrfs/038Tsutomu Itoh2016-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following patch was imperfect, so xfstests btrfs/038 was failed. 6d4fb3d btrfs-progs: send: fix handling of multiple snapshots (-p option) [before] | # ./check btrfs/038 | FSTYP -- btrfs | PLATFORM -- Linux/x86_64 luna 4.9.0-rc5 | MKFS_OPTIONS -- /dev/sdb3 | MOUNT_OPTIONS -- /dev/sdb3 /test6 | | btrfs/038 1s ... [failed, exit status 1] - output mismatch (see /For_RT/xfstests2/results//btrfs/038.out.bad) | --- tests/btrfs/038.out 2015-08-04 16:09:38.000000000 +0900 | +++ /For_RT/xfstests2/results//btrfs/038.out.bad 2016-11-15 13:39:48.589435290 +0900 | @@ -7,3 +7,5 @@ | XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | wrote 10000/10000 bytes at offset 300000 | XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | +failed: '/usr/local/bin/btrfs send -p /test6/mysnap1 -c /test6/clones_snap /test6/mysnap2 -f /tmp/tmp.aLpvAC7lsx/2.snap' | +(see /For_RT/xfstests2/results//btrfs/038.full for details) | ... | (Run 'diff -u tests/btrfs/038.out /For_RT/xfstests2/results//btrfs/038.out.bad' to see the entire diff) | Ran: btrfs/038 | Failures: btrfs/038 [after] | # ./check btrfs/038 | FSTYP -- btrfs | PLATFORM -- Linux/x86_64 luna 4.9.0-rc5 | MKFS_OPTIONS -- /dev/sdb3 | MOUNT_OPTIONS -- /dev/sdb3 /test6 | | btrfs/038 1s ... 1s | Ran: btrfs/038 | Passed all 1 tests Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> [ Verified that this fixes both btrfs/038 and btrfs/117 ] Tested-by: Omar Sandoval <osandov@fb.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add more tests to the CI buildDavid Sterba2016-11-23
| | | | | | | | | Run more tests in the travis build environment. The mkfs tests are still left out due to missing capabilities of losetup. Other minor travis adjustments. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: enhance TEST_LOG featuresDavid Sterba2016-11-23
| | | | | | | Add new keyword to dump the log file after any test fails. Can be useful for remote analysis of test failures. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: check for TEST_LOG values by a regexDavid Sterba2016-11-23
| | | | | | | The set of possible values will be extended so check for existence of the keyword. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: change options to list all loop devicesDavid Sterba2016-11-23
| | | | | | | The option --list might not be available on older versions, the equvalent is --all. Discovered via failed travis build. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: use the root helper for various info retrieval commandsDavid Sterba2016-11-23
| | | | | | | The current user might not be able to peek into the loop files directly, use the helper. Discovered by running tests in travis. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: docs: fix typo in btrfs-scrub manual pageDavid Sterba2016-11-23
| | | | | | Reported on IRC. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: send-stream: track the read position in the streamDavid Sterba2016-11-23
| | | | | | Can be later used for more precise error reporting. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add basic checks for bad stream on the receive sideDavid Sterba2016-11-23
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: send-stream: check number of read bytes from streamDavid Sterba2016-11-23
| | | | | | | The read_buf does not verify that we've read the expected number of bytes. A corrupted of malformated stream will not be detdcted. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: send-stream: document return values of some functionsDavid Sterba2016-11-23
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: send-stream: use proper type for cmd in read_cmdDavid Sterba2016-11-23
| | | | | | | We just read and assign the value, there's no reason to use different types. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: send-stream: don't use single letter variable in tlv_getDavid Sterba2016-11-23
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: send-stream: use proper types for tlv header valuesDavid Sterba2016-11-23
| | | | | | Switch types to unsigned and adjust the checks. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: send-stream: use proper type for read return valueDavid Sterba2016-11-23
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: send-stream: change length type to unsignedDavid Sterba2016-11-23
| | | | | | | The command length is unsigned, use the right type, also to make the length checks work. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: send-stream: check command length before reading from streamDavid Sterba2016-11-23
| | | | | | The command + header length could not fit to the intermediate buffer. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: send-stream: pass char buffer to read_bufDavid Sterba2016-11-23
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: send-stream: fix size types passed to read_bufDavid Sterba2016-11-23
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: send-stream: rename single letter variableDavid Sterba2016-11-23
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* 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>