summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* btrfs-progs: improve error handling in btrfs_alloc_data_chunkDavid Sterba2016-10-03
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: remove redundant check in btrfs_add_to_fsidDavid Sterba2016-10-03
| | | | | | The callers do the sanity checks. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: prop: simplify help printing codeDavid Sterba2016-10-03
| | | | | | Remove a trivial helper. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tree-stats: switch to common message helpersDavid Sterba2016-10-03
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: fi du: improved error handling in mark_inode_seenDavid Sterba2016-10-03
| | | | | | The callchain handles errors, don't crash on unexpected condition. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: fi du: catch bogus extent lengthsDavid Sterba2016-10-03
| | | | | | | If we get a zero-length from the ioctl for whatever reason, we should not crash. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: inspect: improved error handlingDavid Sterba2016-09-21
| | | | | | Two remaining BUG_ON, be more specific what's wrong. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: improved error handling in btrfs_print_treeDavid Sterba2016-09-21
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: qgroup: switch to common message helpersDavid Sterba2016-09-21
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: remove trivial helpers for filtering functionsDavid Sterba2016-09-21
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: catch invalid flags in open_ctree_fdDavid Sterba2016-09-21
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: convert: improve error handling in create_image_file_rangeDavid Sterba2016-09-21
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: mkfs: handle block ordering errors in make_btrfsDavid Sterba2016-09-21
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: chunk-recover: improve error handling in insert_stripeDavid Sterba2016-09-21
| | | | | | Switch to negative errnos, the callchain handles errors. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: switch column values to assertsDavid Sterba2016-09-21
| | | | | | This is checking correct usage, not runtime errors. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: check: improved error handling in calc_extent_flagDavid Sterba2016-09-21
| | | | | | All callers handle errors. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: receive: improved error handling in process_snapshotDavid Sterba2016-09-21
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: handle errors from btrfs_alloc_pathDavid Sterba2016-09-21
| | | | | | | All functions already return an error condition, so the callers should expect that. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: mkfs: check for sane sectorsize earlierDavid Sterba2016-09-21
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: more verbose error handling in creation helpersDavid Sterba2016-09-21
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: switch BUG_ON to ASSERT in reserve_free_spaceDavid Sterba2016-09-21
| | | | | | That's not a real error condition, catch bad function usge. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: dump-tree: improved error handling in cmd_inspect_dump_treeDavid Sterba2016-09-21
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: dump-tree: improved error handling in print_extentsDavid Sterba2016-09-21
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: fi usage: improved error handling in load_device_infoDavid Sterba2016-09-21
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* 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>