From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Proxmox Backup Server development discussion
<pbs-devel@lists.proxmox.com>
Subject: [pbs-devel] applied: [PATCH proxmox-backup 2/2] fix #2904: zpool status: parse vdevs with state but without statistics
Date: Fri, 14 Aug 2020 13:01:03 +0200 [thread overview]
Message-ID: <1597402850.pbo4o0lxjt.astroid@nora.none> (raw)
In-Reply-To: <20200730080216.19894-2-d.csapak@proxmox.com>
On July 30, 2020 10:02 am, Dominik Csapak wrote:
> some vdevs (e.g. spares) have a 'state' (e.g. AVAIL), but
> not statistics like READ/WRITE/etc.
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> src/tools/disks/zpool_status.rs | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/src/tools/disks/zpool_status.rs b/src/tools/disks/zpool_status.rs
> index 8971d905..41b8a39c 100644
> --- a/src/tools/disks/zpool_status.rs
> +++ b/src/tools/disks/zpool_status.rs
> @@ -67,6 +67,19 @@ fn parse_zpool_status_vdev(i: &str) -> IResult<&str, ZFSPoolVDevState> {
> }
>
> let (i, state) = preceded(multispace1, notspace1)(i)?;
> + if let Ok((n, _)) = preceded(multispace0, line_ending)(i) { // spares
> + let vdev = ZFSPoolVDevState {
> + name: vdev_name.to_string(),
> + lvl: indent_level,
> + state: Some(state.to_string()),
> + read: None,
> + write: None,
> + cksum: None,
> + msg: None,
> + };
> + return Ok((n, vdev));
> + }
> +
> let (i, read) = preceded(multispace1, parse_u64)(i)?;
> let (i, write) = preceded(multispace1, parse_u64)(i)?;
> let (i, cksum) = preceded(multispace1, parse_u64)(i)?;
> --
> 2.20.1
>
>
>
> _______________________________________________
> pbs-devel mailing list
> pbs-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
>
>
>
prev parent reply other threads:[~2020-08-14 11:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-30 8:02 [pbs-devel] [PATCH proxmox-backup 1/2] zfs status: add test with spares Dominik Csapak
2020-07-30 8:02 ` [pbs-devel] [PATCH proxmox-backup 2/2] fix #2904: zpool status: parse vdevs with state but without statistics Dominik Csapak
2020-08-14 11:01 ` Fabian Grünbichler [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1597402850.pbo4o0lxjt.astroid@nora.none \
--to=f.gruenbichler@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox