Commit bc2d4ccc46 "btrfs-progs:
kerncompat: disconnect assert and warning messages" forgot to add the
print_trace call to assert_trace.
Signed-off-by: David Sterba <dsterba@suse.com>
Use one flag field instead of several variables. The change cascades
down to the callchain and modifies several functions.
Signed-off-by: David Sterba <dsterba@suse.com>
The context is zeroed in convert_open_fs after and overwrites the rbtree
initialization, which accidentally is the same (NULL).
Signed-off-by: David Sterba <dsterba@suse.com>
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>
The convert and image utilities used include, but we specify the headers
by path relative to the toplevel directory for clarity. The compiler
option is not needed.
Signed-off-by: David Sterba <dsterba@suse.com>
The dependencies are duplicated in many targets, but we can use the $^
variable to simplify the command line.
Signed-off-by: David Sterba <dsterba@suse.com>
Reorder target dependencies:
1) target-specific objects
2) common objects
3) library objects
4) static libraries
1-3 are for faster detection of build failures, the specific objects
reflect changes to the source, but otherwise is only a cosmetic change.
The 4 is for correct order during linking, if we'd use the $^ variable.
Signed-off-by: David Sterba <dsterba@suse.com>
Introduce a new macro, BTRFS_SB_OFFSET() to calculate backup superblock
offset, this is handy if one wants to initialize static array at
declaration time.
Suggested-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Large numbers like (1024 * 1024 * 1024) may cost reader/reviewer to
waste one second to convert to 1G.
Introduce kernel include/linux/sizes.h to replace any intermediate
number larger than 4096 (not including 4096) to SZ_*.
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
The regulare mkfs_btrfs does not anything special about convert and just
passes the arguments. Make that two functions.
Signed-off-by: David Sterba <dsterba@suse.com>
Simple test script for the following patch.
btrfs-progs: qgroup: add sync option to 'qgroup show'
Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
The sync call is unlikely to fail so we optimistically turn it to a
warning if that happens so we return inaccurate numbers instead of a
hard exit.
Signed-off-by: David Sterba <dsterba@suse.com>
The value of sort option ('S') is not used for option letter.
Therefore, I'll change the single letter to non-character.
Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
The 'qgroup show' command does not synchronize filesystem.
Therefore, 'qgroup show' may not display the correct value unless
synchronized with 'filesystem sync' command etc.
So add the '--sync' option so that we can choose whether or not
to synchronize when executing the command.
Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>