public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: Robert Obkircher <r.obkircher@proxmox.com>, pbs-devel@lists.proxmox.com
Subject: Re: [PATCH v1 proxmox 2/2] fix #7690: proxmox-sys: close fd before rename/unlink in replace_file
Date: Tue, 30 Jun 2026 17:02:23 +0200	[thread overview]
Message-ID: <5d997f60-a0c2-4c14-94b7-832936761a68@proxmox.com> (raw)
In-Reply-To: <75c9d389-0cd5-4a24-91f6-39cbc96c75b1@proxmox.com>

On 6/30/26 3:24 PM, Robert Obkircher wrote:
> 
> On 29.06.26 13:18, Christian Ebner wrote:
>> On 6/17/26 12:49 PM, Robert Obkircher wrote:
>>> Fix the rename operation on WORM file systems and allow FUSE file
>>> systems to unlink without creating temporary .fuse_hidden files.
>>
>> question: what about other helpers using a similar pattern when
>> removing a temp file in error case, e.g. unlink() after file content
>> writing or fsync() failed while still holding an open file
>> descriptor in atomic_open_or_create_file()? These will produce the
>> .fuse_hidden files as well?
> I think so, but .fuse_hidden files are not really harmful, and it
> seems like we mostly use that function for lockfiles outside of
> datastores.

Okay, thanks for clarification. Was unsure if these could cause issues 
for the mentioned WORM filesystem implementation as well, so wanted to 
mention these as well.

> Should I write a test to verify when .fuse_hidden files are created? I
> didn't bother because I wasn't sure how to create a fuse file system
> in a test.

Not really worth the effort for the time being, unless we do want to 
explicitly support such FUSE based filesystems in the near future. 
Correct me if I'm wrong, but I'm not aware of active efforts to do so.

> But it also seems a bit strange to me that we use mkostemp and
> path-based renames in the first place. Creating the file
> with O_TMPFILE and linking it into place would definitely be safer.




      reply	other threads:[~2026-06-30 15:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-17 10:49 [PATCH v1 proxmox 0/2] improve proxmox-sys::fs::replace_file Robert Obkircher
2026-06-17 10:49 ` [PATCH v1 proxmox 1/2] proxmox-sys: avoid unnecessary conversion in replace_file Robert Obkircher
2026-06-29 11:12   ` Christian Ebner
2026-06-17 10:49 ` [PATCH v1 proxmox 2/2] fix #7690: proxmox-sys: close fd before rename/unlink " Robert Obkircher
2026-06-29 11:18   ` Christian Ebner
2026-06-30 13:24     ` Robert Obkircher
2026-06-30 15:02       ` Christian Ebner [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=5d997f60-a0c2-4c14-94b7-832936761a68@proxmox.com \
    --to=c.ebner@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    --cc=r.obkircher@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