Re: Write to the degraded raid5 will trigger the call trace dump when skip_copy is enabled
From: Shaohua Li <shli@kernel.org>
Date: 2016-05-08 22:23:40
From: Shaohua Li <shli@kernel.org>
Date: 2016-05-08 22:23:40
On Wed, May 04, 2016 at 11:21:59AM +0800, Joey Liao wrote:
Any suggestion for my question in the last e-mail? Should the WARN_ON() be exist or not? It is also related to skip_copy feature and I think it seems make sense that maybe R5_UPTODATE should not be set in this case. But I'm not really sure if my thinking is correct or not. However, if it does not have to exist, would you mind delete it as well or just modify the code? 2016-05-02 22:45 GMT+08:00 Joey Liao [off-list ref]:quoted
Hi Shaohua, Many thanks for your reply. How about the following WARN_ON() in handle_stripe_clean_event()??? if (test_and_clear_bit(R5_SkipCopy, &dev->flags)) { WARN_ON(test_bit(R5_UPTODATE, &dev->flags)); } Sometimes it will be triggered as well but I can't find the exactly way to reproduce it. I would like to know if it is suitable to remove it as well or not.
This one isn't false alarm. If the dev->flags has R5_SkipCopy, we don't copy data to stripe cache, so stripe cache shouldn't have R5_UPTODATE. So this warning indicates a bug. If you can reproduce it, I'd be happy to debug. Thanks, Shaohua