From: Antonio SJ Musumeci <trapexit@spawn.link>
To: The 8472 <kernel@infinite-source.de>, linux-fsdevel@vger.kernel.org
Subject: Re: EBADF returned from close() by FUSE
Date: Fri, 19 Apr 2024 20:07:50 +0000 [thread overview]
Message-ID: <1db87cbf-0465-4226-81a8-3b288d6f47e4@spawn.link> (raw)
In-Reply-To: <ff9b490d-421f-4092-8497-84f545a47e6a@infinite-source.de>
On 4/19/24 13:18, The 8472 wrote:
>> Errnos are not *really* standard. They vary by
>> kernel release, different OSes, different libcs, different filesystems,
>> etc. As I pointed out recently to someone the use of EPERM to mean a
>> filesystem doesn't support "link" is not defined everywhere. Including
>> POSIX IIRC. And given FUSE is a cross platform protocol it shouldn't,
>> within reason, be interpreting any errors sent from the server (IMO).
> FUSE can send any errnos it wants over its client-server protocol.
> But the kernel could still translate them to error codes that don't
> have a documented meaning for a specific syscall.
No one is talking about or cares about the protocol error handling. That
is private to the protocol. What matters is what FUSE kernel side does.
And I'd disagree with you because as I tried to point out that
"documented meaning" is not set in stone. Things change over time.
Different systems, different filesystems, etc. treat situations
differently. Some platforms don't even have certain errno or conflate
others. Aren't there even differences in errno across some Linux archs?
This is just a fact of life. FUSE trying to make sense of that mess is
just going to lead to more of a mess. IMO EIO is no better than EBADF. A
lot of software don't handle handle EXDEV correctly let alone random
other errnos. For years Apple's SMB server would return EIO for just
about anything happening on the backend. If a FUSE server is sending
back EBADF in flush then it is likely a bug or bad decision. Ask them to
fix it.
And really... what is this translation table going to look like? `errno
--list | wc -l` returns 134. You going to have huge switch statements on
every single one of the couple dozen FUSE functions? Some of those
maybe with special checks against arguments for the function too since
many errno's are used to indicate multiple, sometimes entirely
different, errors? It'd be a mess. And as a cross platform technology
you'd need to define it as part of the protocol effectively. And it'd be
backwards incompatible therefore optional.
next prev parent reply other threads:[~2024-04-19 20:07 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-18 22:10 EBADF returned from close() by FUSE The 8472
2024-04-19 3:30 ` Antonio SJ Musumeci
2024-04-19 6:55 ` The 8472
[not found] ` <8c7552b1-f371-4a75-98cc-f2c89816becb@spawn.link>
2024-04-19 18:18 ` The 8472
2024-04-19 20:07 ` Antonio SJ Musumeci [this message]
2024-04-19 20:45 ` The 8472
2024-04-19 21:29 ` Antonio SJ Musumeci
2024-04-19 22:04 ` The 8472
2024-04-19 22:47 ` Antonio SJ Musumeci
2024-04-19 23:04 ` The 8472
2024-04-23 12:46 ` Miklos Szeredi
2024-04-23 13:24 ` Antonio SJ Musumeci
2024-04-23 13:38 ` Miklos Szeredi
[not found] ` <692a9f0b-9c2b-4850-b8bc-48f09fe41762@infinite-source.de>
2024-04-23 21:38 ` The 8472
2024-04-26 8:52 ` Miklos Szeredi
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=1db87cbf-0465-4226-81a8-3b288d6f47e4@spawn.link \
--to=trapexit@spawn.link \
--cc=kernel@infinite-source.de \
--cc=linux-fsdevel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).