From 2382bff10018c9f98706b8a88a10d546ace19e3b Mon Sep 17 00:00:00 2001 From: Ryan Moeller Date: Wed, 18 Aug 2021 21:01:21 +0000 Subject: [PATCH] libzfs_sendrecv: Style pass on dump_filesystems * Add a high level comment. * Eliminate unnecessarily void arg. * Capitalize and punctuate complete sentences in comments. Reviewed-by: Brian Behlendorf Signed-off-by: Ryan Moeller Closes #12967 --- lib/libzfs/libzfs_sendrecv.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/libzfs/libzfs_sendrecv.c b/lib/libzfs/libzfs_sendrecv.c index 751e34a92b4b..f96f1aa9332a 100644 --- a/lib/libzfs/libzfs_sendrecv.c +++ b/lib/libzfs/libzfs_sendrecv.c @@ -1270,10 +1270,12 @@ dump_filesystem(zfs_handle_t *zhp, send_dump_data_t *sdd) return (rv); } +/* + * Send all snapshots for all filesystems in sdd. + */ static int -dump_filesystems(zfs_handle_t *rzhp, void *arg) +dump_filesystems(zfs_handle_t *rzhp, send_dump_data_t *sdd) { - send_dump_data_t *sdd = arg; nvpair_t *fspair; boolean_t needagain, progress; @@ -1326,7 +1328,7 @@ dump_filesystems(zfs_handle_t *rzhp, void *arg) if (parent_guid != 0) { parent_nv = fsavl_find(sdd->fsavl, parent_guid, NULL); if (!nvlist_exists(parent_nv, "sent")) { - /* parent has not been sent; skip this one */ + /* Parent has not been sent; skip this one. */ needagain = B_TRUE; continue; } @@ -1338,7 +1340,7 @@ dump_filesystems(zfs_handle_t *rzhp, void *arg) if (origin_nv != NULL && !nvlist_exists(origin_nv, "sent")) { /* - * origin has not been sent yet; + * Origin has not been sent yet; * skip this clone. */ needagain = B_TRUE; @@ -1361,7 +1363,7 @@ dump_filesystems(zfs_handle_t *rzhp, void *arg) goto again; } - /* clean out the sent flags in case we reuse this fss */ + /* Clean out the sent flags in case we reuse this fss. */ for (fspair = nvlist_next_nvpair(sdd->fss, NULL); fspair; fspair = nvlist_next_nvpair(sdd->fss, fspair)) { nvlist_t *fslist;