Skip to content

Commit

Permalink
md: move assignment of ->utime so that it never gets skipped.
Browse files Browse the repository at this point in the history
Currently the assignment to utime gets skipped for 'external'
metadata.  So move it to the top of the function so that it
always gets effected.
This is of largely cosmetic interest.  Nothing actually depends
on ->utime being right for external arrays.
"mdadm --monitor" does use it for 0.90 and 1.x arrays, but with
mdadm-3.0, this is not important for external metadata.

Signed-off-by: NeilBrown <neilb@suse.de>
  • Loading branch information
NeilBrown committed Jun 17, 2009
1 parent 8c6ac86 commit 1b57f13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -1904,6 +1904,7 @@ static void md_update_sb(mddev_t * mddev, int force_change)
int sync_req;
int nospares = 0;

mddev->utime = get_seconds();
if (mddev->external)
return;
repeat:
Expand Down Expand Up @@ -1933,7 +1934,6 @@ static void md_update_sb(mddev_t * mddev, int force_change)
nospares = 0;

sync_req = mddev->in_sync;
mddev->utime = get_seconds();

/* If this is just a dirty<->clean transition, and the array is clean
* and 'events' is odd, we can roll back to the previous clean state */
Expand Down

0 comments on commit 1b57f13

Please sign in to comment.