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 99B9C786D7 for ; Tue, 28 Jun 2022 13:48:24 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 90607AA68 for ; Tue, 28 Jun 2022 13:47:54 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (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 C4396AA5F for ; Tue, 28 Jun 2022 13:47:53 +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 9CE5642AE4 for ; Tue, 28 Jun 2022 13:47:53 +0200 (CEST) Date: Tue, 28 Jun 2022 13:47:47 +0200 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= To: Proxmox Backup Server development discussion References: <20220628111318.2648586-1-d.csapak@proxmox.com> <20220628111318.2648586-3-d.csapak@proxmox.com> In-Reply-To: <20220628111318.2648586-3-d.csapak@proxmox.com> MIME-Version: 1.0 User-Agent: astroid/0.15.0 (https://github.com/astroidmail/astroid) Message-Id: <1656416283.job1uyv5jb.astroid@nora.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.170 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - 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, zfs.rs] Subject: Re: [pbs-devel] [PATCH proxmox-backup 1/2] adapt to changed callback signature of 'scandir' 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: Tue, 28 Jun 2022 11:48:24 -0000 On June 28, 2022 1:13 pm, Dominik Csapak wrote: > we now get an Option too but don't use it *anywhere* - so why introduce a breaking change in=20 proxmox_sys for it? is there some other place where we use it? >=20 > Signed-off-by: Dominik Csapak > --- > pbs-datastore/src/backup_info.rs | 23 ++++++++++++++--------- > src/tools/disks/zfs.rs | 2 +- > 2 files changed, 15 insertions(+), 10 deletions(-) >=20 > diff --git a/pbs-datastore/src/backup_info.rs b/pbs-datastore/src/backup_= info.rs > index 10320a35..21fe4602 100644 > --- a/pbs-datastore/src/backup_info.rs > +++ b/pbs-datastore/src/backup_info.rs > @@ -87,7 +87,7 @@ impl BackupGroup { > libc::AT_FDCWD, > &path, > &BACKUP_DATE_REGEX, > - |l2_fd, backup_time, file_type| { > + |l2_fd, backup_time, file_type, _stat| { > if file_type !=3D nix::dir::Type::Directory { > return Ok(()); > } > @@ -127,7 +127,7 @@ impl BackupGroup { > libc::AT_FDCWD, > &path, > &BACKUP_DATE_REGEX, > - |l2_fd, backup_time, file_type| { > + |l2_fd, backup_time, file_type, _stat| { > if file_type !=3D nix::dir::Type::Directory { > return Ok(()); > } > @@ -635,13 +635,18 @@ fn list_backup_files( > ) -> Result, Error> { > let mut files =3D vec![]; > =20 > - proxmox_sys::fs::scandir(dirfd, path, &BACKUP_FILE_REGEX, |_, filena= me, file_type| { > - if file_type !=3D nix::dir::Type::File { > - return Ok(()); > - } > - files.push(filename.to_owned()); > - Ok(()) > - })?; > + proxmox_sys::fs::scandir( > + dirfd, > + path, > + &BACKUP_FILE_REGEX, > + |_, filename, file_type, _stat| { > + if file_type !=3D nix::dir::Type::File { > + return Ok(()); > + } > + files.push(filename.to_owned()); > + Ok(()) > + }, > + )?; > =20 > Ok(files) > } > diff --git a/src/tools/disks/zfs.rs b/src/tools/disks/zfs.rs > index 30a6cc0c..5f09c2cf 100644 > --- a/src/tools/disks/zfs.rs > +++ b/src/tools/disks/zfs.rs > @@ -178,7 +178,7 @@ pub(crate) fn update_zfs_objset_map(pool: &str) -> Re= sult<(), Error> { > libc::AT_FDCWD, > &path, > &OBJSET_REGEX, > - |_l2_fd, filename, _type| { > + |_l2_fd, filename, _type, _stat| { > let (name, _) =3D parse_objset_stat(pool, filename)?; > map.insert(name, (pool.to_string(), filename.to_string())); > Ok(()) > --=20 > 2.30.2 >=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