mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
d6e2215052
commit
f2ea68cf42
2 changed files with 8 additions and 4 deletions
|
@ -215,7 +215,8 @@ struct mddev_s
|
|||
|
||||
int in_sync; /* know to not need resync */
|
||||
struct mutex reconfig_mutex;
|
||||
atomic_t active;
|
||||
atomic_t active; /* general refcount */
|
||||
atomic_t openers; /* number of active opens */
|
||||
|
||||
int changed; /* true if we might need to reread partition info */
|
||||
int degraded; /* whether md should consider
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue