[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAFfO_h4OcP4ad_FL43Vx0sDur=7GUUgyHX5DFEFKGtu4LLPBLw@mail.gmail.com>
Date: Sun, 25 Jan 2026 22:59:53 +0600
From: Dorjoy Chowdhury <dorjoychy111@...il.com>
To: Jeff Layton <jlayton@...nel.org>
Cc: Arnd Bergmann <arnd@...db.de>, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>, Chuck Lever <chuck.lever@...cle.com>,
Alexander Aring <alex.aring@...il.com>
Subject: Re: [PATCH 1/2] open: new O_REGULAR flag support
On Sun, Jan 25, 2026 at 10:28 PM Jeff Layton <jlayton@...nel.org> wrote:
>
> On Sun, 2026-01-25 at 21:41 +0600, Dorjoy Chowdhury wrote:
> > On Sun, Jan 25, 2026 at 8:40 PM Arnd Bergmann <arnd@...db.de> wrote:
> > >
> > > On Sun, Jan 25, 2026, at 15:14, Dorjoy Chowdhury wrote:
> > >
> > > > diff --git a/include/uapi/asm-generic/errno-base.h
> > > > b/include/uapi/asm-generic/errno-base.h
> > > > index 9653140bff92..ea9a96d30737 100644
> > > > --- a/include/uapi/asm-generic/errno-base.h
> > > > +++ b/include/uapi/asm-generic/errno-base.h
> > > > @@ -36,5 +36,6 @@
> > > > #define EPIPE 32 /* Broken pipe */
> > > > #define EDOM 33 /* Math argument out of domain of func */
> > > > #define ERANGE 34 /* Math result not representable */
> > > > +#define ENOTREGULAR 35 /* Not a regular file */
> > >
> > > This clashes with EDEADLK on most architectures, or with
> > > EAGAIN on alpha and ENOMSG on mips/parisc. You probably
> > > need to pick the next free value in uapi/asm-generic/errno.h
> > > and arch/*/include/uapi/asm/errno.h and keep this sorted
> > > after EHWPOISON if you can't find an existing error code.
> > >
> >
> > Thanks for pointing this out. I will fix up in v2 along with other
> > comments (if any). I looked at the existing error codes in
> > uapi/asm-generic/errno.h and didn't notice anything that I could
> > reuse. So if I understand correctly, I will need this new error code
> > in both uapi/asm-generic/errno.h (not in errno-base.h) and in
> > arch/*/include/uapi/asm/errno.h (I see some parallel
> > tools/arch/*/include/uapi/asm/errno.h files too) just after EHWPOISON,
> > right?
> >
>
> nit: Can we call this this ENOTREG instead of ENOTREGULAR? That seems
> like it would read better alongside ENOTDIR and I hate extra typing.
>
Good suggestion. I agree. Will fix up in v2. Thanks!
Regards,
Dorjoy
Powered by blists - more mailing lists