krbd: still more barrier fixes
While looking at http://tracker.ceph.com/issues/4079 I
concluded that the fix I put in for this might still
not be right:
07741308 rbd: add barriers near done flag operations
Fix it, and use full memory barriers to be conservative
about it and be done with this issue once and for all.
#1 Updated by Alex Elder about 7 years ago
- Status changed from In Progress to Fix Under Review
- Target version set to v0.58
Posted for review.
commit 5ba6ae1682d395087cf854dc7dd8a4c72419b47b Author: Alex Elder <email@example.com> Date: Thu Feb 21 10:10:06 2013 -0600 rbd: barriers are hard Let's go shopping! I'm afraid this may not have gotten it right: 07741308 rbd: add barriers near done flag operations The smp_wmb() should have been done *before* setting the done flag, to ensure all other data was valid before marking the object request done. Switch to use atomic_inc_return() here to set the done flag, which allows us to verify we don't mark something done more than once. Doing this also implies general barriers before and after the call. And although a read memory barrier might have been sufficient before reading the done flag, convert this to a full memory barrier just to put this issue to bed. This resolves: http://tracker.ceph.com/issues/4238 Signed-off-by: Alex Elder <firstname.lastname@example.org>