skiselkov commented on this pull request.
> @@ -3983,6 +4060,59 @@ print_scan_status(pool_scan_stat_t *ps)
}
static void
+print_trim_status(uint64_t trim_prog, uint64_t total_size, uint64_t rate,
+ uint64_t start_time_u64, uint64_t end_time_u64)
+{
+ 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) /
Agree, I'll change it.
--
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_r117677356
------------------------------------------
openzfs-developer
Archives: https://openzfs.topicbox.com/groups/developer/
Powered by Topicbox: https://topicbox.com