skiselkov commented on this pull request.


> +     time_t start_time = start_time_u64, end_time = end_time_u64;
+       char *buf;
+
+       assert(trim_prog <= total_size);
+       if (trim_prog != 0 && trim_prog != total_size) {
+               buf = ctime(&start_time);
+               buf[strlen(buf) - 1] = '\0';    /* strip trailing newline */
+               if (rate != 0) {
+                       char rate_str[32];
+                       zfs_nicenum(rate, rate_str, sizeof (rate_str));
+                       (void) printf("  trim: %.02f%%\tstarted: %s\t"
+                           "(rate: %s/s)\n", (((double)trim_prog) /
+                           total_size) * 100, buf, rate_str);
+               } else {
+                       (void) printf("  trim: %.02f%%\tstarted: %s\t"
+                           "(rate: max)\n", (((double)trim_prog) /

While addressing your comment above I came up with exactly the same change here 
:)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/172#discussion_r117677367
------------------------------------------
openzfs-developer
Archives: https://openzfs.topicbox-beta.com/groups/developer/
Powered by Topicbox: https://topicbox-beta.com

Reply via email to