Commit Graph

2404 Commits (207884898354f6e0a8fd50b16866abf103f46c27)
 

Author SHA1 Message Date
David Sterba 2078848983 btrfs-progs: debug-tree: teach -t option about the chunk and root trees
A user on IRC wanted to dump the chunk tree using the -t option. As the
-t option enumerates only trees pointed by the tree_root, the chunk tree
is skipped. Similar for th tree of tree roots.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-13 16:43:48 +01:00
David Sterba 0aa796cad7 btrfs-progs: subvol show: handle options by getopt
The subvolume show command does not take any optios but at least it
should honor "--", as reported.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=110181
Reported-by: <moviuro+kernel@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-13 16:43:48 +01:00
David Sterba b9ec406c0f btrfs-progs: fi usage: support mixed blockgroups
Properly account the duplicated block groups and global reserve.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=110111
Reported-by: Chris Murphy <bugzilla@colorremedies.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-13 16:43:13 +01:00
David Sterba ecd4bb607f btrfs-progs: docs: enhance btrfs-filesystem manual page
Wording, formatting, explanations, examples.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 18:42:49 +01:00
David Sterba ac45d64c04 btrfs-progs: tests: add missing prerequisites
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:16:11 +01:00
David Sterba 4b9d4fe00f btrfs-porgs: fi usage: rename variable to avoid shadowing
Reported by gcc -Wshadow .

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:57 +01:00
David Sterba 39e98213eb btrfs-porgs: check: rename variable to avoid shadowing
Reported by gcc -Wshadow .

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:56 +01:00
David Sterba df3a134d0e btrfs-porgs: qgroup: rename variable to avoid shadowing
Reported by gcc -Wshadow .

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:56 +01:00
David Sterba 407f928cd2 btrfs-progs: add function attributes for the printf-like
Reported by gcc -Wsuggest-attribute=format .

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:55 +01:00
David Sterba f9ae914756 btrfs-progs: build: fix builds with extra warnings, W=1
Wrong variable name used in the main makefile.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:55 +01:00
David Sterba ac4ec4d4f4 btrfs-progs: check for negative return value from ioctl
Handle only negative values returned by ioctl syscalls, with exception
of the device remove. It returns positive values that are handled later.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:55 +01:00
David Sterba 633dc6f80f btrfs-progs: remove unnecessary errno temp variables
We can read errno directly if it's not clobbered by any intermediate
calls.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:55 +01:00
David Sterba 374d67fdef btrfs-progs: free-space-tree: minor message adjustments
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:55 +01:00
Khem Raj fcb6b102eb btrfsprogs: corrupt-blocks: include limits.h to define PATH_MAX
limits.h is needed for PATH_MAX definition

Fixes
| btrfs-corrupt-block.c: In function 'corrupt_dir_item':
| btrfs-corrupt-block.c:478:12: error: 'PATH_MAX' undeclared (first use in this function)
|   char name[PATH_MAX];

