From: Jeff Garzik <jgarzik@pobox.com>
To: Mark Lord <lsml@rtr.ca>
Cc: linux-scsi@vger.kernel.org, Jens Axboe <axboe@suse.de>,
Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: [PATCH] Re: libata: BLKFLSBUF ioctl broken
Date: Fri, 22 Oct 2004 13:07:52 -0400 [thread overview]
Message-ID: <41793E68.6010000@pobox.com> (raw)
In-Reply-To: <41791728.7060106@rtr.ca>
[-- Attachment #1: Type: text/plain, Size: 1262 bytes --]
Mark Lord wrote:
> Try issuing a BLKFLSBUF to a SATA drive.
> As of 2.6.9 this apparently returns EOPNOTSUPP to userspace.
Ok, I think I see what's going on. Can you get your users to try the
attached patch?
Maybe libata should be returning ENOTTY, but that's _quite_ nonsensical
considering that EOPNOTSUPP describes the error much better (and is a
standard I-don't-support-that-operation return code in tons of other
Linux ioctl-handling code).
> I don't have any libata controllers here to try it with.
You mean you don't have an Intel PATA controller lying around
anywhere??? :) To enable Intel PATA controllers, set the
ATA_ENABLE_PATA define in include/linux/libata.h, and recompile the
ata_piix driver:
#undef ATA_DEBUG /* debugging output */
#undef ATA_VERBOSE_DEBUG /* yet more debugging output */
#undef ATA_IRQ_TRAP /* define to ack screaming irqs */
#undef ATA_NDEBUG /* define to disable quick runtime checks */
#undef ATA_ENABLE_ATAPI /* define to enable ATAPI support */
#undef ATA_ENABLE_PATA /* define to enable PATA support in some
* low-level drivers */
#undef ATAPI_ENABLE_DMADIR /* enables ATAPI DMADIR bridge support */
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 476 bytes --]
===== drivers/block/ioctl.c 1.62 vs edited =====
--- 1.62/drivers/block/ioctl.c 2004-10-03 00:05:10 -04:00
+++ edited/drivers/block/ioctl.c 2004-10-22 13:06:16 -04:00
@@ -195,7 +195,8 @@
if (disk->fops->ioctl) {
ret = disk->fops->ioctl(inode, file, cmd, arg);
/* -EINVAL to handle old uncorrected drivers */
- if (ret != -EINVAL && ret != -ENOTTY)
+ if (ret != -EINVAL && ret != -ENOTTY &&
+ ret != -EOPNOTSUPP)
return ret;
}
fsync_bdev(bdev);
next prev parent reply other threads:[~2004-10-22 17:08 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 ` Jeff Garzik [this message]
2004-10-22 16:14 ` [PATCH] " Alan Cox
2004-10-22 17:20 ` Jeff Garzik
2004-10-22 17:40 ` Mark Lord
2004-10-22 18:16 ` Alan Cox
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=41793E68.6010000@pobox.com \
--to=jgarzik@pobox.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=axboe@suse.de \
--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).