]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
dm era: save spacemap metadata root after the pre-commit
authorSomasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
Fri, 7 Apr 2017 19:14:55 +0000 (12:14 -0700)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 20 Jun 2017 10:17:26 +0000 (12:17 +0200)
commitc508986dc7e142e5601ed0e9a2f87ed35053ba9d
tree8fb33f9cd8bf3de29916289d630b07303005ed55
parent152a8e1307fb6508cf5aa7fae6a4cdf8363bfdb1
dm era: save spacemap metadata root after the pre-commit

BugLink: http://bugs.launchpad.net/bugs/1692900
commit 117aceb030307dcd431fdcff87ce988d3016c34a upstream.

When committing era metadata to disk, it doesn't always save the latest
spacemap metadata root in superblock. Due to this, metadata is getting
corrupted sometimes when reopening the device. The correct order of update
should be, pre-commit (shadows spacemap root), save the spacemap root
(newly shadowed block) to in-core superblock and then the final commit.

Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
drivers/md/dm-era-target.c