From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 3077860CA2 for ; Fri, 14 Aug 2020 13:01:43 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 25F5E20CCC for ; Fri, 14 Aug 2020 13:01:13 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 6434420CC2 for ; Fri, 14 Aug 2020 13:01:12 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 312F6445F9 for ; Fri, 14 Aug 2020 13:01:12 +0200 (CEST) Date: Fri, 14 Aug 2020 13:01:03 +0200 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= To: Proxmox Backup Server development discussion References: <20200730080216.19894-1-d.csapak@proxmox.com> <20200730080216.19894-2-d.csapak@proxmox.com> In-Reply-To: <20200730080216.19894-2-d.csapak@proxmox.com> MIME-Version: 1.0 User-Agent: astroid/0.15.0 (https://github.com/astroidmail/astroid) Message-Id: <1597402850.pbo4o0lxjt.astroid@nora.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.032 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox.com] Subject: [pbs-devel] applied: [PATCH proxmox-backup 2/2] fix #2904: zpool status: parse vdevs with state but without statistics X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2020 11:01:43 -0000 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. >=20 > Signed-off-by: Dominik Csapak > --- > src/tools/disks/zpool_status.rs | 13 +++++++++++++ > 1 file changed, 13 insertions(+) >=20 > diff --git a/src/tools/disks/zpool_status.rs b/src/tools/disks/zpool_stat= us.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, Z= FSPoolVDevState> { > } > =20 > let (i, state) =3D preceded(multispace1, notspace1)(i)?; > + if let Ok((n, _)) =3D preceded(multispace0, line_ending)(i) { // spa= res > + let vdev =3D 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) =3D preceded(multispace1, parse_u64)(i)?; > let (i, write) =3D preceded(multispace1, parse_u64)(i)?; > let (i, cksum) =3D preceded(multispace1, parse_u64)(i)?; > --=20 > 2.20.1 >=20 >=20 >=20 > _______________________________________________ > pbs-devel mailing list > pbs-devel@lists.proxmox.com > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel >=20 >=20 >=20 =