Skip to content

Commit

Permalink
dm space map common: zero entire ll_disk
Browse files Browse the repository at this point in the history
Otherwise, memory that is allocated (and potentially not previously
zeroed) will get written to disk as part of the space maps.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
  • Loading branch information
Mike Snitzer committed Apr 18, 2019
1 parent 84420b1 commit c6e086e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/md/persistent-data/dm-space-map-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ static int sm_find_free(void *addr, unsigned begin, unsigned end,

static int sm_ll_init(struct ll_disk *ll, struct dm_transaction_manager *tm)
{
memset(ll, 0, sizeof(struct ll_disk));

ll->tm = tm;

ll->bitmap_info.tm = tm;
Expand Down

0 comments on commit c6e086e

Please sign in to comment.