]> git.baikalelectronics.ru Git - 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)
committerMike Snitzer <snitzer@redhat.com>
Mon, 24 Apr 2017 19:02:14 +0000 (15:02 -0400)
commit0c2ed4f1dc5578a69a52d19b865f64636f94454d
tree6ee850484a06b5d14f63617a2a6126cd3f4cac11
parentcaa0645c0012fa0db55d10286d31db64e5c2a305
dm era: save spacemap metadata root after the pre-commit

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.

Cc: stable@vger.kernel.org
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-era-target.c