- Add a function to release resources allocated for libhammer_pfs_get_snapshots. - Release snapshot resources when releasing the fsinfo struct.
Trivial changes: - Function renaming to actually match what they are describing. - Clearer variable naming. Additions: - Structures to hold snapshot data. - Functions to retrieve snapshots from metadata for PFSes. - A file for version compatibility functions. - A function to return the canonical access path of a PFS which is suitable for opening. - Wrappers to operate per PFS snapshot list. Changes & fixes: - Use the new functions to gather all snaps of a PFS. - Adapt hammer program for the changes. - Check before free'ing in libhammer_free_fsinfo() - Display the number of snapshots for unmounted PFSes. Still missing: - Manpages changes.
- 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.
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 4f09fea replaces it with libhammer version.
This patch fixes minor memory leaks of libhammer. hunk1: This isn't necessary since it never gets here. _libhammer_malloc() exit(1) if it failed to calloc(). hunk2: Add missing close(fd). hunk3: Add missing free(mntbuf).
* Add transaction information to libhammer_pfsinfo. * Add reserved field for future expansion. Note that the TID numbers gathered can become outdated for slave PFSes that are the target of mirroring operations.
* With this change 'info' directive no longer issues 65535 ioctl calls to retrieve the information of all PFSes.
* Instead of using libhammer.h from /usr/include, use the one that's in the source directory to build the library itself.