From: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Jens Axboe <axboe@suse.de>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Chris Mason <mason@suse.com>
Subject: Re: [PATCH] barrier patch set
Date: Sat, 20 Mar 2004 02:24:14 +0100 [thread overview]
Message-ID: <200403200224.14055.bzolnier@elka.pw.edu.pl> (raw)
In-Reply-To: <405B936C.50200@pobox.com>
On Saturday 20 of March 2004 01:42, Jeff Garzik wrote:
> Bartlomiej Zolnierkiewicz wrote:
> > On Saturday 20 of March 2004 01:14, Jeff Garzik wrote:
> >>Bartlomiej Zolnierkiewicz wrote:
> >>>The fact that spec says "supported" not "enabled" in description of
> >>>word86 makes me wonder - can they be disabled? (FLUSH CACHE is mandatory
> >>>for General feature set and FLUSH CACHE EXT is mandatory if 48-bit LBA
> >>> is supported)
> >>
> >>Yes, that's why there are separate 'supported' and 'enabled' bits for
> >>each feature.
> >>
> >>Words 82-84 are 'supported' bits. Words 85-87 are 'enabled' bits.
> >>These bits mirror each other, i.e. Word 83 and Word 86 have basically
> >>the same bits, except that Word 86 definitions change _slightly_ since
> >>the only bits that are relevant are the ones for features that can be
> >>disabled/enabled.
> >>
> >>You use set-features command to enable and disable these features, and
> >>then the result shows up in subsequent identify-device command output.
> >>
> >>If the driver is testing for a capability but does not enable it, then
> >>always use the 'enabled' set of bits, not the 'supported' set of bits.
> >
> > This is quite obvious but I am talking about confusing wording in
> > description of word86 - for some features 'enabled' is used and for
> > others 'supported'
>
> Yeah, mainly the difference is communicating in the description of each
> word.
>
> Anyway, what I described is how things work :) For example, features
> that are always enabled in the drive are listed with both support and
> enabled bits set. The driver sees that, and does not issue a
> set-features command, because it does not need to.
Yep but in your original mail you suggested that we should explicitly enable
FLUSH CACHE and FLUSH CACHE EXT features - there are even no subcommands
to do this. ;-)
> >>>IMO to test if FLUSH CACHE works we should just issue it during disk
> >>>setup and check result. This way we can use FLUSH CACHE also on < ATA-6
> >>>devices (there is a lot of them).
> >>
> >>I disagree. "just issue it" is how those LG cdrom drives got cooked.
> >
> > I'm aware of LG fun. Jens already stated that current barrier
> > implementation is disk-only and I'm talking about disks only.
> >
> > If anybody reused CACHE FLUSH opcode for disk drive he/she deserves to
> > loose. 8)
>
> Well... If you don't check the proper feature bits found in the spec, I
> blame the driver for ignoring the spec... :)
Please point me to these bits in ATA-4 or ATA-5 spec.
Have you checked them as I asked?
> >>All drives that support flush-cache list the relevant bits in
> >>identify-device, even on pre-ATA-6 devices. Whether the feature was
> >>optional or mandantory, we can check the feature bits.
> >
> > Hm. so this is undocumented in the spec?
>
> ? When it was optional, there was a feature bit to test. When it
> became mandantory, the feature bit to test stayed in there. The feature
> bit is zero, otherwise. Makes it possible to use "just test the bit"
> and have things Just Work(tm). :)
I wish it was so simple. Here is an example to make it clear:
model: WDC WD800JB-00CRA1 firmware: 17.07W77
word 0x83 is 4b01, word 0x86 is 0x0801
and drive of course supports CACHE FLUSH command.
Cheers,
Bartlomiej
next prev parent reply other threads:[~2004-03-20 1:16 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-19 15:35 Jens Axboe
2004-03-19 16:30 ` Mika Penttilä
2004-03-19 18:16 ` Jens Axboe
2004-03-19 18:44 ` Mika Penttilä
2004-03-20 9:55 ` Jens Axboe
2004-03-19 16:34 ` Jeff Garzik
2004-03-19 18:19 ` Jens Axboe
2004-03-19 23:01 ` Matthias Andree
2004-03-20 0:02 ` Bartlomiej Zolnierkiewicz
2004-03-20 1:48 ` Johannes Stezenbach
2004-03-20 2:13 ` Bartlomiej Zolnierkiewicz
2004-03-20 2:53 ` Johannes Stezenbach
2004-03-20 16:03 ` Bartlomiej Zolnierkiewicz
2004-03-20 11:36 ` Matthias Andree
2004-03-20 16:00 ` Bartlomiej Zolnierkiewicz
2004-03-20 23:36 ` Johannes Stezenbach
2004-03-21 1:33 ` Bartlomiej Zolnierkiewicz
2004-03-20 18:52 ` Helge Hafting
2004-03-22 11:15 ` Matthias Andree
2004-03-19 23:59 ` Bartlomiej Zolnierkiewicz
2004-03-20 0:14 ` Jeff Garzik
2004-03-20 0:40 ` Bartlomiej Zolnierkiewicz
2004-03-20 0:42 ` Jeff Garzik
2004-03-20 1:24 ` Bartlomiej Zolnierkiewicz [this message]
2004-03-20 9:58 ` Jens Axboe
2004-03-20 10:12 ` Jeff Garzik
2004-03-20 10:19 ` Jens Axboe
2004-03-20 10:37 ` Jeff Garzik
2004-03-20 16:30 ` Bartlomiej Zolnierkiewicz
2004-03-21 18:12 ` Jeff Garzik
2004-03-20 10:21 ` Jeff Garzik
2004-03-20 15:54 ` Bartlomiej Zolnierkiewicz
2004-03-20 0:17 ` Jeff Garzik
2004-03-20 9:53 ` Jens Axboe
2004-03-20 16:23 ` Bartlomiej Zolnierkiewicz
2004-03-20 16:27 ` Jens Axboe
2004-03-20 16:32 ` Chris Mason
2004-03-20 17:05 ` Bartlomiej Zolnierkiewicz
2004-03-20 17:10 ` Chris Mason
2004-03-20 20:16 ` Bartlomiej Zolnierkiewicz
2004-03-21 9:43 ` Jens Axboe
2004-03-30 16:04 ` Stephen C. Tweedie
2004-03-30 19:19 ` Chris Mason
2004-03-30 21:50 ` Stephen C. Tweedie
2004-03-30 22:13 ` Chris Mason
2004-03-31 14:03 ` Stephen C. Tweedie
2004-03-31 14:27 ` Chris Mason
2004-03-31 18:28 ` Ric Wheeler
2004-03-30 22:21 ` Jeff Garzik
2004-03-30 22:36 ` Chris Wedgwood
2004-03-30 22:39 ` Jeff Garzik
2004-03-30 22:41 ` Chris Wedgwood
2004-03-30 22:40 ` Bartlomiej Zolnierkiewicz
2004-03-30 22:38 ` Jeff Garzik
2004-03-31 14:08 ` Stephen C. Tweedie
2004-03-31 14:21 ` Chris Mason
2004-03-31 21:26 ` Jeff Garzik
2004-03-31 22:09 ` Chris Mason
2004-03-31 21:27 ` Jeff Garzik
2004-03-19 16:48 ` Marc-Christian Petersen
2004-03-19 18:19 ` Jens Axboe
2004-03-22 11:09 ` Andrew Morton
2004-03-22 11:10 ` Jens Axboe
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=200403200224.14055.bzolnier@elka.pw.edu.pl \
--to=b.zolnierkiewicz@elka.pw.edu.pl \
--cc=axboe@suse.de \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mason@suse.com \
/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®