summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* btrfs-progs: doc qgroup, sort subcommands alphabeticallyDavid Sterba2015-01-03
| | | | Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: doc property, sort subcommands alphabeticallyDavid Sterba2015-01-03
| | | | Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: doc inspect-internal, sort subcommands alphabeticallyDavid Sterba2015-01-03
| | | | Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: doc device, sort subcommands alphabeticallyDavid Sterba2015-01-03
| | | | Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: doc, undocument old balance syntaxDavid Sterba2015-01-03
| | | | | | Standalone balance subcommand has been around since 3.3. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: doc balance, sort subcommands alphabeticallyDavid Sterba2015-01-03
| | | | Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: doc filesystem, sort subcommands alphabeticallyDavid Sterba2015-01-03
| | | | Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: doc btrfs, sort subcommands alphabeticallyDavid Sterba2015-01-03
| | | | Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: doc restore, cleanups for wiki conversionDavid Sterba2015-01-03
| | | | | | Properly format the patch regex and add a line break. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: doc filesystem, cleanups for wiki conversionDavid Sterba2015-01-03
| | | | | | Remove trailing space, add line break before NOTE. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: doc balance, cleanups for wiki conversionDavid Sterba2015-01-03
| | | | Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: doc mkfs, cleanups for wiki conversionDavid Sterba2015-01-03
| | | | | | | - remove trailing whitespace - use +mono+ formatting for command line example Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: doc mkfs, mark leafsize deprecatedDavid Sterba2015-01-03
| | | | Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: doc: fix incorrect format of 'l' option in mkfs.btrfsTsutomu Itoh2015-01-03
| | | | | | | | | | | | | | | | | | | The format of 'l' option in mkfs.btrfs.txt is wrong. And, when the head of the character string is 65536, the following warning is displayed. $ make Making all in Documentation [ASCII] mkfs.btrfs.xml asciidoc: WARNING: mkfs.btrfs.xml.tmp1: line 67: list item index: expected 1 got 65536 [XMLTO] mkfs.btrfs.8 [GZ] mkfs.btrfs.8.gz rm mkfs.btrfs.8 mkfs.btrfs.xml So, fix it. Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: doc filesystem, add unit suffixes to option descriptionsDavid Sterba2015-01-03
| | | | | Reported-by: Chris Murphy <lists@colorremedies.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: doc filesystem, fix quoting of size suffixesDavid Sterba2015-01-03
| | | | | | | Escape the first quote of two to cancel effects of ordinary '...' . Reported-by: Chris Murphy <lists@colorremedies.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* Btrfs progs v3.18David Sterba2014-12-30
| | | | Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: fix minor leak of dev_info in btrfs_scan_kernelDavid Sterba2014-12-30
| | | | | Resolves-coverity-id: 1127098 Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: fix overflow check in btrfs_insert_inode_refDavid Sterba2014-12-30
| | | | | Resolves-coverity-id: 1260247 Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: check, missing parens around compound block in ↵David Sterba2014-12-30
| | | | | | | find_normal_file_extent Resolves-coverity-id: 1260248 Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: fi show, don't leak canonical pathDavid Sterba2014-12-30
| | | | | Resolves-coverity-id: 1260252 Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: check, fix path leak in error branchDavid Sterba2014-12-30
| | | | | Resolves-coverity-id: 1260250 Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Documentation: add T/P/E description for resize cmdGui Hecheng2014-12-30
| | | | | | Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com> Reviewed-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: refine btrfs-debug-tree error prompt when a mount point givenGui Hecheng2014-12-29
| | | | | | | | | | | | | | | | | Now, if exec: # btrfs-debug-tree <mount_point> it echos: : Superblock bytenr is larger than device size But it is quite misleading, because it is a valid btrfs. In this case, we should tell the developer to provide a block device. After apply: : '<mount_point>' is not a block device Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com> Reviewed-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: move check_arg_type() to util.cGui Hecheng2014-12-29
| | | | | | | | | The check_arg_type() function does quite generic thing, move it to utils.c. Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com> Reviewed-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Fix btrfs fi show by uuid and labelJustin Maggard2014-12-29
| | | | | | | | | | | | | | | | Commit 8be2fff (btrfs-progs: apply realpath for btrfs fi show when mount point is given) changed the behavior of btrfs fi show to return an error if the call to realpath() failed. This broke the ability to specify a filesystem by uuid or label. So let's not consider a failed call to realpath() as an error. If the user really specified a bad device, just return nothing like we did before. Signed-off-by: Justin Maggard <jmaggard10@gmail.com> Reviewed-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Fix a bug in reset_nlink() which may deletes the recovered fileQu Wenruo2014-12-29
| | | | | | | | | | | | | | | | In reset_nlink(), we believe rec->found_link as accurate number of the valid links. However it only records the number of found DIR_ITEM, so we can't use it as reliable value. Before this patch, in some case, leaf corruption recovery will believe there is a valid backref but don't add_link() since it can't find any valid one and don't put it into the lost+found dir. So the recovered inode will be considered as an orphan item without orphan item and repair_inode_orphan_item() will add orphan item for it, causing all the filename/filetype we recovered being a waste of time. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs fix wrong memory free on check_is_rootSatoru Takeuchi2014-12-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When "/" is Btrfs, "btrfs property <subcommand> /" regards it as non-root by mistake. check_is_root() regards @object as a file system root if the following two conditions are satisfied. a) Both @object and its parent directory are Btrfs object (file system root, subvolume, inode, and device used for Btrfs). b) fsid of the above mentioned two objects are different. It doesn't work if @object is "/" because, in this case, fsid of "/" and its parent (it's also "/"), are the same. * Test environment Two Btrfs file system (not subvolume) "/" and "/home/sat/mnt". * How to reproduce Submit "btrfs prop get" against the above mentioned file systems. * Test Result ** Actual result (without my patch) ========================== ro=false label= # label is displayed because it's a file system root ro=false # label is not displayed even if it's a file system root ========================== ** Expected result (with my patch) ========================== ro=false label= ro=false label=foo # label is displayed =========================== Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Reported-by: Naohiro Aota <naota@elisp.net> Reviewed-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: let btrfs_free_path accept NULLDavid Sterba2014-12-19
| | | | | | | | Same in kernel and matches semantics of free(). Resolves-Coverity-CID: 1054881 Reviewed-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: check allocation result in add_clone_sourceDavid Sterba2014-12-19
| | | | | | Resolves-Coverity-CID: 1054894 Reviewed-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: check result of first_cache_extentDavid Sterba2014-12-19
| | | | | | | | If the tree's empty, we'll get NULL and dereference it. Resolves-Coverity-CID: 1248828 Reviewed-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: fragments, close output file on errorDavid Sterba2014-12-19
| | | | | | Resolves-Coverity-CID: 1258794 Reviewed-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: corrupt block, add break after option UDavid Sterba2014-12-19
| | | | | | Resolves-Coverity-CID: 1258793 Reviewed-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: corrupt block, add missing break to option IDavid Sterba2014-12-19
| | | | | | | | Using -I would imply -d. Resolves-Coverity-CID: 1258792 Reviewed-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: move contents of math.h to utils.h and deleteDavid Sterba2014-12-19
| | | | Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: cleanup: avoid to use literal for getopt valSatoru Takeuchi2014-12-19
| | | | Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Enhance the document of btrfs propertySatoru Takeuchi2014-12-19
| | | | | | | | | | | | Enhance the document of btrfs property as follows. - Add the description about the candidates of <name>. - Enrich the description of <object>. - Fix typos and some redundancy. Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Reported-by: Naohiro Aota <naota@elisp.net> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Remove deprecated _BSD_SOURCE macro.Qu Wenruo2014-12-19
| | | | | | | | | | | | | | | | Fix the following gcc(>4.9) and clang warning: In file included from cmds-receive.c:24: In file included from ./kerncompat.h:22: In file included from /usr/include/stdio.h:27: /usr/include/features.h:148:3: warning: "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-W#warnings] ^ 1 warning generated. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Reviewed-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Remove a unused function offset_to_bitmap()Qu Wenruo2014-12-19
| | | | | | | | | | | | | | Fix the following clang warning: free-space-cache.c:464:19: warning: unused function 'offset_to_bitmap' [-Wunused-function] static inline u64 offset_to_bitmap(struct btrfs_free_space_ctl *ctl, ^ 1 warning generated. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Reviewed-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Remove a unused function root_gtp_mask().Qu Wenruo2014-12-19
| | | | | | | | | | | | | | Fix the following clang warning when compiling btrfs-progs: radix-tree.c:78:21: warning: unused function 'root_gfp_mask' [-Wunused-function] static inline gfp_t root_gfp_mask(struct radix_tree_root *root) ^ 1 warning generated. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Reviewed-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Fix a clang dead-judgement warning in disk-io.c.Qu Wenruo2014-12-19
| | | | | | | | | | | | | | | | | | | | When compiled with clang, the following warning is outputted. disk-io.c:1017:15: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] if (dev_size < 0) ~~~~~~~~ ^ ~ 1 warning generated. This is because dev_size is defined as unsigned type, but lseek() will return singed valued. So the judgement will always to false. Use temporary off_t return value to solve it. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Reviewed-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Makefile: Move linker only option to LDFLAGSQu Wenruo2014-12-19
| | | | | | | | | | Move the linker only option -rdynamic to LDFLAGS. This resolve lots of the following warning if using clang as CC: clang: warning: argument unused during compilation: '-rdynamic' Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Reviewed-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: remove false dependency on libmDavid Sterba2014-12-19
| | | | | | It ends up in the final binary, but there are not math functions used. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: disable backtrace and define __always_inlineMerlijn Wajer2014-12-18
| | | | | | | | | Disable backtrace and define __always_inline when glibc is not used as libc. This, together with some header changes allows btrfs-progs to compile with musl-libc. Signed-off-by: Merlijn Wajer <merlijn@wizzup.org> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: include headers required for musl-libcMerlijn Wajer2014-12-18
| | | | | | | | This fixes various compilation errors where PATH_MAX and XATTR_SIZE_MAX were missing. To my knowledge, this should have no bad side effects. Signed-off-by: Merlijn Wajer <merlijn@wizzup.org> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Add testcase for leaf-corrupted btrfsck repairing.Qu Wenruo2014-12-18
| | | | | | | Add testcase for leaf-corrupted btrfsck repairing using the new generate_image.sh method. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
* Btrfs-progs: add two new test imagesJosef Bacik2014-12-18
| | | | | | | | | | | | | | | | This adds two new test images 1) 008-bad-offset-snapshots. This has a corrupt item with multiple snapshots pointing to it, to make sure the bad block repair stuff doesn't loop and actually repairs stuff. It also requires the dir index repair stuff to pass our built in tests which is why it's not tied to the same commit. 2) 009-bad-dir-index-name.img. This has a corrupt name in a dir index to make sure our dir index repair stuff is working properly. Thanks, Signed-off-by: Josef Bacik <jbacik@fb.com>
* btrfs-progs: check, update documentationDavid Sterba2014-12-18
| | | | | | Add recently added options to manpage, a few other rewordings. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: unify unit mode parameters and variablesDavid Sterba2014-12-18
| | | | | | Use unsigned type and a common name everywhere. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: dev usage, update manpageDavid Sterba2014-12-18
| | | | Signed-off-by: David Sterba <dsterba@suse.cz>