Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(446)

Issue 6721019: verity: use atomic_set instead of atomic_cmpxchg in read_completed (Closed)

Created:
9 years, 9 months ago by Mandeep Singh Baines
Modified:
9 years, 7 months ago
Reviewers:
Paul T, ups, Will Drewry
CC:
chromium-os-reviews_chromium.org
Visibility:
Public.

Description

verity: use atomic_set instead of atomic_cmpxchg in read_completed When moving from the PENDING to READY state it is sufficient to use an atomic_set since we know the previous state MUST have been PENDING. In addition, there is a BUG_ON which verifies this. BUG=9752 TEST=Ran tests in verity.git. Ran platform_DMVerityCorruption on H/W. Signed-off-by: Mandeep Singh Baines <msb@chromium.org>; kernel.git Review URL: http://codereview.chromium.org/6677048 TBRing. Already LGTMed and committed to kernel.git Change-Id: I1a199fc8f27f315bd98baa98f5fca0bb0fb4a556 R=wad@chromium.org,taysom@chromium.org,ups@chromium.org Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=f782127

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -8 lines) Patch
M dm-bht.c View 2 chunks +2 lines, -8 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Mandeep Singh Baines
9 years, 9 months ago (2011-03-23 01:22:29 UTC) #1
Paul T
LGTM - Though I'm still wondering why you can assume that another thread can't set ...
9 years, 9 months ago (2011-03-23 15:00:15 UTC) #2
Mandeep Singh Baines
9 years, 9 months ago (2011-03-23 20:09:39 UTC) #3
On 2011/03/23 15:00:15, Paul T wrote:
> LGTM - Though I'm still wondering why you can assume that another thread can't
> set that flag.

The state machine guarantees it. The state transition to PENDING results in the
bio being submitted. We don't look at the bio or touch the entry again until the
completion. At which point, we transition from PENDING to READY.

Powered by Google App Engine
This is Rietveld 408576698