mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jori Koolstra <jkoolstra@xs4all.nl>
To: Christoph Hellwig <hch@infradead.org>,
	Christian Brauner <brauner@kernel.org>
Cc: Pedro Falcato <pfalcato@suse.de>,
	Jeff Layton <jlayton@kernel.org>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Aleksa Sarai <aleksa@amutable.com>, NeilBrown <neil@brown.name>,
	Amir Goldstein <amir73il@gmail.com>, Jan Kara <jack@suse.cz>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 09/14] vfs: add O_CREAT|O_DIRECTORY to open*(2)
Date: Tue, 14 Jul 2026 12:46:10 +0200 (CEST)	[thread overview]
Message-ID: <607788097.964718.1784025970563@kpc.webmail.kpnmail.nl> (raw)
In-Reply-To: <alS10NN_OduZEqvt@infradead.org>


> Op 13-07-2026 11:54 CEST schreef Christoph Hellwig <hch@infradead.org>:
> 
>  
> On Tue, Jul 07, 2026 at 12:04:18PM +0200, Christian Brauner wrote:
> > I don't think any of this is really an argument worth considering.
> 
> It very much is.
> 
> > This is a lot of handwaving for the sake of portability and concerns
> > about past API mistakes. To both: so what. If an API is useful it's
> > useful, POSIX be damned. We're not going to be fenced in by some
> > standard.
> > 
> > 90% of our interfaces blow way past POSIX already - in most subsystems.
> > If we'd back down ever time someone shows up with "what about POSIX"
> > Linux would be irrelevant.
> 
> You can totaally ignore posix.  We need an interface that is self
> discoverable on Linux.  Any combination of flags that was accepted
> by previous kernels and gave different results than the new interface
> do not qualify for that.
> 
> > It's been years since O_DIRECTORY | O_CREAT has been made consistent
> > which means all LTS kernels have consistent behavior. We often make flag
> > combinations work that didn't work or where inconsisent before. Nothing
> > here is special at all.
> 
> No, we can't rely on something being backport to old enterprise/cloud
> kernel.  Doing so makes the interface unusable for actual applications.
> 

As far as I see it there are two types of UAPI change, one is almost never OK,
and one can be used sometimes. And O_CREAT|O_DIRECTORY falls into the second
category.

1. We have some UAPI that is used by user space and we wish to change its semantics.

2. We have some UAPI that is not used by user space and we wish to change its semantics.

In case 1 we force user space to update every use of the old UAPI if they
wish to be able to run their applications on a new kernel. This is unforgiving
and gave rise to the maxim "never change user space."

In the second case we don't require user space to do anything. The new feature
is opt-in, not opt-out. If the user space application wishes to use the new
feature they must either keep the fallback or update the minimally supported
kernel version. This is mostly fine.

We can detect which of the various behaviors of O_CREAT|O_DIRECTORY is active on
the running kernel, albeit somewhat an ugly test. And Pedro proved we are in
the second category UAPI change here, so we should just go ahead.

I am not opposed to using openat2(2) to have nicer feature detection, but it
should not halt this series imho.

