Lost in the conversion and breaks the build unless set explicitly.
Reported-by: WorMzy Tykashi <wormzy.tykashi@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Add btrfs_get_extent() and btrfs_punch_hole() for btrfs-progs.
Btrfs_get_extent() will act much like kernel one, return the first
extent that covers the given range.
The difference will be that progs btrfs_get_extent() can't handle
no-holes feature, which means caller should handle it carefully.
Btrfs_punch_hole() will punch a hole in given range of given inode,
however it differs from kernel one since it won't zero any page or drop
any extents if there is any extent in the hole range.
These functions are mainly used for later I_ERR_FILE_EXTENT_DISCOUNT
repair function.
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
- add rule to generated version.h when any relevant stuff changed
- add rule to clean generated files on "make clean-all"
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
- define basic default CFLAGS in configure.ac, because:
* autoconf default is -g -O2, but btrfs uses -g -O1
* it's better to follow autoconf; standard way to modify
CFLAGS is to call: CFLAGS="foo bar" ./configure
- move all flags to one place in Makefile.in
- don't use AM_CFLAGS, the CFLAGS and STATIC_CFLAGS are enough
- don't mix objects and flags in $LIBS, it's more readable to
add $(libs) to make rules
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
The original homemade solution is unnecessary, autotools provides better
infrastructure to generate files.
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
- the header file is generated by ./configure, the standard autotools
way is to use -include config.h on compiler command line rather than
include the file directly from code
- remove _GNU_SOURCE from code, the macros is already defined in config.h
by AC_USE_SYSTEM_EXTENSIONS autoconf macro
Signed-off-by: Karel Zak <kzak@redhat.com>
[_GNU_SOURCE changes already done]
Signed-off-by: David Sterba <dsterba@suse.cz>
- 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>