diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-08-26 00:40:29 +0200 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-08-26 00:40:29 +0200 |
commit | e8a2eb47e6ca03d4a4f98f0beef73720c5dddc0c (patch) | |
tree | 31c4d7718111abddfaaa8d3fb14ab4a7e2554cd9 /drivers/md/md.h | |
parent | x86: properly annotate alternatives.c (diff) | |
parent | x86: Fix build with older binutils and consolidate linker script (diff) | |
download | linux-e8a2eb47e6ca03d4a4f98f0beef73720c5dddc0c.tar.xz linux-e8a2eb47e6ca03d4a4f98f0beef73720c5dddc0c.zip |
Merge commit 'origin/x86/urgent' into x86/asm
Diffstat (limited to 'drivers/md/md.h')
-rw-r--r-- | drivers/md/md.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/md/md.h b/drivers/md/md.h index 9430a110db93..f8fc188bc762 100644 --- a/drivers/md/md.h +++ b/drivers/md/md.h @@ -223,6 +223,16 @@ struct mddev_s * so we don't loop trying */ int in_sync; /* know to not need resync */ + /* 'open_mutex' avoids races between 'md_open' and 'do_md_stop', so + * that we are never stopping an array while it is open. + * 'reconfig_mutex' protects all other reconfiguration. + * These locks are separate due to conflicting interactions + * with bdev->bd_mutex. + * Lock ordering is: + * reconfig_mutex -> bd_mutex : e.g. do_md_run -> revalidate_disk + * bd_mutex -> open_mutex: e.g. __blkdev_get -> md_open + */ + struct mutex open_mutex; struct mutex reconfig_mutex; atomic_t active; /* general refcount */ atomic_t openers; /* number of active opens */ @@ -431,5 +441,7 @@ extern int md_allow_write(mddev_t *mddev); extern void md_wait_for_blocked_rdev(mdk_rdev_t *rdev, mddev_t *mddev); extern void md_set_array_sectors(mddev_t *mddev, sector_t array_sectors); extern int md_check_no_bitmap(mddev_t *mddev); +extern int md_integrity_register(mddev_t *mddev); +void md_integrity_add_rdev(mdk_rdev_t *rdev, mddev_t *mddev); #endif /* _MD_MD_H */ |