Best,
Jori.

  parent reply	other threads:[~2026-07-14 10:46 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-04 16:41 [PATCH v3 00/14] " Jori Koolstra
2026-07-04 16:41 ` [PATCH v3 01/14] fs/namei.c: use trailing_slashes() Jori Koolstra
2026-07-06  3:56   ` NeilBrown
2026-07-06  7:29     ` David Laight
2026-07-06 20:55       ` Jori Koolstra
2026-07-07  7:42         ` David Laight
2026-07-07 10:51   ` Christian Brauner
2026-07-04 16:41 ` [PATCH v3 02/14] vfs: move create error && negative dentry case in lookup_open() up Jori Koolstra
2026-07-04 16:41 ` [PATCH v3 03/14] vfs: prepare vfs_creat|mkdir_no_perm for reuse in lookup_open() Jori Koolstra
2026-07-07 10:51   ` Christian Brauner
2026-07-04 16:41 ` [PATCH v3 04/14] vfs: call audit_inode_child() in lookup_open() on failure too Jori Koolstra
2026-07-06  5:33   ` NeilBrown
2026-07-06 21:20     ` Jori Koolstra
2026-07-06 23:02       ` NeilBrown
2026-07-07 10:51   ` Christian Brauner
2026-07-04 16:41 ` [PATCH v3 05/14] fs/namei.c: update docstring of atomic_open() Jori Koolstra
2026-07-06  5:36   ` NeilBrown
2026-07-07 10:51   ` Christian Brauner
2026-07-04 16:41 ` [PATCH v3 06/14] vfs: lookup_open(): move setting FMODE_CREATED down Jori Koolstra
2026-07-04 16:41 ` [PATCH v3 07/14] vfs: move ->create check in lookup_open() to before try_break_deleg() Jori Koolstra
2026-07-06  5:37   ` NeilBrown
2026-07-07 10:51   ` Christian Brauner
2026-07-04 16:41 ` [PATCH v3 08/14] vfs: lookup_open(): use vfs_create_no_perm() Jori Koolstra
2026-07-06  5:38   ` NeilBrown
2026-07-07 10:51   ` Christian Brauner
2026-07-04 16:41 ` [PATCH v3 09/14] vfs: add O_CREAT|O_DIRECTORY to open*(2) Jori Koolstra
2026-07-06  5:46   ` NeilBrown
2026-07-07  8:35   ` Pedro Falcato
2026-07-07 10:04     ` Christian Brauner
2026-07-07 13:04       ` Pedro Falcato
2026-07-07 13:30         ` Christian Brauner
2026-07-13  9:54       ` Christoph Hellwig
2026-07-13 21:35         ` NeilBrown
2026-07-14  5:10           ` Christoph Hellwig
2026-07-14 10:50             ` Jori Koolstra
2026-07-14 10:46         ` Jori Koolstra [this message]
2026-07-07 10:06     ` Jori Koolstra
2026-07-07 13:55       ` Pedro Falcato
2026-07-07 14:18         ` Jori Koolstra
2026-07-08 15:39           ` Pedro Falcato
2026-07-09  6:24             ` Christoph Hellwig
2026-07-09 10:51               ` Jori Koolstra
2026-07-09 14:21                 ` Christian Brauner
2026-07-09 14:34                   ` Jori Koolstra
2026-07-13  9:50                   ` Christoph Hellwig
2026-07-07 10:51   ` Christian Brauner
2026-07-10 18:55     ` Jori Koolstra
2026-07-12 12:39       ` Christian Brauner
2026-07-04 16:41 ` [PATCH v3 10/14] vfs: move O_IS_MKDIR check from lookup_open() into individual filesystems Jori Koolstra
2026-07-06  5:50   ` NeilBrown
2026-07-07 10:51   ` Christian Brauner
2026-07-04 16:41 ` [PATCH v3 11/14] vfs: refuse O_CREAT for directories through a dangling symlink Jori Koolstra
2026-07-06  5:51   ` NeilBrown
2026-07-04 16:41 ` [PATCH v3 12/14] vfs: short-circuit MAY_WRITE access for O_DIRECTORY opens Jori Koolstra
2026-07-06  5:51   ` NeilBrown
2026-07-04 16:41 ` [PATCH v3 13/14] selftest: fix headers in fclog.c Jori Koolstra
2026-07-06  5:57   ` NeilBrown
2026-07-06 21:07     ` Jori Koolstra
2026-07-07 10:51   ` Christian Brauner
2026-07-04 16:41 ` [PATCH v3 14/14] selftest: add tests for open*(O_CREAT|O_DIRECTORY) Jori Koolstra
2026-07-07 10:51   ` Christian Brauner
2026-07-07 10:51 ` [PATCH v3 00/14] vfs: add O_CREAT|O_DIRECTORY to open*(2) Christian Brauner

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=607788097.964718.1784025970563@kpc.webmail.kpnmail.nl \
    --to=jkoolstra@xs4all.nl \
    --cc=aleksa@amutable.com \
    --cc=amir73il@gmail.com \
    --cc=brauner@kernel.org \
    --cc=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=jlayton@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neil@brown.name \
    --cc=pfalcato@suse.de \
    --cc=viro@zeniv.linux.org.uk \
    /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