All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: dm-devel@redhat.com, Alasdair G Kergon <agk@redhat.com>
Subject: Re: dm barrier: A better test for -EOPNOTSUPP.
Date: Thu, 8 Jul 2010 12:05:33 -0400	[thread overview]
Message-ID: <20100708160532.GA17374@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1007081141440.10642@hs20-bc2-1.build.redhat.com>

On Thu, Jul 08 2010 at 11:52am -0400,
Mikulas Patocka <mpatocka@redhat.com> wrote:

> 
> 
> On Thu, 8 Jul 2010, Mike Snitzer wrote:
> > Doesn't store_barrier_error just record the result of the first empty
> > barrier (not the -EOPNOTSUPP result of the unsupported discard)?
> > 
> > I'm missing how this change helps avoid the 2nd barrier for the
> > -EOPNOTSUPP discard case.
> > 
> > ... And my testing shows that it doesn't.
> > 
> > Mike
> 
> Thanks for testing it. The errors of all the operations are accumulated in 
> in md->barrier_error in dec_pending.
> 
> The problem was that it was ignoring -EOPNOTSUPP (assuming to ignore not 
> supported empty barriers), but this condition unexpectedly ignored 
> EOPNOTSUPP from the discard as well.
> 
> Please test with this patch.
> 
> Also, apply the patch to RHEL, because it is a bugfix (don't ignore 
> discard errors).
> 
> Mikulas
> 
> ---
> 
> dm barrier: A better test for -EOPNOTSUPP.
> 
> -EOPNOTSUPP could be generated only by empty barriers and we ignored that 
> error, assuming that device not supporting cache flushes has cache always 
> consistent.
> 
> With addition of discard barriers, this -EOPNOTSUPP could be generated by 
> discards as well, and we can't ignore it.
> 
> This patch refines the test for -EOPNOTSUPP, ignoring it only for empty 
> barrier requests.
> 
> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>

Works great, thanks.

Acked-by: Mike Snitzer <snitzer@redhat.com>

      reply	other threads:[~2010-07-08 16:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-07 22:22 [PATCH] optimize one of the cache flushes Mikulas Patocka
2010-07-07 23:30 ` Alasdair G Kergon
2010-07-08 13:52 ` Mike Snitzer
2010-07-08 15:52   ` [PATCH] dm barrier: A better test for -EOPNOTSUPP Mikulas Patocka
2010-07-08 16:05     ` Mike Snitzer [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=20100708160532.GA17374@redhat.com \
    --to=snitzer@redhat.com \
    --cc=agk@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=mpatocka@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.