Re: dm barrier: A better test for -EOPNOTSUPP.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Works great, thanks.

Acked-by: Mike Snitzer <snitzer@xxxxxxxxxx>

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel


[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux