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:
parent
c98155f07a
commit
d490933d14
|
@ -101,6 +101,7 @@
|
||||||
#include "mkfs/common.h"
|
#include "mkfs/common.h"
|
||||||
#include "convert/common.h"
|
#include "convert/common.h"
|
||||||
#include "convert/source-fs.h"
|
#include "convert/source-fs.h"
|
||||||
|
#include "kernel-lib/crc32c.h"
|
||||||
#include "fsfeatures.h"
|
#include "fsfeatures.h"
|
||||||
|
|
||||||
extern const struct btrfs_convert_operations ext2_convert_ops;
|
extern const struct btrfs_convert_operations ext2_convert_ops;
|
||||||
|
@ -1727,6 +1728,8 @@ int main(int argc, char *argv[])
|
||||||
char fslabel[BTRFS_LABEL_SIZE];
|
char fslabel[BTRFS_LABEL_SIZE];
|
||||||
u64 features = BTRFS_MKFS_DEFAULT_FEATURES;
|
u64 features = BTRFS_MKFS_DEFAULT_FEATURES;
|
||||||
|
|
||||||
|
crc32c_optimization_init();
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
enum { GETOPT_VAL_NO_PROGRESS = 256 };
|
enum { GETOPT_VAL_NO_PROGRESS = 256 };
|
||||||
static const struct option long_options[] = {
|
static const struct option long_options[] = {
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
#include "rbtree-utils.h"
|
#include "rbtree-utils.h"
|
||||||
#include "mkfs/common.h"
|
#include "mkfs/common.h"
|
||||||
#include "mkfs/rootdir.h"
|
#include "mkfs/rootdir.h"
|
||||||
|
#include "kernel-lib/crc32c.h"
|
||||||
#include "fsfeatures.h"
|
#include "fsfeatures.h"
|
||||||
|
|
||||||
static int verbose = 1;
|
static int verbose = 1;
|
||||||
|
@ -811,6 +812,8 @@ int main(int argc, char **argv)
|
||||||
struct mkfs_allocation allocation = { 0 };
|
struct mkfs_allocation allocation = { 0 };
|
||||||
struct btrfs_mkfs_config mkfs_cfg;
|
struct btrfs_mkfs_config mkfs_cfg;
|
||||||
|
|
||||||
|
crc32c_optimization_init();
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
int c;
|
int c;
|
||||||
enum { GETOPT_VAL_SHRINK = 257 };
|
enum { GETOPT_VAL_SHRINK = 257 };
|
||||||
|
|
Loading…
Reference in New Issue