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 EE4586C66E for ; Mon, 29 Mar 2021 18:25:33 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id E34BE18021 for ; Mon, 29 Mar 2021 18:25:33 +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) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id D584F18011 for ; Mon, 29 Mar 2021 18:25:32 +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 A1CD14595C for ; Mon, 29 Mar 2021 18:25:32 +0200 (CEST) Date: Mon, 29 Mar 2021 18:25:30 +0200 (CEST) From: Dietmar Maurer To: Proxmox Backup Server development discussion , Wolfgang Bumiller , Dominik Csapak Message-ID: <2116112297.1289.1617035130500@webmail.proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Normal X-Mailer: Open-Xchange Mailer v7.10.5-Rev5 X-Originating-Client: open-xchange-appsuite X-SPAM-LEVEL: Spam detection results: 0 AWL 0.114 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 Subject: Re: [pbs-devel] [PATCH pxar] encoder: flush after writing last entry 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: Mon, 29 Mar 2021 16:25:34 -0000 > > + flush(self.output.as_mut()).await?; > > According to the patch comment this hasn't broken anywhere at the time, > but was there any test-code that did need this? > > I'd like to make this at least conditional on the writer being > `EncoderOutput::Owned` to not cause additional flushes for every single > level of directory nesting. Oh, I was not aware that this calls flush for every directory. I guess nobody really wants that. > That said, I'm not even convinced an `Owned` writer would really need > this? You don't need to explicitly call `flush()` on a `std::fs::File` > or even a `std::io::BufWriter` explicitly (`BufWriter` explicitly > flushes in its `Drop` handler), unless you *explicitly* want to handle > its error, but then you should keep ownership of the writer you pass to > the encoder anyway and flush manually, not leave that up to the pxar > code. I am ok with reverting this patch.