From: Rod Van Meter <rdv@cips.nokia.com>
To: "Justin T. Gibbs" <gibbs@scsiguy.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-lvm@sistina.com
Subject: Re: [PATCH] 64 bit scsi read/write
Date: Sun, 15 Jul 2001 16:14:16 -0700 [thread overview]
Message-ID: <200107152314.f6FNEM904281@rvanmete.iprg.nokia.com> (raw)
In-Reply-To: gibbs's message of Sun, 15 Jul 2001 11:47:10 -0600. <200107151747.f6FHlAU60256@aslan.scsiguy.com>
I don't have the SCSI spec in front of me (though, as noted, some
drafts are available online; try t10.org somewhere), but as I
understand it (having worked, briefly, for a major disk manufacturer):
You can commit an individual write with the FUA (force unit access)
bit. The command for this is not WRITE EXTENDED, but WRITE(10) or
WRITE(12). I don't think WRITE(6) has room for the bit, and WRITE(6)
is useless nowadays, anyway. WRITE EXTENDED lets you write over the
ECC bits -- it's a raw write to the platter. Dunno that anyone
implements it any more.
That does NOT get you ordering with respect to other commands. You
can use the complex tagging stuff to get that, but most disk drives
didn't implement it properly in the SCSI-2 days, and there are
significant differences in SCSI-3.
Otherwise, your choice, as noted, is SYNCHRONIZE CACHE before the root
block write, and after. AFAIK, all drives treat that the way it's
meant to be done; everything's on platter when you get a COMMAND
COMPLETE back from it, but they weren't necessarily done in order.
Even within a command, I don't believe there is a guarantee that the
blocks will go to platter in order. Say you write blocks 0-7; the
drive will start the transfer to buffer immediately, as the seek is
begun. When the seek completes, the write gate will enable writes
from buffer to platter, and a state machine takes care of that.
However, the seek and settle may complete when the head is over block
3, so the first write to platter would be block 4, then 5-7. This is
followed by almost an entire revolution's delay(*see note) to get back
to block 0, and 3 will be the last block written.
I have had this exact conversation with disk drive folks (of which I
am not one), but I haven't seen the firmware and state machines
myself, so treat this as an educated guess. The folks I was talking
to may have been wrong, or more likely, misunderstood what I was
asking.
Some manufacturers can put either IDE or SCSI on a drive, and this
behavior is likely to be the same on both. It may not apply to all
members of a family, and probably doesn't apply across families from
the same manufacturer.
Most disk drives, as recently as two years ago, were a lot dumber than
you think, and I doubt the situation has improved much. For the most
part, disk manufacturers get paid for capacity, not smarts, but
there's an entire year-long argument there.
--Rod
* Note: In theory, that rotational delay doesn't have to be idle. I
believe any blocks between 7 and 0 that are also in cache will be
written as the head passes over them. Thus, the drive might
literally interleave writes from multiple commands. It's also
possible, in theory, to switch tracks for a short time and come back
to the first track before block 0 rolls around, but I don't believe
existing controllers are that sophisticated.
P.S. I gotta put in another plug here -- you have until Friday to
write this behavior up and submit it as a paper to USENIX FAST --
Conference on File and Storage Technology. See
http://www.usenix.org/events/fast/
next prev parent reply other threads:[~2001-07-15 23:01 UTC|newest]
Thread overview: 71+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-01 4:53 [RFC][PATCH] first cut 64 bit block support Ben LaHaise
2001-07-03 4:53 ` Ragnar Kjørstad
2001-07-04 2:19 ` [PATCH] 64 bit scsi read/write Ben LaHaise
2001-07-04 7:11 ` Alan Cox
2001-07-05 6:34 ` Ragnar Kjørstad
2001-07-05 7:35 ` Ben LaHaise
2001-07-13 18:20 ` Albert D. Cahalan
2001-07-13 20:41 ` Andreas Dilger
2001-07-13 21:07 ` Chris Wedgwood
2001-07-13 22:04 ` Andreas Dilger
2001-07-14 0:49 ` Jonathan Lundell
2001-07-14 12:27 ` Paul Jakma
2001-07-14 14:48 ` Chris Wedgwood
2001-07-14 15:42 ` Paul Jakma
2001-07-14 17:18 ` Chris Wedgwood
2001-07-20 17:03 ` Stephen C. Tweedie
2001-07-16 18:53 ` Andreas Dilger
2001-07-16 19:13 ` Ragnar Kjørstad
2001-07-13 21:14 ` Alan Cox
2001-07-14 3:23 ` Andrew Morton
2001-07-14 8:45 ` Alan Cox
2001-07-14 14:50 ` Chris Wedgwood
2001-07-14 20:11 ` Daniel Phillips
2001-07-15 1:21 ` Andrew Morton
2001-07-15 1:53 ` Daniel Phillips
2001-07-15 3:36 ` Chris Wedgwood
2001-07-15 6:05 ` John Alvord
2001-07-15 6:07 ` Chris Wedgwood
2001-07-15 13:16 ` Ken Hirsch
2001-07-15 14:50 ` Chris Wedgwood
2001-07-15 22:14 ` Daniel Phillips
2001-07-17 0:31 ` Juan Quintela
2001-07-15 13:44 ` Daniel Phillips
2001-07-15 14:39 ` Chris Wedgwood
2001-07-15 15:32 ` Alan Cox
2001-07-15 15:33 ` Chris Wedgwood
2001-07-15 16:24 ` Chris Wedgwood
2001-07-15 15:06 ` Jonathan Lundell
2001-07-15 15:22 ` Chris Wedgwood
2001-07-15 17:44 ` Jonathan Lundell
2001-07-15 17:47 ` Justin T. Gibbs
2001-07-15 23:14 ` Rod Van Meter [this message]
2001-07-16 0:37 ` Jonathan Lundell
2001-07-16 15:11 ` Rod Van Meter
2001-07-16 8:56 ` Chris Wedgwood
2001-07-16 13:19 ` Daniel Phillips
2001-07-16 1:08 ` Albert D. Cahalan
2001-07-16 8:49 ` Chris Wedgwood
2001-07-21 19:18 ` Alexander Griesser
2001-07-22 3:52 ` Albert D. Cahalan
2001-07-23 14:41 ` Daniel Phillips
2001-07-24 4:29 ` Albert D. Cahalan
2001-07-24 11:45 ` Daniel Phillips
2001-07-14 15:41 ` Jonathan Lundell
2001-07-14 17:00 ` Chris Wedgwood
2001-07-14 17:33 ` Jonathan Lundell
2001-07-15 4:02 ` Chris Wedgwood
2001-07-15 5:46 ` Jonathan Lundell
2001-07-15 17:10 ` Chris Wedgwood
2001-07-15 17:39 ` Jonathan Lundell
2001-07-26 2:18 ` Ragnar Kjørstad
2001-07-26 16:24 ` Andreas Dilger
2001-08-10 19:42 ` Ben LaHaise
2001-08-10 19:51 ` Ragnar Kjørstad
2001-08-10 20:02 ` Ben LaHaise
2001-08-11 0:18 ` Steve Lord
2001-08-11 21:44 ` Matti Aarnio
2001-07-04 10:16 ` [RFC][PATCH] first cut 64 bit block support Chris Wedgwood
2001-07-04 16:59 ` Ben LaHaise
2001-07-14 15:08 [PATCH] 64 bit scsi read/write Ed Tomlinson
2001-07-19 7:35 [PATCH] 64 bit SCSI read/write Andre Hedrick
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=200107152314.f6FNEM904281@rvanmete.iprg.nokia.com \
--to=rdv@cips.nokia.com \
--cc=gibbs@scsiguy.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-lvm@sistina.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®