Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[dm-cache] The CLEAN_SHUTDOWN flag was not being set
or rather, it was being set on the disk, then immediately cleared again.

If the CLEAN_SHUTDOWN flag is not set when a cache is loaded then all cache
blocks are marked as dirty and a full writeback occurs.
  • Loading branch information
jthornber committed Oct 22, 2015
1 parent 05ce4ed commit 7e0a973
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/md/dm-cache-metadata.c
Expand Up @@ -634,10 +634,11 @@ static int __commit_transaction(struct dm_cache_metadata *cmd,

disk_super = dm_block_data(sblock);

disk_super->flags = cpu_to_le32(cmd->flags);

if (mutator)
update_flags(disk_super, mutator);

disk_super->flags = cpu_to_le32(cmd->flags);
disk_super->mapping_root = cpu_to_le64(cmd->root);
disk_super->hint_root = cpu_to_le64(cmd->hint_root);
disk_super->discard_root = cpu_to_le64(cmd->discard_root);
Expand Down

0 comments on commit 7e0a973

Please sign in to comment.