aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/drbd.h
diff options
context:
space:
mode:
authorPhilipp Reisner <philipp.reisner@linbit.com>2010-09-08 17:20:21 -0400
committerPhilipp Reisner <philipp.reisner@linbit.com>2010-10-14 12:38:40 -0400
commitfb22c402ffdf61dd121795b5809de587185d5240 (patch)
tree7c3de5410eff21b3a3b105dc63d5e2034f2c7c63 /include/linux/drbd.h
parent78db89287ce0f146a1f2a019a0b243ea4557caac (diff)
drbd: Track the reasons to suspend IO in dedicated state bits
There are three ways to get IO suspended: * Loss of any access to data * Fence-peer-handler running * User requested to suspend IO Track those in different bits, so that one condition clearing its state bit does not interfere with the other two conditions. Only when the user resumes IO he overrules all three bits. The fact is hidden from the user, he sees only a single suspend bit. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'include/linux/drbd.h')
-rw-r--r--include/linux/drbd.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/linux/drbd.h b/include/linux/drbd.h
index 89718a39791e..5e72a5d3d48f 100644
--- a/include/linux/drbd.h
+++ b/include/linux/drbd.h
@@ -232,13 +232,17 @@ union drbd_state {
232 unsigned conn:5 ; /* 17/32 cstates */ 232 unsigned conn:5 ; /* 17/32 cstates */
233 unsigned disk:4 ; /* 8/16 from D_DISKLESS to D_UP_TO_DATE */ 233 unsigned disk:4 ; /* 8/16 from D_DISKLESS to D_UP_TO_DATE */
234 unsigned pdsk:4 ; /* 8/16 from D_DISKLESS to D_UP_TO_DATE */ 234 unsigned pdsk:4 ; /* 8/16 from D_DISKLESS to D_UP_TO_DATE */
235 unsigned susp:1 ; /* 2/2 IO suspended no/yes */ 235 unsigned susp:1 ; /* 2/2 IO suspended no/yes (by user) */
236 unsigned aftr_isp:1 ; /* isp .. imposed sync pause */ 236 unsigned aftr_isp:1 ; /* isp .. imposed sync pause */
237 unsigned peer_isp:1 ; 237 unsigned peer_isp:1 ;
238 unsigned user_isp:1 ; 238 unsigned user_isp:1 ;
239 unsigned _pad:11; /* 0 unused */ 239 unsigned susp_nod:1 ; /* IO suspended because no data */
240 unsigned susp_fen:1 ; /* IO suspended because fence peer handler runs*/
241 unsigned _pad:9; /* 0 unused */
240#elif defined(__BIG_ENDIAN_BITFIELD) 242#elif defined(__BIG_ENDIAN_BITFIELD)
241 unsigned _pad:11; /* 0 unused */ 243 unsigned _pad:9;
244 unsigned susp_fen:1 ;
245 unsigned susp_nod:1 ;
242 unsigned user_isp:1 ; 246 unsigned user_isp:1 ;
243 unsigned peer_isp:1 ; 247 unsigned peer_isp:1 ;
244 unsigned aftr_isp:1 ; /* isp .. imposed sync pause */ 248 unsigned aftr_isp:1 ; /* isp .. imposed sync pause */