summaryrefslogtreecommitdiff
path: root/Makefile
Commit message (Collapse)AuthorAge
...
* btrfs-progs: build: fix building libbtrfs.so with tsanDavid Sterba2017-09-08
| | | | | | | | | | | | Except libbtrfs.so object, all other tools compile fine. The error is: ld: send-stream.o: relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC Compiling with -fPIC fixes the problem. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: properly pass the LDFLAGS during tsan buildDavid Sterba2017-09-08
| | | | | | | The variable LD_FLAGS does not exist and the flags are not used, we need to use the newly added internal debugging linker flags. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: add internal LDFLAGS for the D= featuresDavid Sterba2017-09-08
| | | | | | | We might want to pass additional linker flags for various sanitization features. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: fix PIE buildDavid Sterba2017-09-08
| | | | | | | Patch from Marcus Meissner <meissner@suse.com>. The CFLAGS are passed to the linker and mix up the compilation and linker flags for PIE support. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: convert: add support for converting reiserfsJeff Mahoney2017-09-08
| | | | | | | | | | | | | This patch adds support to convert reiserfs file systems in-place to btrfs. It will convert extended attribute files to btrfs extended attributes, translate ACLs, coalesce tails that consist of multiple items into one item, and convert tails that are too big into indirect files. This requires that libreiserfscore 3.6.27 be available. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: Specify C standard to gnu90 explicitlyQu Wenruo2017-08-24
| | | | | | | | | | | | | | | | | | Different C compilers have different default language standard. This sometimes causes problem on different system. For distribution like CentOS/RHEL7, its gcc is still 4.8 and will report error for c90 style declaration, while most developers are using newer gcc which will just ignore it. This makes us hard to detect such language standard problem. This patch will specify standard to gnu90 explicitly to avoid such problem. Gnu90 is a good mix of c90 while provide a lot of useful gnu extension, and is supported by all modern gcc and clang. Reported-by: Marco Lorenzo Crociani <marcoc@prismatelecomtesting.com> Signed-off-by: Qu Wenruo <quwenruo.btrfs@gmx.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: do not regenerate kernel-lib/tables.cDavid Sterba2017-08-24
| | | | | | | | | As reported in https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg66765.html cross-compilation does not work very well with current tables.c. We can simpy keep the pergenerated file in the repository and update if needed. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: Enable ThreadSanitizer, using D=tsanAdam Buchbinder2017-07-20
| | | | | | | | Tested with clang-3.9. We have to enable PIE, (https://clang.llvm.org/docs/ThreadSanitizer.html) Signed-off-by: Adam Buchbinder <abuchbinder@google.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: Fix missing internal deps in check and misc testsAdam Buchbinder2017-07-20
| | | | | | | | | Doing a straight 'make test' would fail because some misc and fsck tests require particular tools to already be built. Add dependencies at the Makefile and shell-script level. Signed-off-by: Adam Buchbinder <abuchbinder@google.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: raid56: Allow raid6 to recover 2 data stripesQu Wenruo2017-07-03
| | | | | | | | | | Copied from kernel lib/raid6/recov.c raid6_2data_recov_intx1() function. With the following modification: - Rename to raid6_recov_data2() for shorter name - s/kfree/free/g modification Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: raid56: Introduce tables for RAID6 recoveryQu Wenruo2017-07-03
| | | | | | | | | | | | | | | | | Use kernel RAID6 galois tables for later RAID6 recovery. Galois tables file, kernel-lib/tables.c is generated by user space program, mktable. Galois field tables declaration, in kernel-lib/raid56.h, is completely copied from kernel. The mktables.c is copied from kernel with minor header/macro modification, to ensure the generated tables.c works well in btrfs-progs. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: raid56: Introduce raid56 header for later recovery usageQu Wenruo2017-07-03
| | | | | | | | | | | | | | | Introduce a new header, kernel-lib/raid56.h, for later raid56 works. It contains 2 functions, from original btrfs-progs code: void raid6_gen_syndrome(int disks, size_t bytes, void **ptrs); int raid5_gen_result(int nr_devs, size_t stripe_len, int dest, void **data); Will be expanded later and some part of it(RAID6 recover part) may keep sync with kernel later. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> [ unify gpl header, rename header macro ] Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: fix missing __error symbol in libbtrfs.so.0Sergei Trofimovich2017-03-31
| | | | | | | | | | | | | | | | | | | | | | | | | The easiest way to reproduce the error is to try to build btrfs-progs with $ make LDFLAGS=-Wl,--no-undefined btrfs-list.o: In function `lookup_ino_path': btrfs-list.c:(.text+0x7d2): undefined reference to `__error' Noticed by Denis Descheneaux when snapper tool stopped working after upgrade to btrfs-progs-4.10. As soname didn't change in 4.9 -> 4.10 release I assume it's just an object file omission in library depends and not the API/ABI change of the library error printing. Cc: linux-btrfs@vger.kernel.org Cc: Mike Gilbert <floppym@gentoo.org> Reported-by: Denis Descheneaux Bug: https://bugs.gentoo.org/show_bug.cgi?id=613890 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: Cleanup kernel-shared dir when execute make cleanQu Wenruo2017-03-31
| | | | | | Reported-by: Chris <coderight@gmail.com> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: misc/019, use fssumDavid Sterba2017-03-16
| | | | | | The fssum utility is now ready to use, test still passes. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: fssum, switch from MD5 to SHA256David Sterba2017-03-16
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: fssum, drop unnecessray build definesDavid Sterba2017-03-16
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add fssum utilityDavid Sterba2017-03-16
| | | | | | | | | | Copy from fstests, originally from git://git.kernel.org/pub/scm/linux/kernel/git/arne/far-progs.git Needs libcrypto to link but this check is now missing in configure. Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: library-test: update test to build outside of topdirDavid Sterba2017-03-16
| | | | | | | | | | | | We need to build outside of the topdir so we can use the "btrfs/" prefix for includes and not accidentally include other files. Make magic is simple: - build dependencies inside TOPDIR - build inside temporary directory, link back to TOPDIR - library-test.o not built anymore obviously Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: library: distribute sizes.h, fix buildDavid Sterba2017-03-16
| | | | | | | | | | | | | The patch "btrfs-progs: Introduce kernel sizes to cleanup large intermediate number" (a2203246ae483d09) was taken from kernel but not properly ported so the build breaks because the header linux/sizes.h is not exported. The build tests of library do not cover the case when the macro BTRFS_FLAT_INCLUDES is not defined (ie. an external build). Reported-by: Holger Hoffstätte <holger@applied-asynchrony.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: fix library-test rules and depsDavid Sterba2017-03-08
| | | | | | | The symbol __error was undefined and the rule did not use the dependencies from the rule definiton, like the rest. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: move ulist.[ch] to kernel-sharedDavid Sterba2017-03-08
| | | | | | | The implementation of ulist_* is same for kernel and userspace, without dependencies, so we can keep it separately for code sync. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: move message helpers implementation out of headerDavid Sterba2017-03-08
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: use MAKEOPTS where missingDavid Sterba2017-03-08
| | | | | | $(MAKE) should also use MAKEOPTS. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: drop deprecated utility from test dependenciesDavid Sterba2017-03-08
| | | | | | | Standalone btrfs-debug-tree has been superseded by 'btrfs inspect-internal dump-tree'. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: move mkfs helper implementation out of utilsDavid Sterba2017-03-08
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: build library by defaultDavid Sterba2017-03-08
| | | | | | | Add a convenience rule and build the library by default, not just at the installation phase. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: add rule for building cscope indexDavid Sterba2017-03-08
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: split makefile to generated and stable partsDavid Sterba2017-03-08
| | | | | | | | It's not really necessary to configure and regenerate Makefiles in cases like adding a new source file. The build environment and optional features are not affected by that. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: autoconf: add ./configure scriptKarel Zak2015-01-28
| | | | | | | | | | | - add ./autogen.sh script (necessary after git clean/clone) - add ./configure.ac - copy autotool helper scripts from automake - modify version.sh to be usable from the configure script - rename Makefile to Makefile.in and use basic variables from configure.ac Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: drop feature defines from C files, in favour of CFLAGS definesDimitri John Ledkov2015-01-27
| | | | | | | | | | | | | | | | | | | | | | glibc 2.10+ (5+ years old) enables all the desired features: _XOPEN_SOURCE 700, __XOPEN2K8, POSIX_C_SOURCE, DEFAULT_SOURCE; with a single _GNU_SOURCE define in the makefile alone. For portability to other libc implementations (e.g. dietlibc) _XOPEN_SOURCE=700 is also defined. This also resolves Debian bug report filed by Michael Tautschnig - "Inconsistent use of _XOPEN_SOURCE results in conflicting declarations". Whilst I was not able to reproduce the results, the reported fact is that _XOPEN_SOURCE set to 500 in one set of files (e.g. cmds-filesystem.c) generates/defines different struct stat from other files (cmds-replace.c). This patch thus cleans up all feature defines, and sets them at a consistent level. Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=747969 Signed-off-by: Dimitri John Ledkov <dimitri.j.ledkov@intel.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: tests, adjust alignment of the pretty command nameDavid Sterba2015-01-14
| | | | 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: tests: build prerequisities, btrfs-image and btrfsDavid Sterba2014-12-12
| | | | | | | Build required utilities from the main Makefile and just check in the test scripts. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Add btrfs_unlink() and btrfs_add_link() functions.Qu Wenruo2014-12-10
| | | | | | | | Add btrfs_unlink() and btrfs_add_link() functions in inode.c, for the incoming btrfs_mkdir() and later inode operations functions. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: remove duplicate pthread libs from buildDavid Sterba2014-12-04
| | | | | | | With the task-utils it's in the default LIBS flags now. We want to use -pthread as it also sets flags for the preprocessor. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: convert: use task for progress indication of metadata creationSilvio Fricke2014-12-04
| | | | | Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Add helpers functions to handle the printing of data in tabular ↵Goffredo Baroncelli2014-12-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | format This patch adds some functions to manage the printing of the data in tabular format. The function struct string_table *table_create(int columns, int rows) creates an (empty) table. The functions char *table_printf(struct string_table *tab, int column, int row, char *fmt, ...) char *table_vprintf(struct string_table *tab, int column, int row, char *fmt, va_list ap) populate the table with text. To align the text to the left, the text shall be prefixed with '<', otherwise the text shall be prefixed by a '>'. If the first character is a '=', the the text is replace by a sequence of '=' to fill the column width. The function void table_free(struct string_table *) frees all the data associated to the table. The function void table_dump(struct string_table *tab) prints the table on stdout. Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Enhance the command btrfs filesystem dfGoffredo Baroncelli2014-12-04
| | | | | | | | | | Enhance the command "btrfs filesystem df" to show space usage information for a mount point(s). It shows also an estimation of the space available, on the basis of the current one used. Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it> [code moved under #if 0 instead of deletion] Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: build, update the clean ruleDavid Sterba2014-11-07
| | | | | | Remove duplicate files, add extra progs, add library test binaries. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: build, gather utilities that are not built by defaultDavid Sterba2014-11-07
| | | | | | Add them to build test and to clean rules. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: build, add make target for a build testDavid Sterba2014-11-07
| | | | | | A quick check that everything still builds. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: build, add basic build test for libraryDavid Sterba2014-11-07
| | | | | | Basic test based on snapper code that uses the send stream API. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: fix linking with libbtrfsDavid Sterba2014-11-03
| | | | | | | | | Reported at https://github.com/openSUSE/snapper/issues/128 Commit cdb9e22e292275237c added another rbtree file that defines functions that libbtrfs uses. Signed-off-by: David Sterba <dsterba@suse.cz>
* Btrfs-progs: break out rbtree util functionsJosef Bacik2014-10-14
| | | | | | | | | These were added to deal with duplicated functionality within btrfs-progs, but we specifically copied rbtree.c from the kernel, so move these functions out into their own file. This will make it easier to keep rbtree.c in sync. Thanks, Signed-off-by: Josef Bacik <jbacik@fb.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* Btrfs-progs: pull back backref.c and fix it upJosef Bacik2014-10-14
| | | | | | | | | This patch pulls back backref.c, adds a couple of helpers everywhere that it needs, and cleans up backref.c to fit in btrfs-progs. Thanks, Signed-off-by: Josef Bacik <jbacik@fb.com> [removed free_some_buffers after "do not reclaim extent buffer"] Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: add option to disable backtrace usageGustavo Zacarias2014-10-10
| | | | | | | | | | | | This commit adds the support for a make variable named "DISABLE_BACKTRACE" which allows to disable the support for backtrace() usage on ASSERT(), BUG() and BUG_ON() calls. This is useful because some alternative C libraries like uClibc have optional support for backtrace() which is rarely built when debugging isn't taking place. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: David Sterba <dsterba@suse.cz>
* Btrfs-progs: make BUG*() be more verboseJosef Bacik2014-10-01
| | | | | | | | | | | | Currently these macros just tie to assert(), which gives us line number and such but no backtrace so no actual context. This patch adds support for spitting out a backtrace so we can see how we got to the given assert. Thanks, Signed-off-by: Josef Bacik <jbacik@fb.com> [backtrace_symbols_fd] Signed-off-by: Naohiro Aota <naota@elisp.net> [minor fixups] Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Improve static building and installationThomas Petazzoni2014-09-02
| | | | | | | | | | | | | | | | | | | | | | | | | This commit improves the static-only building of btrfs-progs, and adds support for installing the static only tools: - It now ensures that all programs are built statically, not only a small subset of them, by defining 'progs_static' from the existing 'progs' variable. - It changes the order of libraries in the btrfs-%.static rule so that -lpthread (part of STATIC_LIBS) appears *after* the '$($(subst -,_,$(subst .static,,$@)-libs))' logic, which brings in -lcom_err. This is needed because libcom_err.a uses the semaphore functions, which are available in the pthread library. - Adds the necessary rules to generate the btrfsck.static link and btrfstune.static binary. - Adds an 'install-static' target to install the static binaries. Note that they are renamed to not carry a '.static' suffix. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: David Sterba <dsterba@suse.cz>