Skip to content

Commit

Permalink
md/bitmap: move setting of daemon_lastrun out of bitmap_read_sb
Browse files Browse the repository at this point in the history
Setting daemon_lastrun really has nothing to do with reading
the bitmap superblock, it just happens to be needed at the same time.
bitmap_read_sb is about to become options, so move that code out
to after the call to bitmap_read_sb.

Signed-off-by: NeilBrown <neilb@suse.de>
  • Loading branch information
NeilBrown committed Dec 14, 2009
1 parent 43a7050 commit 624ce4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/md/bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,6 @@ static int bitmap_read_sb(struct bitmap *bitmap)
/* assign fields using values from superblock */
bitmap->mddev->bitmap_info.chunksize = chunksize;
bitmap->mddev->bitmap_info.daemon_sleep = daemon_sleep;
bitmap->daemon_lastrun = jiffies;
bitmap->mddev->bitmap_info.max_write_behind = write_behind;
bitmap->flags |= le32_to_cpu(sb->state);
if (le32_to_cpu(sb->version) == BITMAP_MAJOR_HOSTENDIAN)
Expand Down Expand Up @@ -1663,6 +1662,7 @@ int bitmap_create(mddev_t *mddev)
if (err)
goto error;

bitmap->daemon_lastrun = jiffies;
bitmap->chunkshift = ffz(~mddev->bitmap_info.chunksize);

/* now that chunksize and chunkshift are set, we can use these macros */
Expand Down

0 comments on commit 624ce4f

Please sign in to comment.