btrfs-progs: Enable crc32c optimization probe for convert and mkfs

Although moderm hardware is fast enough and crc32c calculation is not a
hotspot, doing such optimization won't hurt anyway.

Issue: #175
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Qu Wenruo 2019-05-27 12:46:27 +08:00 committed by David Sterba
parent c98155f07a
commit d490933d14
2 changed files with 6 additions and 0 deletions

View File

@ -101,6 +101,7 @@
#include "mkfs/common.h"
#include "convert/common.h"
#include "convert/source-fs.h"
#include "kernel-lib/crc32c.h"
#include "fsfeatures.h"
extern const struct btrfs_convert_operations ext2_convert_ops;
@ -1727,6 +1728,8 @@ int main(int argc, char *argv[])
char fslabel[BTRFS_LABEL_SIZE];
u64 features = BTRFS_MKFS_DEFAULT_FEATURES;
crc32c_optimization_init();
while(1) {
enum { GETOPT_VAL_NO_PROGRESS = 256 };
static const struct option long_options[] = {

View File

@ -42,6 +42,7 @@
#include "rbtree-utils.h"
#include "mkfs/common.h"
#include "mkfs/rootdir.h"
#include "kernel-lib/crc32c.h"
#include "fsfeatures.h"
static int verbose = 1;
@ -811,6 +812,8 @@ int main(int argc, char **argv)
struct mkfs_allocation allocation = { 0 };
struct btrfs_mkfs_config mkfs_cfg;
crc32c_optimization_init();
while(1) {
int c;
enum { GETOPT_VAL_SHRINK = 257 };