]> www.infradead.org Git - users/jedix/linux-maple.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)
committerSomasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
Thu, 18 May 2017 18:55:55 +0000 (11:55 -0700)
commit95b600ff8a0b6413bd682be045dfb49a59171d26
treeac048ed0f7cbe82778dad272cf5da5b3eb537fb2
parenta7549429769f33568e4b2ee7318a0a868ce41391
dm era: save spacemap metadata root after the pre-commit

Orabug: 25547820

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>
(cherry picked from commit 117aceb030307dcd431fdcff87ce988d3016c34a)
Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
drivers/md/dm-era-target.c