public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Stefan Hajnoczi <stefanha@redhat.com>, linux-scsi@vger.kernel.org
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
	Kevin Wolf <kwolf@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: Application error handling with write-back caching
Date: Tue, 10 May 2016 07:16:48 -0700	[thread overview]
Message-ID: <1462889808.2320.4.camel@HansenPartnership.com> (raw)
In-Reply-To: <20160510134737.GA1922@stefanha-x1.localdomain>

[-- Attachment #1: Type: text/plain, Size: 1268 bytes --]

On Tue, 2016-05-10 at 14:47 +0100, Stefan Hajnoczi wrote:
> SBC-3 4.15.3 Write caching says:
> 
> "If processing a write command results in logical block data in cache
> that is different from the logical block data on the medium, then the
> device server shall retain that logical block data in cache until a
> write medium operation is performed using that logical block data."
> 
> Does "is performed" mean "completes successfully" or just
> "completes"?

It means completes.  If there's an error, it will be reported via
deferred sense and an error to the SYNC CACHE command.

> If "is performed" just means "completes", maybe with an error, the
> application would have to resubmit write requests and then try to 
> flush the write cache again.
> 
> I'm not aware of applications that keep acknowledged write data 
> around until the cache flush completion in order to retry writes.

I think you may be misunderstanding the nature of the returned error. 
 It will be permanent and fatal and usually signal that the device has
a failed sector that can't be remapped and so the device itself has for
most purposes failed.  The only recovery is if you happen to have RAID,
in which case the RAID layer will mostly take care of it.

James

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2016-05-10 14:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-10 13:47 Application error handling with write-back caching Stefan Hajnoczi
2016-05-10 14:16 ` James Bottomley [this message]
2016-05-10 16:42   ` Paolo Bonzini
2016-05-10 17:31     ` James Bottomley
2016-05-10 20:12       ` Paolo Bonzini

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=1462889808.2320.4.camel@HansenPartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=kwolf@redhat.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=pbonzini@redhat.com \
    --cc=stefanha@redhat.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