Re: BUG: drivers/md/bcache/writeback.c:237

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

 



On Thu, 25 Feb 2016, Marc MERLIN wrote:
> On Thu, Feb 25, 2016 at 06:46:33PM -0800, Marc MERLIN wrote:
> > Given that, I'm happy to run code that spits out diagostics, but probably
> > not something that will attempt to write an outdated cache on a filesytem
> > that's already ahead.
> > Or does bcache understand that the backing device is ahead already and the
> > cache should just be discarded?
> 
> Yeah, sorry, I did forget to mention that I did a force run on the 
> backing device so that I could get to its data. In doing so, I probably 
> invalidated options to try and reply the cache to see if things would 
> crash, or not, sorry about that.
> 
> Now, if I try to make the cache available again, will the code be smart and
> not try to reapply a stale cache (never mind that it's probably corrupted in
> addition to being old?)

According to Documentation/bcache.txt:
	"" If you're booting up and your cache device is gone and never
	coming back, you can force run the backing device:
	  echo 1 > /sys/block/sdb/bcache/running
	[...]
	The backing device will still use that cache set if it shows up
	in the future, but all the cached data will be invalidated.  ""

So it seems that you are safe.  (It would be interesting to know how it 
invalidates the cache.  Maybe bumps the Set UUID?  Not sure.)

This is what the patch does:

The code in super.c would do what bcache has always done in your kernel, 
except that it holds the writeback_lock to prevent a writeback kthread 
race before initialization is complete.  All that does is delay the 
writeback thread slightly.  If that fixes it, then it is a trivial patch 
from which everyone may benefit.

The code in writeback.c just jumps to the OOM case instead of bugging. If 
it does meet the printk(KERN_WARNING)+dump_stack() condition, then it 
might give us useful data to troubleshoot from.  I think this is quite 
safe since the OOM path just sleeps the kthread until the next writeback 
is scheduled and will try again.  If it dump_stack()'s every scheduled 
writeback interval, then something is seriously wrong somewhere else.

-Eric



> 
> Thanks,
> Marc
> -- 
> "A mouse is a device used to point at the xterm you want to type in" - A.S.R.
> Microsoft is to operating systems ....
>                                       .... what McDonalds is to gourmet cooking
> Home page: http://marc.merlins.org/  
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux