linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Mark Lord <lsml@rtr.ca>,
	linux-scsi@vger.kernel.org, Jens Axboe <axboe@suse.de>
Subject: Re: [PATCH] Re: libata:  BLKFLSBUF ioctl broken
Date: Fri, 22 Oct 2004 19:16:59 +0100	[thread overview]
Message-ID: <1098469018.19463.26.camel@localhost.localdomain> (raw)
In-Reply-To: <41794158.9010308@pobox.com>

On Gwe, 2004-10-22 at 18:20, Jeff Garzik wrote:
> > -EOPNOTSUPP is saying "I do know what is going on but its broken so
> > fail it totally".
> 
> Are you describing behavior mandated in some standard?

Yes. ENOTTY means "the ioctl you threw at me isn't one I understand",
always has been in Unix proper.

-EINVAL: "I recognize this ioctl but the arguments are bogus"
-ENOTTY: "I don't recognize this ioctl at all"
-ENOIOCTLCMD: Internal (never user visible) used by some driver layers 
to pass down "please do the defaults". This one might be a sane addition
to the block layer list.

> Because that differs with _tons_ of existing ioctl code, whose default 
> return code is EOPNOTSUPP when no known operation is found in a C 
> "switch(cmd)" statement.
> 
> grep for it...

We are slowly fixing the abusers of -EINVAL/-EOPNOTSUPP. Note btw that
networking stuff is in many places a little different in its returns.

Alan


  parent reply	other threads:[~2004-10-22 19:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-21 21:04 libata: BLKFLSBUF ioctl broken Mark Lord
2004-10-22  4:04 ` Jeff Garzik
2004-10-22 14:20   ` Mark Lord
2004-10-22 17:07     ` [PATCH] " Jeff Garzik
2004-10-22 16:14       ` Alan Cox
2004-10-22 17:20         ` Jeff Garzik
2004-10-22 17:40           ` Mark Lord
2004-10-22 18:16           ` Alan Cox [this message]
2004-10-22 19:42             ` Doug Maxey
2004-10-22 20:31               ` Alan Cox
2004-10-25 20:24               ` Bryan Henderson
2004-10-22 20:58             ` Bryan Henderson

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=1098469018.19463.26.camel@localhost.localdomain \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=axboe@suse.de \
    --cc=jgarzik@pobox.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=lsml@rtr.ca \
    /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).