sbin/hammer: Partly bring back removed braces from 52e2f1b5 based on comments from dillon@. (dillon) three types, yah. (1) multi-line condition in if(), (2) if TRUE or FALSE body spans more than one line, put braces around both (dillon) (including if a comment is part of the body)
sbin/hammer: Cleanup blocks with a single statement This commit basically does the same as what Linux kernel's coding style mentions for braces, which is basically the same with BSDs. https://github.com/torvalds/linux/blob/master/Documentation/process/coding-style.rst#3-placing-braces-and-spaces No diff in sbin/hammer/hammer binary when assert(3) is disabled.
hammer - HAMMER Version 7 * Add support for version 7 which changes the CRC mechanic from the old slow CRC code to the faster ISCSI CRC code. We don't use the CRC instruction yet but ths base ISCSI CRC from FreeBSD is 6x faster than the CRC code we were using before. * Change newfs_hammer default to version 7 (for master).
sbin/hammer: Partly revert 2c1d3cef in 2010 This is the same as d6c59c72, so read d6c59c72 for details. The code in 2c1d3cef in 2010 was later replaced by libhammer, so what this commit actually does is revert a part of those libhammer commits, but whatever it is, a certain directory being null mounted on somewhere else is beyond the scope of hammer or any other filesystems. This command originally had no such extra info, and that was better. It's also confusing in the sense that it silently changes the output depending on whether it's mounted or not.
sbin/hammer: Don't include libhammer.h unconditionally Though /sbin/hammer links to libhammer, only two commands use it. Move SNAPSHOTS_BASE from cmd_cleanup.c to hammer.h. This macro is defined in both sbin/hammer and libhammer. It apparently doesn't need to ask an external library for snapshot location. # grep libhammer sbin/hammer sbin/newfs_hammer -rIl sbin/hammer/cmd_info.c sbin/hammer/cmd_snapshot.c sbin/hammer/hammer.h
sbin/hammer: Remove irrelevant if(S_ISLNK()) case - Remove if(S_ISLNK()) case for hammer snap since it never matches. - Also note it shouldn't be matching S_ISLNK() in the first place. If it does match hammer snap|snaplo|snapq commands will remove a symlink to the existing snapshot and relink to the new snapshot which results losing a reference to the old snapshot (although the old snapshot is still accessible as HAMMER's snapshot is just a pointer to the filesystem as of certain tid that is resolved when accessed).
libhammer - Change the way PFS mounts are detected - libhammer_find_pfs_mount() now takes a single argument which is the unique_uuid used for the search. - This solves a problem when passing the path of a PFS to commands like 'hammer info' which mistakenly took the argument as the PFS#0. - Adjust manpage to reflect current status.
lib/libhammer: cleanups This patch has some minor cleanups of libhammer. hunk1: Remove parentheses hunk2: Remove parentheses hunk3: Remove forward declaration of obsolete function. find_pfs_mount() was re-implemented as a part of libhammer and commit 4f09feab replaces it with libhammer version.