public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dietmar Maurer <dietmar@proxmox.com>
To: Wolfgang Bumiller <w.bumiller@proxmox.com>,
	Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>,
	Dominik Csapak <d.csapak@proxmox.com>
Subject: Re: [pbs-devel] [PATCH pxar] encoder: flush after writing last entry
Date: Tue, 30 Mar 2021 09:10:50 +0200 (CEST)	[thread overview]
Message-ID: <435678602.1487.1617088250415@webmail.proxmox.com> (raw)

> After an off-list talk with Dominik we concluded that keeping it for `Owned`
> writers is the safer approach for the simple reason that in *async* code (eg.
> tokio's async BufWriter equivalent) you *do* need to flush buffered writers.
> 
> This is probably because there's no `AsyncDrop` and there's no guarantee that
> the future's `Drop` handler is called in a place where it is safe to call
> tokio's `block_in_place` (after all it panics when it is outside a tokio RT
> thread, *including* being inside a `runtime.block_on()` called from outside
> a tokio RT thread).
> 
> So yeah, let's not revert this, but limit it to `EncoderOutput::Owned`.

But Flushing at every sub-dir makes no real sense. You only need
to flush once when you are finished writing the pxar (for the top level dir)?




             reply	other threads:[~2021-03-30  7:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-30  7:10 Dietmar Maurer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-03-30  7:18 Wolfgang Bumiller
2021-03-30  6:57 Wolfgang Bumiller
2021-03-29 16:25 Dietmar Maurer
2021-03-24 10:56 Dominik Csapak
2021-03-29 13:22 ` Wolfgang Bumiller

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=435678602.1487.1617088250415@webmail.proxmox.com \
    --to=dietmar@proxmox.com \
    --cc=d.csapak@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    --cc=w.bumiller@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal