summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* btrfs-progs: volume: Fix a bug causing btrfs-find-root to skip first chunkQu Wenruo2016-02-26
| | | | | | | | | | | | | | | There is a small bug from 2011, where btrfs_next_bg (formally btrfs_next_metadata) function will always skip the first chunk. That's OK for that time, as there is always 3 empty temporary chunks. But now, we may ended up with only one metadata or system chunk, with empty chunk auto-remove from kernel or new mkfs.btrfs. So fix it by checking the initial value so btrfs_next_bg() will return the first chunk if its *logical parameter is 0. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: fix symlink creation multiple timesHongxu Jia2016-02-26
| | | | | | | | | | | | | | | | | | | | | | | The rule to create symlink in Makefile caused parallel issue: $ make -j 40 DESTDIR=/image install BUILD_VERBOSE=1 ... 1 [LN] libbtrfs.so.0 2 [LN] libbtrfs.so 3 ln -s -f libbtrfs.so.0.1 libbtrfs.so.0 4 ln -s -f libbtrfs.so.0.1 libbtrfs.so.0 5 ln -s -f libbtrfs.so.0.1 libbtrfs.so 6 ln -s -f libbtrfs.so.0.1 libbtrfs.so ... It failed occasionally: ... |symlinkat: couldn't stat 'git/libbtrfs.so' even though symlink creation succeeded (No such file or directory). |ln: failed to create symbolic link 'libbtrfs.so': No such file or directory ... Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: use common variables and helpersDavid Sterba2016-02-23
| | | | | | Use TEST_DEV and the associated helpers to manage the tested image. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: store checksums in /tmpDavid Sterba2016-02-23
| | | | | | We don't want to store the checksum on filesystem that we're converting. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: do checksum verification with convert-testsLakshmipathi.G2016-02-23
| | | | | Signed-off-by: Lakshmipathi.G <Lakshmipathi.G@giis.co.in> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: write down the meaning of BTRFS_ARG_BLKDEVSatoru Takeuchi2016-02-05
| | | | | | | | Although BTRFS_ARG_BLKDEV can be returned from check_arg_type(), it's not explained the meaning. Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: describe btrfs-send requires read-only subvolumeSatoru Takeuchi2016-02-04
| | | | | | | | Both man btrfs-send(8) and usage message don't describe btrfs-send needs read-only snapshot as its argument. Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: Fix self-reference of man btrfs-subvolumeSatoru Takeuchi2016-02-04
| | | | | | | btrfs-subvolume(8) is mentioned at "SEE ALSO" section of itself. Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: doc: fix size suffix in mkfs.btrfsTsutomu Itoh2016-01-28
| | | | | | | | There is no petabyte in the explanation of the suffix of the size parameter. So, it's added. Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: doc: fix typo of some documentsTsutomu Itoh2016-01-28
| | | | | | | Some typos are corrected. Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: fix compat_ro mask for free space treeDavid Sterba2016-01-25
| | | | | | | | | The BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE bit is supposed to be in the COMPAT_RO_SUPP bitmask. Reported-by: Holger Hoffstätte <holger.hoffstaette@googlemail.com> Reported-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: Makefile.in: Simplify/correct install-staticMike Gilbert2016-01-21
| | | | | | | | | | | install -D does not create the last component, so this failed if $(DESTDIR)$(bindir) did not already exist. There's no need for a loop here since install accepts multiple source arguments. Signed-off-by: Mike Gilbert <floppym@gentoo.org> Signed-off-by: David Sterba <dsterba@suse.com>
* Btrfs progs v4.4David Sterba2016-01-18
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: docs: update balance manual pageDavid Sterba2016-01-15
| | | | | | | Make the new balance filters' syntax more explicit. Other rewording and reformatting. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: debug-tree: tweak tree node checksDavid Sterba2016-01-15
| | | | | | | | | | The tree root and chunk root base pointers are verified in open_ctree so we don't get NULL here. We still check the node pointers to get better error message. Resolves-coverity-id: 1348450 Resolves-coverity-id: 1348451 Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: fix static buildNoah Massey2016-01-15
| | | | | | | | | Change in "btrfs-progs: introduce helper for parsing args without options" added a dependency on help.o that was duplicated for the static build. Signed-off-by: Noah Massey <noah.massey@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: Use AC_CHECK_TOOL to find ARMike Gilbert2016-01-14
| | | | | | | AC_CHECK_TOOL takes the --host option into account for cross-compiling. Signed-off-by: Mike Gilbert <floppym@gentoo.org> Signed-off-by: David Sterba <dsterba@suse.com>
* Btrfs progs v4.4-rc1David Sterba2016-01-14
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: subvol show: use clean_args_no_options instead of opencodingDavid Sterba2016-01-14
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: introduce helper for parsing args without optionsDavid Sterba2016-01-14
| | | | | | | | | All commands should support the "--" option separator. This is transparently handled by getopt, but we don't use that everywhere. Introduce a helper for commands that take no options (just the path). The object file dependencies need to be adjusted a bit. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: move prefixcmp to utilsDavid Sterba2016-01-14
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: receive: don't leak open find handleDavid Sterba2016-01-14
| | | | | Resolves-coverity-id: 1348121 Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: also check filesystem type in test_issubvolumeDavid Sterba2016-01-14
| | | | | | | | A subvolume is a directory with inode number 256 on a btrfs filesytem. Add the missing check to test_issubvolume for completeness, otherwise we always do that in btrfs_open_dir. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: more verbose errors from test_issubvolumeDavid Sterba2016-01-14
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: let test_issubvolume return the exact errorDavid Sterba2016-01-14
| | | | | | Return any error from stat, minor cleanups. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: use symbolic name for subvolume inode number in test_issubvolumeDavid Sterba2016-01-14
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: handle errors from test_isdirDavid Sterba2016-01-14
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: let test_isdir return the exact errorDavid Sterba2016-01-13
| | | | | | | Return any error from stat, normalize the return value in case the path is a directory. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: debug-tree: teach -t option about the chunk and root treesDavid Sterba2016-01-13
| | | | | | | | 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>
* btrfs-progs: subvol show: handle options by getoptDavid Sterba2016-01-13
| | | | | | | | | 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>
* btrfs-progs: fi usage: support mixed blockgroupsDavid Sterba2016-01-13
| | | | | | | | 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>
* btrfs-progs: docs: enhance btrfs-filesystem manual pageDavid Sterba2016-01-12
| | | | | | Wording, formatting, explanations, examples. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add missing prerequisitesDavid Sterba2016-01-12
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-porgs: fi usage: rename variable to avoid shadowingDavid Sterba2016-01-12
| | | | | | Reported by gcc -Wshadow . Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-porgs: check: rename variable to avoid shadowingDavid Sterba2016-01-12
| | | | | | Reported by gcc -Wshadow . Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-porgs: qgroup: rename variable to avoid shadowingDavid Sterba2016-01-12
| | | | | | Reported by gcc -Wshadow . Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: add function attributes for the printf-likeDavid Sterba2016-01-12
| | | | | | Reported by gcc -Wsuggest-attribute=format . Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: fix builds with extra warnings, W=1David Sterba2016-01-12
| | | | | | Wrong variable name used in the main makefile. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: check for negative return value from ioctlDavid Sterba2016-01-12
| | | | | | | 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>
* btrfs-progs: remove unnecessary errno temp variablesDavid Sterba2016-01-12
| | | | | | | We can read errno directly if it's not clobbered by any intermediate calls. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: free-space-tree: minor message adjustmentsDavid Sterba2016-01-12
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfsprogs: corrupt-blocks: include limits.h to define PATH_MAXKhem Raj2016-01-12
| | | | | | | | | | | | | 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>
* btrfs-progs: docs: document new mount option fragmentDavid Sterba2016-01-12
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: docs: sort mount options alphabeticallyDavid Sterba2016-01-12
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: check the free space tree in btrfsckOmar Sandoval2016-01-12
| | | | | | | | | | 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>
* btrfs-progs: add basic awareness of the free space treeOmar Sandoval2016-01-12
| | | | | | | | | | | 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>
* btrfs-progs: docs: rename btrfs-mount to btrfs-man5David Sterba2016-01-12
| | | | | | The page does will not contain only mount options but other stuff. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: docs, btrfs-mount: enhance file attributes sectionDavid Sterba2016-01-12
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: cleanup, move usage help strings closer to the command callbacksDavid Sterba2016-01-12
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: cmd property: use correct usage stringsDavid Sterba2016-01-12
| | | | Signed-off-by: David Sterba <dsterba@suse.com>