diff options
author | Lars Ellenberg <lars.ellenberg@linbit.com> | 2010-10-15 09:52:46 +0200 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2010-10-15 14:06:53 +0200 |
commit | 5dbfe7aedf54aa7f62fd659e34371d4ea0e7bffe (patch) | |
tree | 1ef5c18551186ba593010cbde9756e27b5d54685 /include | |
parent | ac7241211ded714873e8dc6d2f7c98ae7ea2cc30 (diff) | |
download | op-kernel-dev-5dbfe7aedf54aa7f62fd659e34371d4ea0e7bffe.zip op-kernel-dev-5dbfe7aedf54aa7f62fd659e34371d4ea0e7bffe.tar.gz |
drbd: add race-breaker to drbd_go_diskless
This adds a necessary race breaker to these commits:
drbd: fix for possible deadlock on IO error during resync
drbd: drop wrong debug asserts, fix recently introduced race
What we do is get a refcount, check the state, then depending on the
state and the requested minimum disk state, either hold it (success),
or give it back immediately (failed "try lock").
Some code paths (flushing of drbd metadata) may still grab and hold a
refcount even if we are D_FAILED (application IO won't).
So even if we hit local_cnt == 0 once after being D_FAILED,
we still need to wait for that again after we changed to D_DISKLESS.
Once local_cnt reaches 0 while we are D_DISKLESS, we can be sure that
no one will look at the protected members anymore, so only then is it
safe to free them.
We cannot easily convert to standard locking primitives here, as we want
to be able to use it in atomic context (we always do a "try lock"),
as well as hold references for a "long time" (from IO submission to
completion callback).
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/drbd.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/drbd.h b/include/linux/drbd.h index da7d9bd..9b2a015 100644 --- a/include/linux/drbd.h +++ b/include/linux/drbd.h @@ -53,7 +53,7 @@ extern const char *drbd_buildtag(void); -#define REL_VERSION "8.3.9rc1" +#define REL_VERSION "8.3.9rc2" #define API_VERSION 88 #define PRO_VERSION_MIN 86 #define PRO_VERSION_MAX 95 |