summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* btrfs-progs: scrub: improved error handling in scrub_read_fileDavid Sterba2016-09-21
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* Btrfs progs v4.7.3David Sterba2016-09-21
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: update CHANGES for 4.7.3David Sterba2016-09-21
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: mkfs: use preallocated buffers for config uuidsDavid Sterba2016-09-21
| | | | | | | No need for dynamic allocation, the buffers are small, remove the now-useless error conditions. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: mkfs: fix reading rotational status valueDavid Sterba2016-09-21
| | | | | | | ASAN reports that we're reading beyond the bounds, and is right. The variable is too short to store a nonempty string for atoi. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: defrag: set errno correctly in the callbackDavid Sterba2016-09-21
| | | | | | | | | | | In case defrag fails, the errno is not properly reported everywhere but rather the last value of 'e', which could be 0. Then we get confusing error messages like: ERROR: defrag failed on /path/to/file: Success Reported-by: Adam Mizerski <adam@mizerski.pl> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: subvol create: remove v from getoptDavid Sterba2016-09-21
| | | | | | | | The option 'v' was mistakenly added in 2ed161bd281beca29feebebbc8c4227cc6e918c3 but there's no such option for create at the moment, remove it. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: subvol delete: add missing verbose optionVincent Batts2016-09-21
| | | | | | | | There was already the logic for verbose output, but the flag parsing did not include it. Signed-off-by: Vincent Batts <vbatts@hashbangbash.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: docs: fix typos in btrfs-subvolumeadduxa2016-09-21
| | | | | [ Documentation fix, github pull request 16 ] Signed-off-by: David Sterba <dsterba@suse.com>
* Revert "btrfs-progs: fix compat_ro mask for free space tree"Omar Sandoval2016-09-21
| | | | | | | | | btrfs-progs can't mount space_cache=v2 filesystems read-write, which is why the compat bit wasn't added to the supported mask in the first place. Remove it. Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: reorganize extent_buffer and fix alignment of dataDavid Sterba2016-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reported by UBSAN, the checksum code tries to access unaligned data that come from the extent_buffer. struct extent_buffer { struct cache_extent cache_node; /* 0 48 */ u64 start; /* 48 8 */ u64 dev_bytenr; /* 56 8 */ /* --- cacheline 1 boundary (64 bytes) --- */ u32 len; /* 64 4 */ /* XXX 4 bytes hole, try to pack */ struct extent_io_tree * tree; /* 72 8 */ struct list_head lru; /* 80 16 */ struct list_head recow; /* 96 16 */ int refs; /* 112 4 */ u32 flags; /* 116 4 */ int fd; /* 120 4 */ char data[0]; /* 124 0 */ /* size: 128, cachelines: 2, members: 11 */ /* sum members: 120, holes: 1, sum holes: 4 */ /* padding: 4 */ }; Add explicit alignment to data. Reported-by: Lukas Lueg <lukas.lueg@gmail.com> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=156471 Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add 021-partially-dropped-snapshot-caseWang Xiaoguang2016-09-21
| | | | | Signed-off-by: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: check: make low memory mode support partially dropped snapshotsWang Xiaoguang2016-09-21
| | | | | Signed-off-by: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: better error report in btrfs_scan_fs_devicesDavid Sterba2016-09-21
| | | | | | Print the found sizes. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add fuzzed images for bad block group offsetDavid Sterba2016-09-21
| | | | | Reported-by: Lukas Lueg <lukas.lueg@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: avoid looping forever when a bad blockgroup key is foundJeff Mahoney2016-09-21
| | | | | | | | | | | If we discover a bad BLOCK_GROUP_ITEM_KEY with offset = 0, we'll end up looping forever when we read the block groups in. This is due to the search for the next block group starting at the current object + the offset. If offset is 0, we'll just get the same key over and over and never advance. This patch ensures that we'll advance at least one objectid per iteration. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: remove stray newline from message in check_superDavid Sterba2016-09-21
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: run check with various options on the fuzzed imagesDavid Sterba2016-09-21
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add fuzz test to try btrfs-image on all imagesDavid Sterba2016-09-21
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: rename test 001 to mention checkDavid Sterba2016-09-21
| | | | | | Make it more clear that the test does 'btrfs check'. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add fuzzed image for a bad backrefDavid Sterba2016-09-21
| | | | | Reported-by: Lukas Lueg <lukas.lueg@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tree-stats: check and report mount statusDavid Sterba2016-09-21
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: docs: update flushoncommit default valueDavid Sterba2016-09-21
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: docs: Add warning for build RAID btrfs on partions from the ↵Qu Wenruo2016-09-21
| | | | | | | | | same device Quite a common sense for any RAID-like multi-device setup, just in case. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: mkfs: Warn user for minimal RAID5/6 devices setupQu Wenruo2016-09-21
| | | | | | | | | | | For RAID5, 2 devices setup is just RAID1 with more overhead. For RAID6, 3 devices setup is RAID1 with 3 copies, not what most user want. So warn user at mkfs time for such case, and add explain in man pages. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: post btrfs-convert verify permissions and ACLsLakshmipathi.G2016-09-21
| | | | | Signed-off-by: Lakshmipathi.G <Lakshmipathi.G@giis.co.in> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: add UBSAN to debugging featuresDavid Sterba2016-09-21
| | | | | | usage: make D=ubsan Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: dump-super: changes in options to specify superblocksDavid Sterba2016-09-21
| | | | | | | | | | | | Some tools (check, select-super, dump-super) can use the alternate superblocks, but the options are not consistent. To make it less confusing, change the meaning of option -s in 'dump-super' to specify the superblock copy, instead of taking the offset. Though this is a change in UI, the old usage is detected and the result would be the same, no breakage in existing scripts. Signed-off-by: David Sterba <dsterba@suse.com>
* Btrfs progs v4.7.2David Sterba2016-09-05
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: update CHANGES for 4.7.2David Sterba2016-09-05
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* Revert "btrfs-progs: check: supplement extent backref list with rbtree"David Sterba2016-09-05
| | | | | | | | | | | | | | | | This reverts commit 31d8235410985e0b64487354c9ba67d40c4bdfe3. False report of backref mismatches, lots of messages similar to: Incorrect local backref count on 12713984 root 5 owner 257 offset 12845056 found 1 wanted 0 back 0x7b3ed0 backpointer mismatch on [12713984 131072] Repairing will make things worse. A fix has been proposed, but is not finalized so we go with a revert. Reported-by: Chris Murphy <bugzilla@colorremedies.com> References: https://bugzilla.kernel.org/show_bug.cgi?id=155791 Signed-off-by: David Sterba <dsterba@suse.com>
* Revert "btrfs-progs: check: switch to iterating over the backref_tree"David Sterba2016-09-05
| | | | This reverts commit bbebe814c0e335745cfa773df966418e754b50e3.
* btrfs-progs: build: add ASAN to debugging featuresDavid Sterba2016-09-05
| | | | | | usage: make D=asan Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add fuzzed image for heap overflow while checking chunk ↵David Sterba2016-09-05
| | | | | | | items Reported-by: Lukas Lueg <lukas.lueg@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add fuzzed image for invalid chunk sectorsizeDavid Sterba2016-09-05
| | | | | Reported-by: Lukas Lueg <lukas.lueg@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add fuzzed image for invalid sys_array and stripe_lenDavid Sterba2016-09-05
| | | | | Reported-by: Lukas Lueg <lukas.lueg@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add fuzzed image for invalid sub_stripe valueDavid Sterba2016-09-05
| | | | | Reported-by: Lukas Lueg <lukas.lueg@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: image: more verbose syntax erors for -t and -cDavid Sterba2016-09-05
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: print help test to stdoutDavid Sterba2016-09-05
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add 015-dump-super-garbageDavid Sterba2016-09-05
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: dump-super: detect invalid checksum typeDavid Sterba2016-09-05
| | | | | | | | | The helper btrfs_super_csum_size unconditionally bugs on a bogus value, the dump-super is supposed to dump even corrupted superblocks so this must not happen here. Group the checsum values in the output and be more robust agains garbage values. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: drop permission arg from non-creating openDavid Sterba2016-09-05
| | | | | | The permissions do not make sense without O_CREATE mode. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: docs: describe filesystem featuresDavid Sterba2016-09-05
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: only install udev rules for udev >= 190Jeff Mahoney2016-09-05
| | | | | | | | Prior to udev v190, there was no btrfs builtin helper. Installing it on systems with an older udev will cause problems. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests README: fuzzed imagesDavid Sterba2016-09-05
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: fuzz-test: Add test case for unaligned extent itemQu Wenruo2016-09-05
| | | | | | | Reported-by: Lukas Lueg <lukas.lueg@gmail.com> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> [ added bko-NNN- prefix to the files ] Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: fsck: Avoid abort and BUG_ON in add_tree_backrefQu Wenruo2016-09-05
| | | | | | | | | | | | Add_tree_backref() can cause BUG_ON() and abort() in quite a lot of cases, from the ENOMEM to existing tree backref records. Change all these BUG_ON() and abort() to return proper values. And modify all callers to handle such problems. Reported-by: Lukas Lueg <lukas.lueg@gmail.com> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: fsck: Check bytenr alignment for extent itemQu Wenruo2016-09-05
| | | | | | | Check bytenr alignment for extent item to filter invalid items early. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: fuzz-test: Add test case for invalid drop levelQu Wenruo2016-09-05
| | | | | | | Reported-by: Lukas Lueg <lukas.lueg@gmail.com> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> [ added bko-NNN- prefix to the files ] Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: fsck: Check drop level before walking through fs treeQu Wenruo2016-09-05
| | | | | | | | | | | | Exposed by fuzzed image from Lukas, which contains invalid drop level (16), causing segfault when accessing path->nodes[drop_level]. This patch will check drop level against fs tree level and BTRFS_MAX_LEVEL to avoid such problem. Reported-by: Lukas Lueg <lukas.lueg@gmail.com> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>