mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@turbolinux.com>
To: Chris Wedgwood <cw@f00f.org>
Cc: Andreas Dilger <adilger@turbolinux.com>,
	"Albert D. Cahalan" <acahalan@cs.uml.edu>,
	Ben LaHaise <bcrl@redhat.com>,
	Ragnar Kjxrstad <kernel@ragnark.vestdata.no>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	mike@bigstorage.com, kevin@bigstorage.com, linux-lvm@sistina.com
Subject: Re: [PATCH] 64 bit scsi read/write
Date: Fri, 13 Jul 2001 16:04:29 -0600 (MDT)	[thread overview]
Message-ID: <200107132204.f6DM4TR3014602@webber.adilger.int> (raw)
In-Reply-To: <20010714090703.B5737@weta.f00f.org> "from Chris Wedgwood at Jul 14, 2001 09:07:03 am"

Chris writes:
> On Fri, Jul 13, 2001 at 02:41:52PM -0600, Andreas Dilger wrote:
> 
>     Yes, RAID should have a journal or other ordering enforcement, but
>     it really isn't any worse in this regard than a single disk.  Even
>     on a single disk you don't have any guarantees of data ordering,
>     so if you change the file and the power is lost, some of the
>     sectors will make it to disk and some will not => fsck, with
>     possible data corrpution or loss.
> 
> How so? On a single disk you can either disable write-caching or for
> SCSI disks you can use barriers of sorts.
> 
> At which time, you can either assume a sector is written or not.

Well, I _think_ your statement is only true if you are using rawio.
Otherwise, you have a minimum block size of 1kB (for filesystems at
least) so you can't write less than that, and you could potentially
write one sector and not another.

I'm not sure of the exact MD RAID implementation, but I suspect that
if you write a single sector*, it will be exactly the same situation.
However, it also has to write the parity to disk, so if you crash at
this point what you get back depends on the RAID implementation**.

As Alan said in another reply, with IDE disks, you have no guarantee
about write caching on the disk, even if you try to turn it off.

If you are doing synchronous I/O from your application, then I don't
think a RAID write will not complete until all of the data+parity I/O
is complete, so you should again be as safe as with a single disk.

If you want safety, but async I/O, use ext3 with full data journaling
and a large journal.  Andrew Morton has just done some testing with
this and the performance is very good, as long as your journal is big
enough to hold your largest write bursts, and you have < 50% duty
cycle for disk I/O (i.e. you have to have enough spare I/O bandwidth
to write everything to disk twice, but it will go to the journal in a
single contiguous (synchronous) write and can go to the filesystem
asynchronously at a later time when there is no other I/O).  If you
put your journal on NVRAM, you will have blazing synchronous I/O.

Cheers, Andreas

*) You _may_ be limited to a larger minimum write, depending on the stripe
   size, I haven't looked closely at the code.  AFAIK, MD RAID does not
   let you stripe a single sector across multiple disks (nor would you
   want to), so all disk I/O would still be one or more single sector I/Os
   to one or more disks.  This means the sector I/O to each individual
   disk is still atomic, so it is not any worse than writes to a single
   disk (the parity is NOT atomic, but then you don't have parity at
   all on a single disk...).

**) As I said in my previous posting, it depends on if/how MD RAID does
   write ordering of I/O to the data sector and the parity sector.  If
   it holds back the parity write until the data I/O(s) are complete, and
   trusts the data over parity on recovery, you should be OK unless you
   have multiple failures (i.e. bad disk + crash).  If it doesn't do this
   ordering, or trusts parity over data, then you are F***ed (I doubt it
   would have this problem).
-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert

  reply	other threads:[~2001-07-13 22:07 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 [this message]
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
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=200107132204.f6DM4TR3014602@webber.adilger.int \
    --to=adilger@turbolinux.com \
    --cc=acahalan@cs.uml.edu \
    --cc=bcrl@redhat.com \
    --cc=cw@f00f.org \
    --cc=kernel@ragnark.vestdata.no \
    --cc=kevin@bigstorage.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-lvm@sistina.com \
    --cc=mike@bigstorage.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®