Commit Graph

2924 Commits

Author SHA1 Message Date
David Sterba
5a38a52194 btrfs-progs: tests: iterate over fuzzed images and test various tools
Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 15:07:21 +02:00
Domagoj Tršan
ff9ee51677 btrfs-progs: change btrfs_csum_final result param type to u8
Signed-off-by: Domagoj Tršan <domagoj.trsan@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 11:35:50 +02:00
Lakshmipathi.G
b56fe16922 btrfs-progs: convert: check source file system state
Signed-off-by: Lakshmipathi.G <Lakshmipathi.G@giis.co.in>
[ add doc note ]
Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 11:35:49 +02:00
David Sterba
2a9daceb07 btrfs-progs: mkfs: remove useless helper
Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 11:33:15 +02:00
David Sterba
34673ebeb0 btrfs-progs: use PATH_MAX in cmd_inspect_logical_resolve
Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 11:33:15 +02:00
David Sterba
91435117d7 btrfs-progs: remove unused variable in add_inode_items
It hasn't been used since the first commit.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 11:33:15 +02:00
David Sterba
890f4a61d7 btrfs-progs: cleanup, kill trivial btrfs_key_type helper
Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 11:33:15 +02:00
David Sterba
555743075b btrfs-progs: cleanup, kill trivial btrfs_set_key_type helper
Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 11:33:15 +02:00
David Sterba
ea84d54121 btrfs-progs: improve error handling in clone_inode_rec
Cleanup the rb_tree.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 11:33:15 +02:00
David Sterba
7e955fc856 btrfs-progs: corrupt-block: fix assertion condition
The ->data is no longer a pointer but an embedded array.

Resolves-coverity-id: 1372671
Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 11:33:15 +02:00
David Sterba
c7a1f66a20 btrfs-progs: check: switch some messages to common helpers
Switch the messages that do not come from the actual image checking,
more like the parameter verification.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 11:33:15 +02:00
David Sterba
a4e59b6776 btrfs-progs: image: switch to common message helpers
Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 11:33:15 +02:00
David Sterba
6733181501 btrfs-progs: convert: improve error handling in do_rollback
Handle transaction errors.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 11:33:15 +02:00
David Sterba
1497a772c3 btrfs-progs: check: improve error handling in add_extent_rec_nolookup
Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 11:33:15 +02:00
David Sterba
257f697962 btrfs-progs: check: handle errors returned by add_extent_rec_nolookup
Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 11:33:15 +02:00
David Sterba
1ed3426d3f btrfs-progs: use standard allocation functions in non-kenrel code
Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 11:33:15 +02:00
David Sterba
b80a4641e5 btrfs-progs: improve error handling in btrfs_add_to_fsid
Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 11:33:15 +02:00
David Sterba
7b83595dbd btrfs-progs: corrupt-block: improved error handling in corrupt_item_nocow
Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 11:33:15 +02:00
David Sterba
689b6249f3 btrfs-progs: dump-super: switch to common message helpers
Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 11:33:15 +02:00
David Sterba
df36cbdad2 btrfs-progs: improve error handling in btrfs_alloc_data_chunk
Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 11:33:15 +02:00
David Sterba
1424a9b4d9 btrfs-progs: remove redundant check in btrfs_add_to_fsid
The callers do the sanity checks.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 11:33:15 +02:00
David Sterba
ee3dfeaab2 btrfs-progs: prop: simplify help printing code
Remove a trivial helper.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 11:33:14 +02:00
David Sterba
acf978a2d4 btrfs-progs: tree-stats: switch to common message helpers
Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 11:33:14 +02:00
David Sterba
4a16608150 btrfs-progs: fi du: improved error handling in mark_inode_seen
The callchain handles errors, don't crash on unexpected condition.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 11:33:14 +02:00
David Sterba
44af5de2f3 btrfs-progs: fi du: catch bogus extent lengths
If we get a zero-length from the ioctl for whatever reason, we should
not crash.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 11:33:04 +02:00
David Sterba
939bc6323b btrfs-progs: inspect: improved error handling
Two remaining BUG_ON, be more specific what's wrong.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 14:12:38 +02:00
David Sterba
ad44d1eb17 btrfs-progs: improved error handling in btrfs_print_tree
Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 14:12:38 +02:00
David Sterba
26fbf0546d btrfs-progs: qgroup: switch to common message helpers
Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 14:12:38 +02:00
David Sterba
c027c13531 btrfs-progs: remove trivial helpers for filtering functions
Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 14:12:38 +02:00
David Sterba
8a167ec579 btrfs-progs: catch invalid flags in open_ctree_fd
Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 14:12:38 +02:00
David Sterba
93a34924e1 btrfs-progs: convert: improve error handling in create_image_file_range
Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 14:12:38 +02:00
David Sterba
030fa48b55 btrfs-progs: mkfs: handle block ordering errors in make_btrfs
Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 14:12:38 +02:00
David Sterba
b83e93e65d btrfs-progs: chunk-recover: improve error handling in insert_stripe
Switch to negative errnos, the callchain handles errors.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 14:12:38 +02:00
David Sterba
1620e2a042 btrfs-progs: switch column values to asserts
This is checking correct usage, not runtime errors.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 14:12:38 +02:00
David Sterba
40ca1d513d btrfs-progs: check: improved error handling in calc_extent_flag
All callers handle errors.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 14:12:38 +02:00
David Sterba
28fdd0d2ae btrfs-progs: receive: improved error handling in process_snapshot
Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 14:12:38 +02:00
David Sterba
1ef93ea863 btrfs-progs: handle errors from btrfs_alloc_path
All functions already return an error condition, so the callers should
expect that.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 14:12:38 +02:00
David Sterba
b318553f33 btrfs-progs: mkfs: check for sane sectorsize earlier
Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 14:12:38 +02:00
David Sterba
976f6adfb5 btrfs-progs: more verbose error handling in creation helpers
Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 14:12:38 +02:00
David Sterba
2d7c6dc931 btrfs-progs: switch BUG_ON to ASSERT in reserve_free_space
That's not a real error condition, catch bad function usge.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 14:12:38 +02:00
David Sterba
41fe00e1eb btrfs-progs: dump-tree: improved error handling in cmd_inspect_dump_tree
Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 14:12:38 +02:00
David Sterba
04b3bf1779 btrfs-progs: dump-tree: improved error handling in print_extents
Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 14:12:30 +02:00
David Sterba
7febbc9efe btrfs-progs: fi usage: improved error handling in load_device_info
Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 14:12:10 +02:00
David Sterba
5b16054958 btrfs-progs: scrub: improved error handling in scrub_read_file
Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 14:12:10 +02:00
David Sterba
0ce97733fe
Btrfs progs v4.7.3
Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 13:59:53 +02:00
David Sterba
72dbd4397d btrfs-progs: update CHANGES for 4.7.3
Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 13:57:37 +02:00
David Sterba
7aaa1a92f6 btrfs-progs: mkfs: use preallocated buffers for config uuids
No need for dynamic allocation, the buffers are small, remove the
now-useless error conditions.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 13:44:24 +02:00
David Sterba
90e3e630c2 btrfs-progs: mkfs: fix reading rotational status value
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>
2016-09-21 13:36:04 +02:00
David Sterba
d75e061bcd btrfs-progs: defrag: set errno correctly in the callback
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>
2016-09-21 11:50:42 +02:00
David Sterba
eccba6261a btrfs-progs: subvol create: remove v from getopt
The option 'v' was mistakenly added in
2ed161bd28 but there's no such option for
create at the moment, remove it.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 11:50:38 +02:00