mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nathan Scott <nathans@sgi.com>
To: monkeyiq <monkeyiq@users.sourceforge.net>
Cc: Andreas Gruenbacher <ag@bestbits.at>,
	linux-xfs@oss.sgi.com, linux-kernel@vger.kernel.org
Subject: Re: ENOATTR and other error enums
Date: Mon, 8 Oct 2001 12:22:02 +1100	[thread overview]
Message-ID: <20011008122201.W472533@wobbly.melbourne.sgi.com> (raw)
In-Reply-To: <200110060624.f966OeV30354@monkeyiq.dnsalias.org>
In-Reply-To: <200110060624.f966OeV30354@monkeyiq.dnsalias.org>; from monkeyiq@users.sourceforge.net on Sat, Oct 06, 2001 at 04:24:40PM +1000

hi there,

On Sat, Oct 06, 2001 at 04:24:40PM +1000, monkeyiq wrote:
> Hi,
>   Anyone know where these are defined in Linux? I dont seem
> to be able to find them, even with find/grep in /usr/include.

ENOATTR is not a blessed errno in Linux.  In XFS we have simply
defined it to be the same as ENODATA for the time being.  The
ext2 extended attributes project define it to be EDOM, also as
a stop-gap solution I imagine.

A similar problem exists with ENOTSUP (defined by POSIX 1003.1b?)
- this is only supported via linux/asm-parisc/errno.h as a real
errno, among all the architectures.  Both the XFS and ext2 extended
attributes implementations define this errno to be EOPNOTSUPP as an
interim solution.  Ah, wait - from a quick test, glibc does seem to
do exactly this also, so this one is not a problem (except perhaps
on the parisc port? -- hmm, that could actually be a bug on parisc).

On a related topic, but not specific to extended attributes - for
XFS in general, we needed one other errno - EFSCORRUPTED.  This is
used when XFS goes into forced shutdown mode for a filesystem that
has been detected as on-disk corrupt, to stop making the situation
any worse (user must umount/xfs_repair).  We couldn't find any pre-
existing Linux errno vaguely similar to this one, so it was defined
to "990" until a real solution could be found.

Obviously, these are not the correct long-term solutions ... they
need to become real Linux errno's, I think, and ENOTSUP could be
defined to EOPNOTSUPP? - EWOULDBLOCK, EDEADLOCK seem to do this.
I'm not sure how to reach that point though (CC'ing linux-kernel
for any advice) - for reference, in IRIX these errnos are defined
as follows:

ENOATTR = Attribute not found
EFSCORRUPTED = Filesystem is corrupted

> Also, is there a function to get a string rep of the error
> that occured in the attr code?

Someday it should become a part of asm-XXXXX/errno.h (errno's are
architecture specific) and the libc strerror(3) routine should be
able to provide a meaningful string.  But currently that does not
happen.

cheers.

-- 
Nathan

       reply	other threads:[~2001-10-08  1:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200110060624.f966OeV30354@monkeyiq.dnsalias.org>
2001-10-08  1:22 ` Nathan Scott [this message]
2001-10-09  5:01   ` [PATCH] " Nathan Scott
2001-10-09 12:37     ` Alan Cox
2001-10-09 13:31       ` Nathan Scott

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=20011008122201.W472533@wobbly.melbourne.sgi.com \
    --to=nathans@sgi.com \
    --cc=ag@bestbits.at \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@oss.sgi.com \
    --cc=monkeyiq@users.sourceforge.net \
    /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®