]> granicus.if.org Git - zfs/commitdiff
Fletcher4: Init in libzfs_init()
authorGvozden Neskovic <neskovic@gmail.com>
Sun, 25 Sep 2016 08:35:12 +0000 (10:35 +0200)
committerGvozden Neskovic <neskovic@gmail.com>
Mon, 3 Oct 2016 19:51:34 +0000 (21:51 +0200)
All users of fletcher4 methods must call `fletcher_4_init()/_fini()`
There's no benchmarking overhead when called from user-space.

Signed-off-by: Gvozden Neskovic <neskovic@gmail.com>
lib/libzfs/libzfs_util.c

index 8fec78283879afb5514c578ba158e29b0104ba31..2f29027c951846497c503858a00c959003e85429 100755 (executable)
@@ -51,6 +51,7 @@
 #include "libzfs_impl.h"
 #include "zfs_prop.h"
 #include "zfeature_common.h"
+#include <zfs_fletcher.h>
 
 int
 libzfs_errno(libzfs_handle_t *hdl)
@@ -876,6 +877,7 @@ libzfs_init(void)
        zpool_prop_init();
        zpool_feature_init();
        libzfs_mnttab_init(hdl);
+       fletcher_4_init();
 
        return (hdl);
 }
@@ -898,6 +900,7 @@ libzfs_fini(libzfs_handle_t *hdl)
        namespace_clear(hdl);
        libzfs_mnttab_fini(hdl);
        libzfs_core_fini();
+       fletcher_4_fini();
        free(hdl);
 }