There were a few problems that were breaking sparse checking:
- We were defining CHECK_ENDIAN late in the environment, after
linux/fs.h has been included which defines __force and __bitwise in
confusing ways that conflict with ours. Define it up with __CHECKER__
so that linux/fs.h and our copy are acting on the same input.
- We had manually set a few of gcc's internal defines to give to sparse.
It's easier to just ask gcc for all the defines it sets and hand those
to sparse.
- We weren't passing the same *FLAGS to sparse as we were to CC.
- glibc has so many errors with FORTIFY turned on that sparse gives up
and doesn't show us any errors from our code. It's a questionable
hack to always turn on FORTIFY ourselves, so we'll just not do that
when building with sparse.
And add a nice '[SP]' quiet output line for sparse checks.
Signed-off-by: Zach Brown <zab@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Some files don't compile because of insufficient prerequisite.
$ make btrfs
...
[CC] btrfs.o
btrfs.c:24:21: fatal error: version.h: No such file or directory
#include "version.h"
^
compilation terminated.
make: *** [btrfs.o] Error 1
Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
This tool draws per-chunk pngs representing the allocation map. A black
or colored dot means the block is allocated.
The output is written to a subdirectory, together with an index.html to be
viewed in a browser.
There are options to control whether color should be used and which block
group types should be printed.
To build, you need to have libpng and libgd installed. It is not part of
the 'all' target, so please build it explicitely with make btrfs-fragments.
A (rather untypical) example can be seen at
http://sensille.com/fragments
Please regard this as a first scratch version and feel free to improve it :)
Signed-off-by: Arne Jansen <sensille@gmx.net>
With the commit 002d021c (committed October 2011)
btrfsctl, btrfs-vol, btrfs-show were declared deprecated.
The last patches related to these commands are dated December 2010.
These tools are replaced by the "btrfs" tool in all the
functionality.
This commit removes all the related code.
Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it>
Signed-off-by: David Sterba <dsterba@suse.cz>
Sometimes, when you least expect it, a static binary is what you need to
rescue your data... Or just get a good enough handle on things to make
it work again ;)
"make static" is a gift to you, dear user with filesystem problems!
Anyway, on a more serious note, changed the cflags and ldflags so that
we create a smaller binary, 1.1MB stripped on my 64 bit system
(2.7MB with debug data)
Signed-off-by: Ian Kumlien <pomac@demius.net>