Signed-off-by: Khem Raj <raj.khem@gmail.com>
[ minor changelog edits ]
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:54 +01:00
David Sterba 83a7413318 btrfs-progs: docs: document new mount option fragment
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:54 +01:00
David Sterba 23c51533ae btrfs-progs: docs: sort mount options alphabetically
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:54 +01:00
Omar Sandoval e4797df6a9 btrfs-progs: check the free space tree in btrfsck
This reuses the existing code for checking the free space cache, we just
need to load the free space tree. While we do that, we check a couple of
invariants on the free space tree itself. This requires pulling in some
code from the kernel to exclude the super stripes.

Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:54 +01:00
Omar Sandoval d8c537e71f btrfs-progs: add basic awareness of the free space tree
To start, let's tell btrfs-progs to read the free space root and how to
print the on-disk format of the free space tree. However, we're not
adding the FREE_SPACE_TREE read-only compat bit to the set of supported
bits because progs doesn't know how to keep the free space tree
consistent.

Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:54 +01:00
David Sterba 32c063ccb7 btrfs-progs: docs: rename btrfs-mount to btrfs-man5
The page does will not contain only mount options but other stuff.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:53 +01:00
David Sterba a8829f5335 btrfs-progs: docs, btrfs-mount: enhance file attributes section
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:53 +01:00
David Sterba 7ccc0543dc btrfs-progs: cleanup, move usage help strings closer to the command callbacks
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:53 +01:00
David Sterba f7c9278008 btrfs-progs: cmd property: use correct usage strings
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:53 +01:00
David Sterba 0e1acda2b2 btrfs-progs: cmd fi usage: switch to common error message wrapper
Message texts were adjusted.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:53 +01:00
David Sterba 641b5d83dd btrfs-progs: cmd filesystem: switch to common error message wrapper
Message texts were adjusted.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:53 +01:00
David Sterba edbdd06e25 btrfs-progs: cmd replace: switch to common error message wrapper
Message texts were adjusted.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:52 +01:00
David Sterba e7e759017d btrfs-progs: cmd subvolume: switch to common error message wrapper
Message texts were adjusted.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:52 +01:00
David Sterba e67f03887f btrfs-progs: cmd send: switch to common error message wrapper
Message texts were adjusted.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:52 +01:00
David Sterba 7330c881c8 btrfs-progs: cmd receive: switch to common error message wrapper
Message texts were adjusted.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:52 +01:00
David Sterba e3926b4dc8 btrfs-progs: cmd qgroup: switch to common error message wrapper
Message texts were adjusted.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:52 +01:00
David Sterba 28831d5489 btrfs-progs: cmd property: switch to common error message wrapper
Message texts were adjusted.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:51 +01:00
David Sterba c8e8509239 btrfs-progs: cmd balance: switch to common error message wrapper
Message texts were adjusted.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:51 +01:00
David Sterba 3d6f61f8cb btrfs-progs: cmd quota: switch to common error message wrapper
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:51 +01:00
David Sterba 6bc6e850ee btrfs-progs: cmd rescue: switch to common error message wrapper
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:51 +01:00
David Sterba b98ad87a03 btrfs-progs: catch memory allocation failure in btrfs_split_item
Do the dumb BUG_ON now, the function needs more changes to handle all
errors.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:51 +01:00
David Sterba ef45c6b9db btrfs-progs: handler memory allocation failure in add_extent_rec
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:51 +01:00
David Sterba 87296b5541 btrfs-progs: catch memory allocation failure from alloc_data_backref
Do the dumb BUG_ON now, the function needs more changes to handle all
errors.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:50 +01:00
David Sterba 62b4c169e4 btrfs-progs: catch memory allocation failure from alloc_tree_backref
Do the dumb BUG_ON now, the function needs more changes to handle all
errors.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:50 +01:00
David Sterba cb2b8b19c8 btrfs-progs: catch memory allocation failure in splice_shared_node
Do the dumb BUG_ON now, the function needs more changes to handle all
errors.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:50 +01:00
David Sterba b317ca97d3 btrfs-progs: handle errors in get_inode_backref and fail in the caller
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:01:09 +01:00
David Sterba f72a3f9f9f btrfs-progs: handle errors in get_root_backref and fail in the caller
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:01:08 +01:00
David Sterba 3823cc2771 btrfs-progs: return errors from get_root_rec, fail in callers
get_root_rec return value is enahanced, callers will just BUG_ON now
and will be fixed one by one.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:01:08 +01:00
David Sterba 6aff5d74bd btrfs-progs: handle errors in add_shared_node and fail in the caller
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:01:08 +01:00
David Sterba e0a28fa2fd btrfs-progs: return errors from clone_inode_rec, fail in callers
clone_inode_rec return value is enahanced, callers will just BUG_ON now
and will be fixed one by one.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:01:07 +01:00
David Sterba 441f88498d btrfs-progs: return errors from get_inode_rec, fail in callers
get_inode_rec return value is enahanced, callers will just BUG_ON now
and will be fixed one by one.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:01:07 +01:00
David Sterba cf0fce7ed4 btrfs-progs: docs, enhance the mount option manual page
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:01:07 +01:00
David Sterba 154c389e92 btrfs-progs: docs, btrfs-mount: enhance fatal_erros
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:01:07 +01:00
David Sterba 79b8750fe7 btrfs-progs: docs, btrfs-mount: put NOTE tag to new paragraph
Otherwise it's not rendered properly.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:01:07 +01:00
David Sterba 7dffef0a37 btrfs-progs: docs, btrfs-mount: unindent descriptions
Asciidoc ignores special keywords like WARNING or NOTE if they're not at
the beginning of the line and they're not renedered very visibly in the
end.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:01:07 +01:00
Christoph Anton Mitterer d0ba996f5f btrfs-progs: document snapshot unaware defrag
In btrfs-filesystem(8), improved the documentation of snapshot unaware
defragmentation and included the exact kernel version numbers being affected as
well as the possible effects.
No longer use the word "unlink" which is easily understood as "deleting a file".
Moved the warning more to the beginning of "defragment" subcommand's
documentation where it's more visible to readers.

Added the same warning to the "autodefrag" option of btrfs-mount(5).

Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
2016-01-12 15:01:06 +01:00
David Sterba 894c346714 btrfs-progs: docs, update btrfs(8) manual page
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:01:06 +01:00