summaryrefslogtreecommitdiff
path: root/mm/util.c
diff options
context:
space:
mode:
authorJoe Thornber <ejt@redhat.com>2015-10-22 17:10:55 (GMT)
committerMike Snitzer <snitzer@redhat.com>2015-10-23 18:02:56 (GMT)
commit3201ac452e84a8a368197d648c9b7011e061804a (patch)
tree9e9788ae271af4fa9f9d23e4968f78a20438bb74 /mm/util.c
parent4dcb8b57df3593dcb20481d9d6cf79d1dc1534be (diff)
downloadlinux-3201ac452e84a8a368197d648c9b7011e061804a.tar.xz
dm cache: the CLEAN_SHUTDOWN flag was not being set
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. __commit_transaction() is responsible for setting/clearing CLEAN_SHUTDOWN (based the flags_mutator that is passed in). Fix this issue, of the cache's on-disk flags being wrong, by making sure __commit_transaction() does not reset the flags after the mutator has altered the flags in preparation for them being serialized to disk. before: sb_flags = mutator(le32_to_cpu(disk_super->flags)); disk_super->flags = cpu_to_le32(sb_flags); disk_super->flags = cpu_to_le32(cmd->flags); after: disk_super->flags = cpu_to_le32(cmd->flags); sb_flags = mutator(le32_to_cpu(disk_super->flags)); disk_super->flags = cpu_to_le32(sb_flags); Reported-by: Bogdan Vasiliev <bogdan.vasiliev@gmail.com> Signed-off-by: Joe Thornber <ejt@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'mm/util.c')
0 files changed, 0 insertions, 0 deletions