summaryrefslogtreecommitdiff
path: root/Makefile.in
Commit message (Collapse)AuthorAge
* btrfs-progs: test: fix static build of library-testDavid Sterba2016-11-30
| | | | | | | The static variant of the test was broken, but not really used anyway. Use the right compilation and linking flags. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add correct rpath to library-testDavid Sterba2016-11-30
| | | | | | | | Our library-test dynamically linked binary was not using the built libbtrfs. To fix that, use -rpath. Reported-by: Mike Gilbert <floppymaster@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: link against local librariesDavid Sterba2016-11-24
| | | | | | | | If there's a system provided libbtrfs.0, it will be used for the library-test build and could miss linker errors, as reported. Reported-by: Mike Gilbert <floppymaster@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: test: extend library-test coverageDavid Sterba2016-11-24
| | | | | | | Add test for linkage error of lookup_path_rootid. The built binary has to be run to catch also run-time errors. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: deprecate standalone btrfs-show-superDavid Sterba2016-11-24
| | | | | | The functionality is now provided by 'inspect dump-super'. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: deprecate standalone btrfs-calc-sizeDavid Sterba2016-11-24
| | | | | | The functionality is now provided by 'inspect tree-stats'. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: move btrfs-image sources to own directoryDavid Sterba2016-11-24
| | | | | | | There are no pending patches to btrfs-image, this looks like a good time to move it. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: test: fix error of test target of MakefileTsutomu Itoh2016-11-23
| | | | | | | Add test-cli to test target of Makefile. Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: enhance TEST_LOG featuresDavid Sterba2016-11-23
| | | | | | | Add new keyword to dump the log file after any test fails. Can be useful for remote analysis of test failures. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: remove send-test toolQu Wenruo2016-11-09
| | | | | | | | Since new "receive --dump" has better output and structure, it's time to remove old and function-weak send-test tool. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: rename raid6.c to raid56.cQu Wenruo2016-10-24
| | | | | | | | This allows us to put raid5 codes into that file other than creating a new raid5.c. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: test: add default ioctl-test buildDavid Sterba2016-10-24
| | | | | | | | Add another target that'll use default compiler options, eg. if we don't know the bitness of the architecture or gcc does not recognize the -m32/-m64 options. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: make the ioctl-test actually usefulDavid Sterba2016-10-24
| | | | | | | | Enhance the test to verify ioctl uniqueness, compare the defined values against the hardcoded expected values, and take care of the 32bit/64bit compatibility workarounds. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: ioctl: make build-time structure size checks optionalDavid Sterba2016-10-10
| | | | | | | | | Temporarily make the build checks optional. The structure sizes could change on arches due to alignment requirements or padding inserted into the structures. We need more extensive tests to make sure we'd not break ioctls. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: add explicit option separator to rm commandsDavid Sterba2016-10-10
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: add alias for check testsDavid Sterba2016-10-05
| | | | | | $ make test-check" Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: move 3rd party kernel library modules to own directoryDavid Sterba2016-10-03
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: add basic support for subdirectory buildDavid Sterba2016-10-03
| | | | | | Add explicit target file names and set the top source directory. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: add UBSAN to debugging featuresDavid Sterba2016-09-21
| | | | | | usage: make D=ubsan Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: add ASAN to debugging featuresDavid Sterba2016-09-05
| | | | | | usage: make D=asan Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: extend convert optionsDavid Sterba2016-08-24
| | | | | | | | Add --with-convert[=VALUE] option to configure. Accepts ext2, auto, yes, or no, but will be extended to more in the future. The configure-time defines are not used in the code, ext2 is built-in unconditionally. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: add per-tool cflags variableDavid Sterba2016-08-24
| | | | | | | The standalone tools are built from pattern rules, add support for per-tool cflaags, like btrfs_something_clfags. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: add more debugging featuresDavid Sterba2016-08-22
| | | | | | | | Add options to show file and line or stack trace for error/warning messages that use the common helpers. Possible to let any error stop execution for ease of analysis and debugging. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: makefile: add target for testing installationDavid Sterba2016-06-01
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: makefile: add clean-all to the usageAnand Jain2016-06-01
| | | | | Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: add support for debugging buildsDavid Sterba2016-06-01
| | | | | | | | | | | | Add an easy way to build a debugging version, without optimizations and with debugging info by default. Any overrides can be done via DEBUG_CFLAGS that are added on top of the defaults. Can be combined with V, C or W options. Usage: $ make D=1 Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: udev: add rules for dm devicesJeff Mahoney2016-06-01
| | | | | | | | | | | | | | | | | | | | | Systemd's btrfs rule runs btrfs dev ready on each device as it's discovered. The btrfs command is executed as a builtin command via an IMPORT{builtin} rule, which means it gets executed at rule evaluation time, not rule execution time. That means that the device mapper links haven't been setup yet and the only nodes that can be depended upon are /dev/dm-#. That we see /dev/mapper/name names in /proc/mounts is only because we replace the device name we have cached with the one passed in via mount. If we have a multi-device file system and the primary device is removed, the remaining devices will show /dev/dm-#. In addition, if the udev rule is executed again by someone generating a change event (e.g. partprobe), the names are also replaced by the /dev/dm-# names. This patch adds a new rule that adds a run rule that calls btrfs dev ready again using the device mapper links once they're created. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: copy btrfs-calc-size to inspect-internal tree-statsAlexander Fougner2016-05-02
| | | | | Signed-off-by: Alexander Fougner <fougner89@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add support for command line coverage testsDavid Sterba2016-05-02
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: fix build of standalone utilities after cleanDavid Sterba2016-03-30
| | | | | | | | | | | | | | $ make clean $ make btrfs-debug-tree will fail because the dependency from $(btrfs_debug_tree_objects) is missing. The variable standalone_deps magically collects all the deps and will build them in advance. The simple fix to use the existing substitution based on $@ does not work for pattern rules, as Noah found out. Reported-by: Noah Massey <noah.massey@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: fix static standalone utilitiesNoah Massey2016-03-30
| | | | | | | | | | commit b5e7979 "btrfs-progs: build: extend per-binary objects" allows the standalone utilities to link against object files shared with the main binary. However, the btrfs-*.static targets need to be adjusted to build against the static versions of the common files. Signed-off-by: Noah Massey <noah.massey@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: filesystem: add 'du' commandMark Fasheh2016-03-14
| | | | | | | | | | | | | | | | | 'btrfs du' differs from regular du in that it will work to resolve which blocks are shared between files in its list. This gives the user a more accurate bytecount from which they can make decisions regarding management of their file space. We still print a total number of bytes counted (like regular du), but also print the number of bytes which were found to have been shared amongst the file set provided. From there it becomes trivial to calculate how much space is exclusively owned. Signed-off-by: Mark Fasheh <mfasheh@suse.de> [ rename files to reflect the filesystem command group, add GPL v2 file headers ] Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: extend per-binary objectsDavid Sterba2016-03-14
| | | | | | | | | The standalone utilities could share object files with the main utility, add a way to specify additional object files in a similar way to the extra libs. The variable name must match the binary plus _objects suffix and s/-/_/ . Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: introduce inspect-internal dump-superAlexander Fougner2016-03-14
| | | | | | | | The long-term plan is to merge the features of standalone tools into the btrfs binary, reducing the number of shipped binaries. Signed-off-by: Alexander Fougner <fougner89@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: copy functionality of btrfs-debug-tree to inspect-internal ↵Alexander Fougner2016-03-14
| | | | | | | | | | subcommand The long-term plan is to merge the features of standalone tools into the btrfs binary, reducing the number of shipped binaries. Signed-off-by: Alexander Fougner <fougner89@gmail.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: 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: 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: 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: 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 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: get sparse checking workingByongho Lee2016-01-12
| | | | | | | | | | | | | | | | | | | | | | | | | | When I run sparse checking it gives the following error: $ make C=1 V=1 gcc -MM -MG -MF cmds-fi-usage.o.d -MT cmds-fi-usage.o -MT \ cmds-fi-usage.static.o -MT cmds-fi-usage.o.d -g -O1 -Wall \ -D_FORTIFY_SOURCE=2 -include config.h -DBTRFS_FLAT_INCLUDES \ -D_XOPEN_SOURCE=700 -fno-strict-aliasing -fPIC cmds-fi-usage.c [SP] ctree.c sparse -g -O1 -Wall -D_FORTIFY_SOURCE=2 -include config.h \ -DBTRFS_FLAT_INCLUDES -D_XOPEN_SOURCE=700 -fno-strict-aliasing -fPIC \ -include -D__CHECKER__ -D__CHECK_ENDIAN__ -Wbitwise -Wuninitialized \ -Wshadow -Wundef -U_FORTIFY_SOURCE ctree.c builtin:1:15: error: unable to open '-D__CHECKER__' Makefile:177: recipe for target 'ctree.o' failed make: *** [ctree.o] Error 1 It means '$(check_defs)' is passed to sparse as NULL and looks '$(check_defs)'should be assigned before assigning '$(CHECKER_FLAGS)'. BTW, I'm not familiar with make tool so there could be some my misunderstanding and better solution. Signed-off-by: Byongho Lee <bhlee.kernel@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add test driver for fuzzed imagesDavid Sterba2015-11-02
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add mkfs testsDavid Sterba2015-11-02
| | | | | | Mkfs deserves it's own. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: make support for static checkers more genericDavid Sterba2015-10-21
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: a bit of makefile documentationDavid Sterba2015-10-21
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: allow to build with various compiler warningsDavid Sterba2015-10-21
| | | | | | | | | | Copied from linux kernel, 'make W=1' will build with various additional warnings turned on. There are 3 levels, combinations are possible. The build is quite noisy, not all warnings need to be fixed. A specific warning can be turned on by 'make EXTRA_CFLAGS=-Wsomething'. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: makefile: drop u option from ar invocationArnd Hannemann2015-09-08
| | | | | | | | | | | | | | | | | | | In newer distros (ubuntu 15.10, fedora rawhide) the binutils ar uses the new D flag per default to build deterministic binaries. Without this patch the following warning is issued, when building btrfs-progs: [AR] libbtrfs.a /usr/bin/ar: `u' modifier ignored since `D' is the default (see `U') For libtrfs.a performance benefit of the u option can be neglected, so drop the u option and silence the warning. In the future one might want to explicitly add the D option anyway. Signed-off-by: Arnd Hannemann <arnd@arndnet.de> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: makefile: add support for additional build flagsDavid Sterba2015-09-01
| | | | | | | Allow fine tuned build options via EXTRA_CFLAGS and EXTRA_LDFLAGS variables. Useful for additional debugging flags or warnings etc. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: do not install static binaries over non-staticDavid Sterba2015-08-31
| | | | | | | The builds should be able to coexist, so we don't want to forcibly overwite the standard version. Signed-off-by: David Sterba <dsterba@suse.com>