]> git.ipfire.org Git - thirdparty/mdadm.git/commit - super-intel.c
imsm: FIX: mdadm should process local data
authorAdam Kwolek <adam.kwolek@intel.com>
Wed, 12 Jan 2011 23:04:33 +0000 (10:04 +1100)
committerNeilBrown <neilb@suse.de>
Wed, 12 Jan 2011 23:04:33 +0000 (10:04 +1100)
commit8dd70bce5b0c5f498474e3a8183c3cf1872ff7fb
tree745afa668bd598a2e26c84bf57edcbb52a189d2f
parentd8eb27f71a19b203e86d778a4edf92b2f0aaf5bb
imsm: FIX: mdadm should process local data

When update is created by mdadm, local information should be updated
also.  This makes us to prepare one update for mdmon and second
"update" to maintain local changes.  we can use prepared update for
"local/mdadm" metadata update purposes.

We have 2 cases:
1. when metadata is updated by mdmon, we avoid metadata reloading in
   mdadm.
   we proceed the same updtate 2 times:
- one time in mdadm for "local update"
        - second time in mdmon for real metadat update
2. when metadata is updated by mdadm (no mdmon running) updates are
   processed in the same way.
- one time in mdadm for "local update"
- there is no "second time" update but mdadm just flushes
          metadata to array

   This let us to avoid code duplication by using prepare and process
   update functions as for update via mdmon. This makes update
   preparing mdmon independent and there is no need to maintain the
   same thing in 2 places in code.

Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
super-intel.c