From: Matthew Dillon Date: Tue, 22 Aug 2017 04:02:16 +0000 (-0700) Subject: hammer2 - Cleanup manual page, add help, remove bulkfree-async X-Git-Tag: v5.1.0~214 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/b83c55fca083a61a570071ee5f35f8da0752110d hammer2 - Cleanup manual page, add help, remove bulkfree-async * Remove bulkfree-async. Just stick with the synchronous bulkfree for now. --- diff --git a/sbin/hammer2/cmd_bulkfree.c b/sbin/hammer2/cmd_bulkfree.c index 657ae49fd3..cdd3614a40 100644 --- a/sbin/hammer2/cmd_bulkfree.c +++ b/sbin/hammer2/cmd_bulkfree.c @@ -56,6 +56,7 @@ cmd_bulkfree(const char *sel_path) return ecode; } +#if 0 int cmd_bulkfree_async(const char *sel_path) { @@ -77,3 +78,4 @@ cmd_bulkfree_async(const char *sel_path) ecode = 0; return ecode; } +#endif diff --git a/sbin/hammer2/hammer2.8 b/sbin/hammer2/hammer2.8 index 86acf8a24e..e17057d132 100644 --- a/sbin/hammer2/hammer2.8 +++ b/sbin/hammer2/hammer2.8 @@ -290,7 +290,7 @@ only compresses to 40K will not yield any storage improvement. .It Cm setcheck Ar check Op path... Set the check code as specified for any newly created elements at or under the path if not overridden by deeper elements. -Available codes are default, disabled, crc32, crc64, or sha192. +Available codes are default, disabled, crc32, xxhash64, or sha192. .\" ==== clrcheck ==== .It Cm clrcheck Op path... Clear the check code override for the specified paths. @@ -299,9 +299,9 @@ Overrides may still be present in deeper elements. .It Cm setcrc32 Op path... Set the check code to the ISCSI 32-bit CRC for any newly created elements at or under the path if not overridden by deeper elements. -.\" ==== setcrc64 ==== -.It Cm setcrc64 Op path... -Set the check code to CRC64 (not yet specified). +.\" ==== setxxhash64 ==== +.It Cm setxxhash64 Op path... +Set the check code to XXHASH64, a fast 64-bit hash .\" ==== setsha192 ==== .It Cm setsha192 Op path... Set the check code to SHA192 for any newly created elements at or under @@ -311,6 +311,7 @@ the path if not overridden by deeper elements. Run a bulkfree pass on a HAMMER2 mount. You can specify any PFS for the mount, the bulkfree pass is run on the entire partition. +Note that it takes two passes to actually free space. .El .Sh SETTING UP /etc/hammer2 The 'rsainit' directive will create the diff --git a/sbin/hammer2/hammer2.h b/sbin/hammer2/hammer2.h index 4405fadd86..3d05b57e6d 100644 --- a/sbin/hammer2/hammer2.h +++ b/sbin/hammer2/hammer2.h @@ -150,7 +150,9 @@ int cmd_rsadec(const char **keys, int nkeys); int cmd_setcomp(const char *comp_str, char **paths); int cmd_setcheck(const char *comp_str, char **paths); int cmd_bulkfree(const char *dir_path); +#if 0 int cmd_bulkfree_async(const char *dir_path); +#endif /* * Misc functions diff --git a/sbin/hammer2/main.c b/sbin/hammer2/main.c index ad6b1b6277..8ee5030bb5 100644 --- a/sbin/hammer2/main.c +++ b/sbin/hammer2/main.c @@ -402,8 +402,8 @@ main(int ac, char **av) ecode = cmd_setcheck("none", &av[1]); } else if (strcmp(av[0], "setcrc32") == 0) { ecode = cmd_setcheck("crc32", &av[1]); - } else if (strcmp(av[0], "setcrc64") == 0) { - ecode = cmd_setcheck("crc64", &av[1]); + } else if (strcmp(av[0], "setxxhash64") == 0) { + ecode = cmd_setcheck("xxhash64", &av[1]); } else if (strcmp(av[0], "setsha192") == 0) { ecode = cmd_setcheck("sha192", &av[1]); } else if (strcmp(av[0], "printinode") == 0) { @@ -422,6 +422,7 @@ main(int ac, char **av) } else { ecode = cmd_bulkfree(av[1]); } +#if 0 } else if (strcmp(av[0], "bulkfree-async") == 0) { if (ac != 2) { fprintf(stderr, @@ -430,6 +431,7 @@ main(int ac, char **av) } else { ecode = cmd_bulkfree_async(av[1]); } +#endif } else { fprintf(stderr, "Unrecognized command: %s\n", av[0]); usage(1); @@ -505,19 +507,21 @@ usage(int code) " setcomp comp[:level] path... " "Set comp algo {none, autozero, lz4, zlib} & level\n" " setcheck check path... " - "Set check algo {none, crc32, crc64, sha192}\n" + "Set check algo {none, crc32, xxhash64, sha192}\n" " clrcheck path... " "Clear check code override\n" " setcrc32 path... " "Set check algo to crc32\n" - " setcrc64 path... " - "Set check algo to crc64\n" + " setxxhash64 path... " + "Set check algo to xxhash64\n" " setsha192 path... " "Set check algo to sha192\n" " bulkfree path... " "Run bulkfree pass\n" +#if 0 " bulkfree-async path... " "Run bulkfree pass asynchronously\n" +#endif ); exit(code); }