Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
osd/scrub: expose scrubbing schedule to operator
Add a 'scrub scheduling info' column to pgs dump. Modify the name and behavior of 'last-scrub-duration'. Signed-off-by: Ronen Friedman <rfriedma@redhat.com> Co-Authored-By: Aishwarya Mathuria <amathuri@redhat.com>
- Loading branch information
Showing
13 changed files
with
319 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- | ||
// vim: ts=8 sw=2 smarttab | ||
#pragma once | ||
/** | ||
* \file fmtlib formatter for utime_t | ||
*/ | ||
#include <fmt/format.h> | ||
#include <fmt/chrono.h> | ||
|
||
#include <string_view> | ||
|
||
#include "include/utime.h" | ||
|
||
template <> | ||
struct fmt::formatter<utime_t> { | ||
constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } | ||
|
||
template <typename FormatContext> | ||
auto format(const utime_t& utime, FormatContext& ctx) | ||
{ | ||
if (utime.sec() < ((time_t)(60 * 60 * 24 * 365 * 10))) { | ||
// raw seconds. this looks like a relative time. | ||
return fmt::format_to(ctx.out(), "{}.{:06}", (long)utime.sec(), | ||
utime.usec()); | ||
} | ||
|
||
// this looks like an absolute time. | ||
// conform to http://en.wikipedia.org/wiki/ISO_8601 | ||
auto asgmt = fmt::gmtime(utime.sec()); | ||
return fmt::format_to(ctx.out(), "{:%FT%T}.{:06}{:%z}", asgmt, utime.usec(), asgmt); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.