linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ric Wheeler <ric@emc.com>
To: Tejun Heo <htejun@gmail.com>
Cc: Mark Hahn <hahn@physics.mcmaster.ca>,
	David.Ronis@McGill.CA, linux-ide@vger.kernel.org, neilb@suse.de
Subject: Re: Problem with disk
Date: Sat, 13 May 2006 15:31:57 -0400	[thread overview]
Message-ID: <4466342D.3030905@emc.com> (raw)
In-Reply-To: <44626769.2000601@gmail.com>



Tejun Heo wrote:

> Ric Wheeler wrote:
>
>> I think that MD will do the right thing if the IO terminates with an 
>> error condition.  If the error is silent (and that can happen during 
>> a write), then it clearly cannot recover.
>
>
> The condition I've described results in silent loss of data.  
> Depending on type and implementation, LLDD might be able to detect the 
> condition (PHY RDY status changed for SATA), but the event happens 
> after the affected writes are completed successfully.  For example,
>
> 1. fs issues writes for block #x, #y and then barrier #b.
> 2. #x gets written to the write-back cache and completed successfully
> 3. power glitch occurs while #y is in progress.  LLDD detects the 
> condition, recovers the drive and retries #y.
> 4. #y gets written to the write-back cache and completed successfully
> 4. barrier #b gets executed and #y gets written to the media, but #x 
> is lost and nobody knows about it.

The promise that you get from the barrier is pretty simple - after a 
successful one, all IO's that have been submitted before then are on 
platter if the barrier works.

In your example, if you mean power glitch as in power loss, x will be 
lost (and probably lots of other write cache state), but the application 
should expect it (or add extra barriers)....

>
> I'm worried about the problem because, with libata, hotplug is 
> becoming available to the masses and when average Joe hot plugs a new 
> drive into his machine which has $8 power supply (really, they sell 
> 300w ATX power at 8000 KRW which is about $8), this is going to 
> happen.  I had a pretty decent power supply from a reputable maker but 
> I still got hit by the problem.

Not sure that I understand exactly how a glitch (as opposed to a full 
loss) would cause x to get lost - the drive firmware should track the 
fact that x was in the write cache and not destaged to platter.

>
> Maybe the correct approach is to establish a warm-plug protocol.  
> Kernel provides a way to plug IOs and user helper program plugs all 
> IOs until the new device settles.
>
> Thanks.
>

      reply	other threads:[~2006-05-13 19:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-03 20:01 Problem with disk David Ronis
2006-05-03 20:08 ` Ric Wheeler
2006-05-05 23:49   ` Mark Hahn
2006-05-06  0:51     ` Ric Wheeler
2006-05-06 17:11       ` Mark Hahn
2006-05-06 18:17         ` Ric Wheeler
2006-05-06 18:34           ` Mark Hahn
2006-05-06 22:56             ` Tejun Heo
2006-05-07 13:21               ` Ric Wheeler
2006-05-07 13:41                 ` Tejun Heo
2006-05-08 14:33                   ` Ric Wheeler
2006-05-10 22:21                     ` Tejun Heo
2006-05-13 19:31                       ` Ric Wheeler [this message]

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=4466342D.3030905@emc.com \
    --to=ric@emc.com \
    --cc=David.Ronis@McGill.CA \
    --cc=hahn@physics.mcmaster.ca \
    --cc=htejun@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=neilb@suse.de \
    /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).