]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/raid/md_k.h
Merge commit 'v2.6.27-rc7' into x86/pebs
[linux-2.6-omap-h63xx.git] / include / linux / raid / md_k.h
index 6f72b47ae41c0aa29c163647f2bbc54b1ba85120..c200b9a34affc193500897aead3eec14f98f5f5f 100644 (file)
@@ -128,6 +128,7 @@ struct mddev_s
 #define MD_CHANGE_DEVS 0       /* Some device status has changed */
 #define MD_CHANGE_CLEAN 1      /* transition to or from 'clean' */
 #define MD_CHANGE_PENDING 2    /* superblock update in progress */
+#define MD_NOTIFY_ARRAY_STATE 3        /* atomic context wants to notify userspace */
 
        int                             ro;
 
@@ -215,7 +216,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
@@ -338,6 +340,9 @@ static inline char * mdname (mddev_t * mddev)
 #define rdev_for_each(rdev, tmp, mddev)                                \
        rdev_for_each_list(rdev, tmp, (mddev)->disks)
 
+#define rdev_for_each_rcu(rdev, mddev)                         \
+       list_for_each_entry_rcu(rdev, &((mddev)->disks), same_set)
+
 typedef struct mdk_thread_s {
        void                    (*run) (mddev_t *mddev);
        mddev_t                 *mddev;