]> bbs.cooldavid.org Git - net-next-2.6.git/commit
Update recovery_offset even when external metadata is used.
authorNeilBrown <neilb@suse.de>
Mon, 16 Aug 2010 08:09:31 +0000 (18:09 +1000)
committerNeilBrown <neilb@suse.de>
Wed, 18 Aug 2010 01:39:38 +0000 (11:39 +1000)
commit3a3a5ddb7a0f43c3dd0f98673f3d930a456725f8
treefa1e33c011c9f6350ce5118b89deafacbb1e0f2b
parentda5cabf80e2433131bf0ed8993abc0f7ea618c73
Update recovery_offset even when external metadata is used.

The update of ->recovery_offset in sync_sbs is appropriate even then external
metadata is in use.  However sync_sbs is only called when native
metadata is used.

So move that update in to the top of md_update_sb (which is the only
caller of sync_sbs) before the test on ->external.

This moves the update out of ->write_lock protection, but those fields
only need ->reconfig_mutex protection which they still have.

Also move the test on ->persistent up to where ->external is set as
for metadata update purposes they are the same.

Clear MD_CHANGE_DEVS and MD_CHANGE_CLEAN as they can only be confusing
if ->external is set or ->persistent isn't.

Finally move the update of ->utime down as it is only relevent (like
the ->events update) for native metadata.

Signed-off-by: NeilBrown <neilb@suse.de>
Reported-by: "Kwolek, Adam" <adam.kwolek@intel.com>
drivers/md/md.c