From: David Laight <david.laight.linux@gmail.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: Andy Lutomirski <luto@amacapital.net>,
Mikko Rantalainen <mikko.rantalainen@peda.net>,
Rich Felker <dalias@libc.org>,
Matthew Wilcox <willy@infradead.org>,
linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org,
linux-kernel@vger.kernel.org, brauner@kernel.org,
viro@zeniv.linux.org.uk, jack@suse.cz, alx@kernel.org
Subject: Re: [RFC PATCH 0/1] close(): stop exposing non-retryable EINTR
Date: Fri, 18 Sep 2026 16:17:41 +0100 [thread overview]
Message-ID: <20260918161741.1d95bd4f@pumpkin> (raw)
In-Reply-To: <lhu5x02vhtk.fsf@oldenburg.str.redhat.com>
On Fri, 18 Sep 2026 14:56:39 +0200
Florian Weimer <fweimer@redhat.com> wrote:
> * Andy Lutomirski:
>
> > I think I mostly agree with your analysis except that I really don't
> > like the ENOSPC. The kernel actually has the ability to commit to
> > having space for pending writes on an fd *without syncing*, then I
> > think that capability should be expose to userspace. fsync is a
> > pretty poor alternative for code that just wants to make sure that, in
> > the absence of a bug, crash or physical failure, the data won't be
> > lost.
>
> It's something we might want to call from fflush.
>
> As a replacement, dup3/close doesn't quite work because it releases
> POSIX advisory locks on the original descriptor (as they are per
> process, not per descriptor).
POSIX advisory locks are completely broken by design.
They just don't work for threaded processes at all.
Thread 1 thread 2 thread 3
open
lock
open
close
open
lock - succeeds
The same could easily happen if a single threaded process opens
the same file multiple times.
David
>
> Thanks,
> Florian
>
>
next prev parent reply other threads:[~2026-09-18 15:17 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-13 19:38 Mikko Rantalainen
2026-09-13 19:38 ` [RFC PATCH 1/1] fs: don't return EINTR from close() Mikko Rantalainen
2026-09-13 20:53 ` [RFC PATCH 0/1] close(): stop exposing non-retryable EINTR Rich Felker
2026-09-13 21:27 ` Alejandro Colomar
2026-09-14 6:36 ` Mikko Rantalainen
2026-09-14 9:44 ` Alejandro Colomar
2026-09-13 22:42 ` Matthew Wilcox
2026-09-13 23:51 ` Rich Felker
2026-09-14 9:38 ` Mikko Rantalainen
2026-09-16 23:16 ` Andy Lutomirski
2026-09-17 10:37 ` Mikko Rantalainen
2026-09-17 17:03 ` Andy Lutomirski
2026-09-17 17:48 ` Rich Felker
2026-09-18 12:56 ` Florian Weimer
2026-09-18 15:17 ` David Laight [this message]
2026-09-14 9:07 ` Mikko Rantalainen
2026-09-14 12:40 ` Mikko Rantalainen
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=20260918161741.1d95bd4f@pumpkin \
--to=david.laight.linux@gmail.com \
--cc=alx@kernel.org \
--cc=brauner@kernel.org \
--cc=dalias@libc.org \
--cc=fweimer@redhat.com \
--cc=jack@suse.cz \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mikko.rantalainen@peda.net \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.org \
/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
all inboxes | Powered by JetHome®