[dm-devel] dm barrier: A better test for -EOPNOTSUPP.

Mike Snitzer snitzer at redhat.com
Thu Jul 8 16:05:33 UTC 2010


On Thu, Jul 08 2010 at 11:52am -0400,
Mikulas Patocka <mpatocka at 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 at redhat.com>

Works great, thanks.

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




More information about the dm-devel mailing list