RE: [PATCH] pstore: avoid recursive spinlocks in theoops_in_progress case

From: Luck, Tony
Date: Thu Sep 20 2012 - 19:48:25 EST


> True, but the lock is used to protect pstore->buf, I doubt that
> any backend will actually want to grab it, no?

The lock is doing double duty to protect the buffer, and the back-end driver.

But even if we split it into two (one for the buffer, taken by pstore, and one
internal to the backend to protect interaction with the f/w). Ifwe ignore the
fact that we can't get the lock that protects the buffer means it is very likely
that we corrupt the previous record that was being written by clobbering the
buffer with the data for this new record.

I'd prefer to maximize the chances that the earlier record gets written.

-Tony
N‹§²æìr¸›yúèšØb²X¬¶ÇvØ^–)Þ{.nÇ+‰·¥Š{±‘êçzX§¶›¡Ü}©ž²ÆzÚ&j:+v‰¨¾«‘êçzZ+€Ê+zf£¢·hšˆ§~†­†Ûiÿûàz¹®w¥¢¸?™¨è­Ú&¢)ßf”ù^jÇy§m…á@A«a¶Úÿ 0¶ìh®å’i