aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/raid/md_k.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2008-07-21 03:05:25 -0400
committerNeilBrown <neilb@suse.de>2008-07-21 03:05:25 -0400
commitf2ea68cf42aafdd93393b6b8b20fc3c2b5f4390c (patch)
tree00b025b91898ff32dba742b5075dd290fec4dc91 /include/linux/raid/md_k.h
parentd6e2215052810678bc9782fd980b52706fc71f50 (diff)
md: only count actual openers as access which prevent a 'stop'
Open isn't the only thing that increments ->active. e.g. reading /proc/mdstat will increment it briefly. So to avoid false positives in testing for concurrent access, introduce a new counter that counts just the number of times the md device it open. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'include/linux/raid/md_k.h')
-rw-r--r--include/linux/raid/md_k.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h
index 6f72b47ae41c..4bef4791d80d 100644
--- a/include/linux/raid/md_k.h
+++ b/include/linux/raid/md_k.h
@@ -215,7 +215,8 @@ struct mddev_s
215 215
216 int in_sync; /* know to not need resync */ 216 int in_sync; /* know to not need resync */
217 struct mutex reconfig_mutex; 217 struct mutex reconfig_mutex;
218 atomic_t active; 218 atomic_t active; /* general refcount */
219 atomic_t openers; /* number of active opens */
219 220
220 int changed; /* true if we might need to reread partition info */ 221 int changed; /* true if we might need to reread partition info */
221 int degraded; /* whether md should consider 222 int degraded; /* whether md should consider